pythonPackages.libnl-python: init at 3.4.0

Netlink is the userspace <-> kernelspace communication protocol.

+19 -3
+19 -3
pkgs/os-specific/linux/libnl/default.nix
··· 1 - { stdenv, lib, fetchFromGitHub, fetchpatch, autoreconfHook, bison, flex, pkgconfig }: 1 + { stdenv, file, lib, fetchFromGitHub, fetchpatch, autoreconfHook, bison, flex, pkgconfig 2 + , pythonSupport ? true, swig ? null, python}: 2 3 3 4 stdenv.mkDerivation rec { 4 5 name = "libnl-${version}"; ··· 11 12 sha256 = "1bqf1f5glwf285sa98k5pkj9gg79lliixk1jk85j63v5510fbagp"; 12 13 }; 13 14 14 - outputs = [ "bin" "dev" "out" "man" ]; 15 + outputs = [ "bin" "dev" "out" "man" ] ++ lib.optional pythonSupport "py"; 15 16 16 17 patches = stdenv.lib.optional stdenv.hostPlatform.isMusl 17 18 (fetchpatch { ··· 21 22 22 23 enableParallelBuilding = true; 23 24 24 - nativeBuildInputs = [ autoreconfHook bison flex pkgconfig ]; 25 + nativeBuildInputs = [ autoreconfHook bison flex pkgconfig file ] 26 + ++ lib.optional pythonSupport swig; 27 + 28 + postBuild = lib.optionalString (pythonSupport) '' 29 + cd python 30 + ${python}/bin/python setup.py install --prefix=../pythonlib 31 + cd - 32 + ''; 33 + 34 + postFixup = lib.optionalString pythonSupport '' 35 + mv "pythonlib/" "$py" 36 + ''; 37 + 38 + passthru = { 39 + inherit pythonSupport; 40 + }; 25 41 26 42 meta = with lib; { 27 43 inherit version;