pythonPackages.libnl-python: init at 3.4.0
Netlink is the userspace <-> kernelspace communication protocol.
This commit is contained in:
parent
d9dadce758
commit
0d17a57afa
@ -1,4 +1,5 @@
|
|||||||
{ stdenv, lib, fetchFromGitHub, fetchpatch, autoreconfHook, bison, flex, pkgconfig }:
|
{ stdenv, file, lib, fetchFromGitHub, fetchpatch, autoreconfHook, bison, flex, pkgconfig
|
||||||
|
, pythonSupport ? true, swig ? null, python}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "libnl-${version}";
|
name = "libnl-${version}";
|
||||||
@ -11,7 +12,7 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "1bqf1f5glwf285sa98k5pkj9gg79lliixk1jk85j63v5510fbagp";
|
sha256 = "1bqf1f5glwf285sa98k5pkj9gg79lliixk1jk85j63v5510fbagp";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = [ "bin" "dev" "out" "man" ];
|
outputs = [ "bin" "dev" "out" "man" ] ++ lib.optional pythonSupport "py";
|
||||||
|
|
||||||
patches = stdenv.lib.optional stdenv.hostPlatform.isMusl
|
patches = stdenv.lib.optional stdenv.hostPlatform.isMusl
|
||||||
(fetchpatch {
|
(fetchpatch {
|
||||||
@ -21,7 +22,22 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
nativeBuildInputs = [ autoreconfHook bison flex pkgconfig ];
|
nativeBuildInputs = [ autoreconfHook bison flex pkgconfig file ]
|
||||||
|
++ lib.optional pythonSupport swig;
|
||||||
|
|
||||||
|
postBuild = lib.optionalString (pythonSupport) ''
|
||||||
|
cd python
|
||||||
|
${python}/bin/python setup.py install --prefix=../pythonlib
|
||||||
|
cd -
|
||||||
|
'';
|
||||||
|
|
||||||
|
postFixup = lib.optionalString pythonSupport ''
|
||||||
|
mv "pythonlib/" "$py"
|
||||||
|
'';
|
||||||
|
|
||||||
|
passthru = {
|
||||||
|
inherit pythonSupport;
|
||||||
|
};
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
inherit version;
|
inherit version;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user