Skip to content

Commit

Permalink
pythonPackages.augeas: init at 1.0.2
Browse files Browse the repository at this point in the history
(cherry picked from commit ac4c567)
  • Loading branch information
vcunat committed Jul 26, 2017
1 parent f828a86 commit 7cb1cf0
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
33 changes: 33 additions & 0 deletions pkgs/development/python-modules/augeas/default.nix
Original file line number Diff line number Diff line change
@@ -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;
};
}
4 changes: 4 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,10 @@ in {
};
};

augeas = callPackage ../development/python-modules/augeas {
inherit (pkgs) augeas;
};

ansicolor = buildPythonPackage rec {
name = "ansicolor-${version}";
version = "0.2.4";
Expand Down

0 comments on commit 7cb1cf0

Please sign in to comment.