mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-03 21:40:12 +00:00
A bunch of big dependencies were pulled in, but the documentation was not actually generated. See https://github.com/thom311/libnl/issues/422#issuecomment-2671351008 / `tools/build_release.sh` . Since the docs have been broken and I don't see any issues complaining about it they are now off by default to minimize dependencies. The doc build also wants pygments.
98 lines
1.9 KiB
Nix
98 lines
1.9 KiB
Nix
{
|
|
stdenv,
|
|
file,
|
|
lib,
|
|
fetchFromGitHub,
|
|
autoreconfHook,
|
|
bison,
|
|
flex,
|
|
pkg-config,
|
|
pythonSupport ? false,
|
|
swig ? null,
|
|
python ? null,
|
|
enableDocs ? false,
|
|
doxygen,
|
|
graphviz,
|
|
mscgen,
|
|
asciidoc,
|
|
sourceHighlight,
|
|
python3Packages,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "libnl";
|
|
version = "3.12.0";
|
|
|
|
src = fetchFromGitHub {
|
|
repo = "libnl";
|
|
owner = "thom311";
|
|
rev = "libnl${lib.replaceStrings [ "." ] [ "_" ] finalAttrs.version}";
|
|
hash = "sha256-K77WamOf+/3PNXe/hI+OYg0EBgBqvDfNDamXYXcK7P8=";
|
|
};
|
|
|
|
outputs = [
|
|
"bin"
|
|
"dev"
|
|
"out"
|
|
"man"
|
|
]
|
|
++ lib.optional pythonSupport "py"
|
|
++ lib.optional enableDocs "doc";
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
configureFlags = [ (lib.enableFeature enableDocs "doc") ];
|
|
|
|
nativeBuildInputs = [
|
|
autoreconfHook
|
|
bison
|
|
flex
|
|
pkg-config
|
|
file
|
|
]
|
|
++ lib.optionals pythonSupport [
|
|
swig
|
|
]
|
|
++ lib.optionals enableDocs [
|
|
doxygen
|
|
graphviz
|
|
mscgen
|
|
asciidoc
|
|
sourceHighlight
|
|
python3Packages.pygments
|
|
];
|
|
|
|
postBuild = lib.optionalString pythonSupport ''
|
|
cd python
|
|
${python.pythonOnBuildForHost.interpreter} setup.py install --prefix=../pythonlib
|
|
cd -
|
|
'';
|
|
|
|
postInstall = lib.optionalString enableDocs ''
|
|
patchShebangs doc
|
|
# See tools/build_release.sh
|
|
make -C doc
|
|
make -C doc gendoc
|
|
make -C doc dist
|
|
mkdir -p $doc/share/doc/libnl
|
|
cp doc/libnl-doc-${finalAttrs.version}.tar.gz $doc/share/doc/libnl
|
|
'';
|
|
|
|
postFixup = lib.optionalString pythonSupport ''
|
|
mv "pythonlib/" "$py"
|
|
'';
|
|
|
|
passthru = {
|
|
inherit pythonSupport;
|
|
};
|
|
|
|
meta = {
|
|
homepage = "http://www.infradead.org/~tgr/libnl/";
|
|
description = "Linux Netlink interface library suite";
|
|
license = lib.licenses.lgpl21;
|
|
maintainers = with lib.maintainers; [ fpletz ];
|
|
platforms = lib.platforms.linux;
|
|
identifiers.cpeParts = lib.meta.cpeFullVersionWithVendor "libnl_project" finalAttrs.version;
|
|
};
|
|
})
|