core/pkgs/by-name/li/libnl/default.nix

75 lines
1.3 KiB
Nix
Raw Normal View History

2024-06-30 08:12:46 +00:00
{
stdenv,
file,
lib,
fetchFromGitHub,
autoreconfHook,
bison,
flex,
pkg-config,
doxygen,
graphviz,
mscgen,
asciidoc,
sourceHighlight,
pythonSupport ? false,
swig ? null,
python ? null,
2024-05-02 00:46:19 +00:00
}:
stdenv.mkDerivation rec {
pname = "libnl";
version = "3.8.0";
src = fetchFromGitHub {
repo = "libnl";
owner = "thom311";
2024-06-30 08:12:46 +00:00
rev = "libnl${lib.replaceStrings [ "." ] [ "_" ] version}";
2024-05-02 00:46:19 +00:00
hash = "sha256-zVpoRlB5xDfo6wJkCJGGptuCXkNkriudtZF2Job9YD4=";
};
2024-06-30 08:12:46 +00:00
outputs = [
"bin"
"dev"
"out"
"man"
] ++ lib.optional pythonSupport "py";
2024-05-02 00:46:19 +00:00
enableParallelBuilding = true;
nativeBuildInputs = [
autoreconfHook
bison
flex
pkg-config
file
doxygen
graphviz
mscgen
asciidoc
sourceHighlight
] ++ lib.optional pythonSupport swig;
postBuild = lib.optionalString (pythonSupport) ''
2024-06-30 08:12:46 +00:00
cd python
${python.pythonOnBuildForHost.interpreter} setup.py install --prefix=../pythonlib
cd -
2024-05-02 00:46:19 +00:00
'';
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;
};
}