diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:36 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:47 +0000 |
commit | 36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch) | |
tree | b3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/os-specific/linux/libnl | |
parent | 4e31070265257dc67d120c27e0f75c2344fdfa9a (diff) | |
parent | abf060725d7614bd3b9f96764262dfbc2f9c2199 (diff) | |
download | nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2 nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip |
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/os-specific/linux/libnl')
-rw-r--r-- | nixpkgs/pkgs/os-specific/linux/libnl/default.nix | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/os-specific/linux/libnl/default.nix b/nixpkgs/pkgs/os-specific/linux/libnl/default.nix new file mode 100644 index 000000000000..1caf91b0bb69 --- /dev/null +++ b/nixpkgs/pkgs/os-specific/linux/libnl/default.nix @@ -0,0 +1,50 @@ +{ stdenv, file, lib, fetchFromGitHub, fetchpatch, autoreconfHook, bison, flex, pkgconfig +, pythonSupport ? true, swig ? null, python}: + +stdenv.mkDerivation rec { + name = "libnl-${version}"; + version = "3.4.0"; + + src = fetchFromGitHub { + repo = "libnl"; + owner = "thom311"; + rev = "libnl${lib.replaceStrings ["."] ["_"] version}"; + sha256 = "1bqf1f5glwf285sa98k5pkj9gg79lliixk1jk85j63v5510fbagp"; + }; + + outputs = [ "bin" "dev" "out" "man" ] ++ lib.optional pythonSupport "py"; + + patches = stdenv.lib.optional stdenv.hostPlatform.isMusl + (fetchpatch { + url = "https://raw.githubusercontent.com/gentoo/musl/48d2a28710ae40877fd3e178ead1fb1bb0baa62c/dev-libs/libnl/files/libnl-3.3.0_rc1-musl.patch"; + sha256 = "0dd7xxikib201i99k2if066hh7gwf2i4ffckrjplq6lr206jn00r"; + }); + + enableParallelBuilding = true; + + nativeBuildInputs = [ autoreconfHook bison flex pkgconfig file ] + ++ lib.optional pythonSupport swig; + + postBuild = lib.optionalString (pythonSupport) '' + cd python + ${python}/bin/python setup.py install --prefix=../pythonlib + cd - + ''; + + postFixup = lib.optionalString pythonSupport '' + mv "pythonlib/" "$py" + ''; + + passthru = { + inherit pythonSupport; + }; + + meta = with lib; { + inherit version; + homepage = http://www.infradead.org/~tgr/libnl/; + description = "Linux Netlink interface library suite"; + license = licenses.lgpl21; + maintainers = with maintainers; [ fpletz ]; + platforms = platforms.linux; + }; +} |