2017-07-26 15:52:13 +00:00
|
|
|
{ stdenv, lib, buildPythonPackage, fetchFromGitHub, augeas, cffi }:
|
|
|
|
buildPythonPackage rec {
|
2017-11-09 11:26:09 +00:00
|
|
|
pname = "augeas";
|
2020-02-09 17:08:14 +00:00
|
|
|
version = "1.1.0";
|
2017-07-26 15:52:13 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hercules-team";
|
|
|
|
repo = "python-augeas";
|
|
|
|
rev = "v${version}";
|
2020-02-09 17:08:14 +00:00
|
|
|
sha256 = "12q52ilcx059rn544x3712xq6myn99niz131l0fs3xx67456pajh";
|
2017-07-26 15:52:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# TODO: not very nice!
|
|
|
|
postPatch =
|
2021-10-13 16:38:22 +00:00
|
|
|
let libname = "libaugeas${stdenv.hostPlatform.extensions.sharedLibrary}";
|
2017-07-26 15:52:13 +00:00
|
|
|
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";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/hercules-team/python-augeas";
|
2017-07-26 15:52:13 +00:00
|
|
|
license = licenses.lgpl2Plus;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|