2020-04-06 04:50:15 -07:00
|
|
|
{ stdenv, fetchurl
|
2020-04-06 04:51:21 -07:00
|
|
|
, buildPackages, bison, flex, pkg-config
|
2020-04-06 04:50:15 -07:00
|
|
|
, db, iptables, libelf, libmnl
|
|
|
|
}:
|
2006-02-16 08:25:03 -08:00
|
|
|
|
2009-07-23 14:34:53 -07:00
|
|
|
stdenv.mkDerivation rec {
|
2019-03-22 12:07:17 -07:00
|
|
|
pname = "iproute2";
|
2020-06-03 05:43:02 -07:00
|
|
|
version = "5.7.0";
|
2007-06-20 06:01:59 -07:00
|
|
|
|
2015-02-06 12:51:53 -08:00
|
|
|
src = fetchurl {
|
2019-03-22 12:07:17 -07:00
|
|
|
url = "mirror://kernel/linux/utils/net/${pname}/${pname}-${version}.tar.xz";
|
2020-06-03 05:43:02 -07:00
|
|
|
sha256 = "088gs56iqhdlpw1iqjwrss4zxd4zbl2wl8s2implrrdajjxcfpbj";
|
2006-02-16 08:25:03 -08:00
|
|
|
};
|
2011-02-24 04:04:00 -08:00
|
|
|
|
2014-10-19 15:50:48 -07:00
|
|
|
preConfigure = ''
|
2020-04-06 04:50:15 -07:00
|
|
|
# Don't try to create /var/lib/arpd:
|
2014-10-19 15:50:48 -07:00
|
|
|
sed -e '/ARPDDIR/d' -i Makefile
|
|
|
|
'';
|
2012-10-11 12:38:54 -07:00
|
|
|
|
2019-10-03 12:09:00 -07:00
|
|
|
outputs = [ "out" "dev" ];
|
2018-09-12 05:55:03 -07:00
|
|
|
|
2014-10-19 15:50:48 -07:00
|
|
|
makeFlags = [
|
2020-04-06 04:50:15 -07:00
|
|
|
"PREFIX=$(out)"
|
2014-10-19 15:50:48 -07:00
|
|
|
"SBINDIR=$(out)/sbin"
|
2019-03-22 12:07:17 -07:00
|
|
|
"DOCDIR=$(TMPDIR)/share/doc/${pname}" # Don't install docs
|
2018-09-12 05:55:03 -07:00
|
|
|
"HDRDIR=$(dev)/include/iproute2"
|
2014-10-19 15:50:48 -07:00
|
|
|
];
|
2012-10-11 12:38:54 -07:00
|
|
|
|
2015-07-27 09:24:33 -07:00
|
|
|
buildFlags = [
|
2018-09-01 11:28:23 -07:00
|
|
|
"CONFDIR=/etc/iproute2"
|
2015-07-27 09:24:33 -07:00
|
|
|
];
|
|
|
|
|
|
|
|
installFlags = [
|
2015-07-28 02:44:18 -07:00
|
|
|
"CONFDIR=$(out)/etc/iproute2"
|
2015-07-27 09:24:33 -07:00
|
|
|
];
|
|
|
|
|
2020-04-06 04:51:21 -07:00
|
|
|
depsBuildBuild = [ buildPackages.stdenv.cc ]; # netem requires $HOSTCC
|
2020-04-06 04:50:15 -07:00
|
|
|
nativeBuildInputs = [ bison flex pkg-config ];
|
2020-02-25 14:28:46 -08:00
|
|
|
buildInputs = [ db iptables libelf libmnl ];
|
2012-10-11 12:38:54 -07:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2009-01-03 07:13:19 -08:00
|
|
|
|
2014-10-19 15:50:48 -07:00
|
|
|
meta = with stdenv.lib; {
|
2020-04-06 04:50:15 -07:00
|
|
|
homepage = "https://wiki.linuxfoundation.org/networking/iproute2";
|
2012-10-11 12:38:54 -07:00
|
|
|
description = "A collection of utilities for controlling TCP/IP networking and traffic control in Linux";
|
2014-10-19 15:50:48 -07:00
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.gpl2;
|
2019-08-20 10:36:05 -07:00
|
|
|
maintainers = with maintainers; [ primeos eelco fpletz globin ];
|
2010-08-13 16:09:53 -07:00
|
|
|
};
|
2006-02-16 08:25:03 -08:00
|
|
|
}
|