ansible-later: 2.0.22 -> 2.0.23
[NixPkgs.git] / pkgs / development / python-modules / augeas / default.nix
blob6b70f3675268f5c54699d9a2b602b5a6a44e48d0
1 { stdenv, lib, buildPythonPackage, fetchFromGitHub, augeas, cffi }:
2 buildPythonPackage rec {
3     pname = "augeas";
4     version = "1.1.0";
6     src = fetchFromGitHub {
7       owner = "hercules-team";
8       repo = "python-augeas";
9       rev = "v${version}";
10       sha256 = "12q52ilcx059rn544x3712xq6myn99niz131l0fs3xx67456pajh";
11     };
13     # TODO: not very nice!
14     postPatch =
15       let libname = "libaugeas${stdenv.hostPlatform.extensions.sharedLibrary}";
16       in
17       ''
18         substituteInPlace augeas/ffi.py \
19           --replace 'ffi.dlopen("augeas")' \
20                     'ffi.dlopen("${lib.makeLibraryPath [augeas]}/${libname}")'
21       '';
23     propagatedBuildInputs = [ cffi augeas ];
25     doCheck = false;
27     meta = with lib; {
28       description = "Pure python bindings for augeas";
29       homepage = "https://github.com/hercules-team/python-augeas";
30       license = licenses.lgpl2Plus;
31       platforms = platforms.unix;
32     };