2024-01-13 08:15:51 +00:00
|
|
|
{ stdenv
|
|
|
|
, file
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, autoreconfHook
|
|
|
|
, bison
|
|
|
|
, flex
|
|
|
|
, pkg-config
|
|
|
|
, doxygen
|
|
|
|
, graphviz
|
|
|
|
, mscgen
|
|
|
|
, asciidoc
|
|
|
|
, sourceHighlight
|
|
|
|
, pythonSupport ? false
|
|
|
|
, swig ? null
|
|
|
|
, python ? null
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libnl";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "3.8.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
repo = "libnl";
|
|
|
|
owner = "thom311";
|
|
|
|
rev = "libnl${lib.replaceStrings ["."] ["_"] version}";
|
2024-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-zVpoRlB5xDfo6wJkCJGGptuCXkNkriudtZF2Job9YD4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "bin" "dev" "out" "man" ] ++ lib.optional pythonSupport "py";
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
bison
|
|
|
|
flex
|
|
|
|
pkg-config
|
|
|
|
file
|
|
|
|
doxygen
|
|
|
|
graphviz
|
|
|
|
mscgen
|
|
|
|
asciidoc
|
|
|
|
sourceHighlight
|
|
|
|
] ++ lib.optional pythonSupport swig;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postBuild = lib.optionalString (pythonSupport) ''
|
|
|
|
cd python
|
2023-11-16 04:20:00 +00:00
|
|
|
${python.pythonOnBuildForHost.interpreter} setup.py install --prefix=../pythonlib
|
2020-04-24 23:36:52 +00:00
|
|
|
cd -
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = lib.optionalString pythonSupport ''
|
|
|
|
mv "pythonlib/" "$py"
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
inherit pythonSupport;
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "http://www.infradead.org/~tgr/libnl/";
|
|
|
|
description = "Linux Netlink interface library suite";
|
|
|
|
license = licenses.lgpl21;
|
|
|
|
maintainers = with maintainers; [ fpletz ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|