3
0
Fork 0
forked from mirrors/nixpkgs

libcap_ng: remove unused code for python bindings

The code was introduced way back in 2015 and is unused since then.

2dc9cb1120
This commit is contained in:
Sandro Jäckel 2022-08-22 11:18:18 +02:00
parent 6895427d34
commit 2c59b12503
No known key found for this signature in database
GPG key ID: B1763F8651144063
2 changed files with 5 additions and 26 deletions

View file

@ -1,36 +1,19 @@
{ lib, stdenv, fetchurl, swig ? null, python2 ? null, python3 ? null }:
assert python2 != null || python3 != null -> swig != null;
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
pname = "libcap-ng";
# When updating make sure to test that the version with
# all of the python bindings still works
version = "0.8.3";
src = fetchurl {
url = "${meta.homepage}/${pname}-${version}.tar.gz";
url = "https://people.redhat.com/sgrubb/libcap-ng/libcap-ng-${version}.tar.gz";
sha256 = "sha256-vtb2hI4iuy+Dtfdksq7w7TkwVOgDqOOocRyyo55rSS0=";
};
nativeBuildInputs = [ swig ];
buildInputs = [ python2 python3 ];
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")
"--without-python"
];
meta = let inherit (lib) platforms licenses; in {
meta = with lib; {
description = "Library for working with POSIX capabilities";
homepage = "https://people.redhat.com/sgrubb/libcap-ng/";
platforms = platforms.linux;

View file

@ -24184,11 +24184,7 @@ with pkgs;
libcap = callPackage ../os-specific/linux/libcap { };
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
};
libcap_ng = callPackage ../os-specific/linux/libcap-ng { };
libnotify = callPackage ../development/libraries/libnotify { };