Merge pull request #40470 from teto/libnl_python

[RFC] pythonPackages.libnl: init+bump at 3.4.0
This commit is contained in:
Jörg Thalheim 2018-05-21 13:11:08 +01:00 committed by GitHub
commit 99c1d03096
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 6 deletions

View File

@ -1,17 +1,18 @@
{ stdenv, lib, fetchFromGitHub, fetchpatch, autoreconfHook, bison, flex, pkgconfig }: { stdenv, file, lib, fetchFromGitHub, fetchpatch, autoreconfHook, bison, flex, pkgconfig
, pythonSupport ? true, swig ? null, python}:
let version = "3.3.0"; in stdenv.mkDerivation rec {
stdenv.mkDerivation {
name = "libnl-${version}"; name = "libnl-${version}";
version = "3.4.0";
src = fetchFromGitHub { src = fetchFromGitHub {
repo = "libnl"; repo = "libnl";
owner = "thom311"; owner = "thom311";
rev = "libnl${lib.replaceStrings ["."] ["_"] version}"; rev = "libnl${lib.replaceStrings ["."] ["_"] version}";
sha256 = "1796kyq2lkhz2802v9kp32vlxf8ynlyqgyw9nhmry3qh5d0ahcsv"; 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 {
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;

View File

@ -6951,6 +6951,9 @@ in {
pylru = callPackage ../development/python-modules/pylru { }; pylru = callPackage ../development/python-modules/pylru { };
libnl-python = disabledIf isPy3k
(toPythonModule (pkgs.libnl.override{pythonSupport=true; inherit python; })).py;
lark-parser = callPackage ../development/python-modules/lark-parser { }; lark-parser = callPackage ../development/python-modules/lark-parser { };
lazy-object-proxy = buildPythonPackage rec { lazy-object-proxy = buildPythonPackage rec {