2017-07-26 17:52:13 +02:00
|
|
|
{ stdenv, lib, buildPythonPackage, fetchFromGitHub, augeas, cffi }:
|
|
|
|
buildPythonPackage rec {
|
2017-11-09 12:26:09 +01:00
|
|
|
pname = "augeas";
|
2018-10-24 18:38:59 +02:00
|
|
|
version = "1.0.3";
|
2017-11-09 12:26:09 +01:00
|
|
|
name = pname + "-" + version;
|
2017-07-26 17:52:13 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hercules-team";
|
|
|
|
repo = "python-augeas";
|
|
|
|
rev = "v${version}";
|
2018-10-24 18:38:59 +02:00
|
|
|
sha256 = "1fb904ym8g8hkd82zlibzk6wrldnfd5v5d0rkynsy1zlhcylq4f6";
|
2017-07-26 17:52:13 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
# 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;
|
|
|
|
};
|
|
|
|
}
|