libcap-ng: 0.7.3 -> 0.7.7
Also support swig + python bindings
This commit is contained in:
parent
09d336ea5e
commit
2dc9cb1120
@ -1,22 +1,40 @@
|
|||||||
{ stdenv, fetchurl, python }:
|
{ stdenv, fetchurl, swig ? null, python2 ? null, python3 ? null }:
|
||||||
|
|
||||||
assert stdenv.isLinux;
|
assert python2 != null || python3 != null -> swig != null;
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "libcap-ng-${version}";
|
name = "libcap-ng-${version}";
|
||||||
version = "0.7.3";
|
# When updating make sure to test that the version with
|
||||||
|
# all of the python bindings still works
|
||||||
|
version = "0.7.7";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "${meta.homepage}/${name}.tar.gz";
|
url = "${meta.homepage}/${name}.tar.gz";
|
||||||
sha256 = "1cavlcrpqi4imkmagjhw65br8rv2fsbhf68mm3lczr51sg44392w";
|
sha256 = "0syhyrixk7fqvwis3k7iddn75g0qxysc1q5fifvzccxk7774jmb1";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ python ]; # ToDo? optional swig for python bindings
|
nativeBuildInputs = [ swig ];
|
||||||
|
buildInputs = [ python2 python3 ];
|
||||||
|
|
||||||
meta = {
|
postPatch = ''
|
||||||
|
function get_header() {
|
||||||
|
echo -e "#include <$1>" | gcc -M -xc - | tr ' ' '\n' | grep "$1" | head -n 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Fix some hardcoding of header paths
|
||||||
|
sed -i "s,/usr/include/linux/capability.h,$(get_header linux/capability.h),g" bindings/python{,3}/Makefile.in
|
||||||
|
'';
|
||||||
|
|
||||||
|
configureFlags = [
|
||||||
|
(if python2 != null then "--with-python" else "--without-python")
|
||||||
|
(if python3 != null then "--with-python3" else "--without-python3")
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = let inherit (stdenv.lib) platforms licenses maintainers; in {
|
||||||
description = "Library for working with POSIX capabilities";
|
description = "Library for working with POSIX capabilities";
|
||||||
homepage = http://people.redhat.com/sgrubb/libcap-ng/;
|
homepage = http://people.redhat.com/sgrubb/libcap-ng/;
|
||||||
platforms = stdenv.lib.platforms.linux;
|
platforms = platforms.linux;
|
||||||
license = stdenv.lib.licenses.lgpl21;
|
license = licenses.lgpl21;
|
||||||
|
maintainers = with maintainers; [ wkennington ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -9921,7 +9921,11 @@ let
|
|||||||
|
|
||||||
libcap_manpages = callPackage ../os-specific/linux/libcap/man.nix { };
|
libcap_manpages = callPackage ../os-specific/linux/libcap/man.nix { };
|
||||||
|
|
||||||
libcap_ng = callPackage ../os-specific/linux/libcap-ng { };
|
libcap_ng = callPackage ../os-specific/linux/libcap-ng {
|
||||||
|
swig = null; # Currently not using the python2/3 bindings
|
||||||
|
python2 = null; # Currently not using the python2 bindings
|
||||||
|
python3 = null; # Currently not using the python3 bindings
|
||||||
|
};
|
||||||
|
|
||||||
libnscd = callPackage ../os-specific/linux/libnscd { };
|
libnscd = callPackage ../os-specific/linux/libnscd { };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user