diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2017-07-26 17:52:13 +0200 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2017-07-26 17:56:11 +0200 |
commit | ac4c567c3603c5106862f144c21037f6ad76c0ad (patch) | |
tree | a5c40185ec4ae7f35e400850f9a3780466cae685 | |
parent | fe80dbaae04e291220052f5863960d22b17d62a6 (diff) | |
download | nixlib-ac4c567c3603c5106862f144c21037f6ad76c0ad.tar nixlib-ac4c567c3603c5106862f144c21037f6ad76c0ad.tar.gz nixlib-ac4c567c3603c5106862f144c21037f6ad76c0ad.tar.bz2 nixlib-ac4c567c3603c5106862f144c21037f6ad76c0ad.tar.lz nixlib-ac4c567c3603c5106862f144c21037f6ad76c0ad.tar.xz nixlib-ac4c567c3603c5106862f144c21037f6ad76c0ad.tar.zst nixlib-ac4c567c3603c5106862f144c21037f6ad76c0ad.zip |
pythonPackages.augeas: init at 1.0.2
-rw-r--r-- | pkgs/development/python-modules/augeas/default.nix | 33 | ||||
-rw-r--r-- | pkgs/top-level/python-packages.nix | 4 |
2 files changed, 37 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/augeas/default.nix b/pkgs/development/python-modules/augeas/default.nix new file mode 100644 index 000000000000..8934e1b81a81 --- /dev/null +++ b/pkgs/development/python-modules/augeas/default.nix @@ -0,0 +1,33 @@ +{ stdenv, lib, buildPythonPackage, fetchFromGitHub, augeas, cffi }: +buildPythonPackage rec { + name = "augeas-${version}"; + version = "1.0.2"; + + src = fetchFromGitHub { + owner = "hercules-team"; + repo = "python-augeas"; + rev = "v${version}"; + sha256 = "1xk51m58ym3qpf0z5y98kzxb5jw7s92rca0v1yflj422977najxh"; + }; + + # TODO: not very nice! + postPatch = + let libname = if stdenv.isDarwin then "libaugeas.dylib" else "libaugeas.so"; + in + '' + substituteInPlace augeas/ffi.py \ + --replace 'ffi.dlopen("augeas")' \ + 'ffi.dlopen("${lib.makeLibraryPath [augeas]}/${libname}")' + ''; + + propagatedBuildInputs = [ cffi augeas ]; + + doCheck = false; + + meta = with lib; { + description = "Pure python bindings for augeas"; + homepage = https://github.com/hercules-team/python-augeas; + license = licenses.lgpl2Plus; + platforms = platforms.unix; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ece6fc3961d4..b57a508433d1 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -106,6 +106,10 @@ in { astropy = callPackage ../development/python-modules/astropy { }; + augeas = callPackage ../development/python-modules/augeas { + inherit (pkgs) augeas; + }; + automat = callPackage ../development/python-modules/automat { }; # packages defined elsewhere |