Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.09 44 lines 1.2 kB view raw
1{ stdenv, file, lib, fetchFromGitHub, autoreconfHook, bison, flex, pkgconfig 2, pythonSupport ? false, swig ? null, python}: 3 4stdenv.mkDerivation rec { 5 pname = "libnl"; 6 version = "3.5.0"; 7 8 src = fetchFromGitHub { 9 repo = "libnl"; 10 owner = "thom311"; 11 rev = "libnl${lib.replaceStrings ["."] ["_"] version}"; 12 sha256 = "1ak30jcx52gl5yz1691qq0b76ldbcp2z6vsvdr2mrrwqiplqbcs2"; 13 }; 14 15 outputs = [ "bin" "dev" "out" "man" ] ++ lib.optional pythonSupport "py"; 16 17 enableParallelBuilding = true; 18 19 nativeBuildInputs = [ autoreconfHook bison flex pkgconfig file ] 20 ++ lib.optional pythonSupport swig; 21 22 postBuild = lib.optionalString (pythonSupport) '' 23 cd python 24 ${python}/bin/python setup.py install --prefix=../pythonlib 25 cd - 26 ''; 27 28 postFixup = lib.optionalString pythonSupport '' 29 mv "pythonlib/" "$py" 30 ''; 31 32 passthru = { 33 inherit pythonSupport; 34 }; 35 36 meta = with lib; { 37 inherit version; 38 homepage = "http://www.infradead.org/~tgr/libnl/"; 39 description = "Linux Netlink interface library suite"; 40 license = licenses.lgpl21; 41 maintainers = with maintainers; [ fpletz ]; 42 platforms = platforms.linux; 43 }; 44}