nixpkgs/pkgs/os-specific/linux/iproute/default.nix
Michael Weiss 05ad8cf209
iproute: 5.1.0 -> 5.2.0
"Not a lot of big new features in this release. Just the usual array of
small fixes across the board." [0]

File changes:
None

nix path-info -S:
5.1.0 46637048
5.2.0 46627312

[0]: https://www.spinics.net/lists/netdev/msg584562.html
2019-07-08 23:26:34 +02:00

56 lines
1.5 KiB
Nix

{ fetchurl, stdenv, flex, bash, bison, db, iptables, pkgconfig, libelf }:
stdenv.mkDerivation rec {
pname = "iproute2";
version = "5.2.0";
src = fetchurl {
url = "mirror://kernel/linux/utils/net/${pname}/${pname}-${version}.tar.xz";
sha256 = "1a2dywa2kam24951byv9pl32mb9z6klh7d4vp8fwfgrm4vn5vfd5";
};
preConfigure = ''
patchShebangs ./configure
sed -e '/ARPDDIR/d' -i Makefile
# Don't build netem tools--they're not installed and require HOSTCC
substituteInPlace Makefile --replace " netem " " "
'';
outputs = [ "out" "dev"];
makeFlags = [
"DESTDIR="
"LIBDIR=$(out)/lib"
"SBINDIR=$(out)/sbin"
"MANDIR=$(out)/share/man"
"BASH_COMPDIR=$(out)/share/bash-completion/completions"
"DOCDIR=$(TMPDIR)/share/doc/${pname}" # Don't install docs
"HDRDIR=$(dev)/include/iproute2"
];
buildFlags = [
"CONFDIR=/etc/iproute2"
];
installFlags = [
"CONFDIR=$(out)/etc/iproute2"
];
buildInputs = [ db iptables libelf ];
nativeBuildInputs = [ bison flex pkgconfig ];
enableParallelBuilding = true;
postInstall = ''
PATH=${bash}/bin:$PATH patchShebangs $out/sbin
'';
meta = with stdenv.lib; {
homepage = https://wiki.linuxfoundation.org/networking/iproute2;
description = "A collection of utilities for controlling TCP/IP networking and traffic control in Linux";
platforms = platforms.linux;
license = licenses.gpl2;
maintainers = with maintainers; [ primeos eelco fpletz ];
};
}