2021-01-19 07:50:56 +01:00
|
|
|
{ stdenv, file, lib, fetchFromGitHub, autoreconfHook, bison, flex, pkg-config
|
2021-03-25 15:57:26 +01:00
|
|
|
, pythonSupport ? false, swig ? null, python ? null}:
|
2010-12-06 13:04:36 +01:00
|
|
|
|
2018-05-17 13:57:32 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "libnl";
|
2019-09-03 00:54:28 +02:00
|
|
|
version = "3.5.0";
|
2010-12-06 13:04:36 +01:00
|
|
|
|
2015-06-03 02:45:26 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
repo = "libnl";
|
|
|
|
owner = "thom311";
|
2017-06-20 07:03:53 +02:00
|
|
|
rev = "libnl${lib.replaceStrings ["."] ["_"] version}";
|
2019-09-03 00:54:28 +02:00
|
|
|
sha256 = "1ak30jcx52gl5yz1691qq0b76ldbcp2z6vsvdr2mrrwqiplqbcs2";
|
2010-12-06 13:04:36 +01:00
|
|
|
};
|
|
|
|
|
2018-05-17 14:02:27 +02:00
|
|
|
outputs = [ "bin" "dev" "out" "man" ] ++ lib.optional pythonSupport "py";
|
2015-10-18 20:49:41 +02:00
|
|
|
|
2017-10-29 20:21:06 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-01-19 07:50:56 +01:00
|
|
|
nativeBuildInputs = [ autoreconfHook bison flex pkg-config file ]
|
2018-05-17 14:02:27 +02:00
|
|
|
++ lib.optional pythonSupport swig;
|
|
|
|
|
|
|
|
postBuild = lib.optionalString (pythonSupport) ''
|
|
|
|
cd python
|
2021-03-25 15:57:26 +01:00
|
|
|
${python.interpreter} setup.py install --prefix=../pythonlib
|
2018-05-17 14:02:27 +02:00
|
|
|
cd -
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = lib.optionalString pythonSupport ''
|
|
|
|
mv "pythonlib/" "$py"
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
inherit pythonSupport;
|
|
|
|
};
|
2010-12-06 13:04:36 +01:00
|
|
|
|
2017-06-20 07:03:53 +02:00
|
|
|
meta = with lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://www.infradead.org/~tgr/libnl/";
|
2017-06-20 07:03:53 +02:00
|
|
|
description = "Linux Netlink interface library suite";
|
|
|
|
license = licenses.lgpl21;
|
|
|
|
maintainers = with maintainers; [ fpletz ];
|
|
|
|
platforms = platforms.linux;
|
2010-12-06 13:04:36 +01:00
|
|
|
};
|
|
|
|
}
|