Merge pull request #82298 from Ralith/netem
iproute: include netem tools
This commit is contained in:
commit
b7bf29993b
@ -1,4 +1,7 @@
|
|||||||
{ fetchurl, stdenv, flex, bash, bison, db, iptables, pkgconfig, libelf, libmnl }:
|
{ stdenv, fetchurl
|
||||||
|
, buildPackages, bison, flex, pkg-config
|
||||||
|
, db, iptables, libelf, libmnl
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "iproute2";
|
pname = "iproute2";
|
||||||
@ -10,20 +13,15 @@ stdenv.mkDerivation rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
patchShebangs ./configure
|
# Don't try to create /var/lib/arpd:
|
||||||
sed -e '/ARPDDIR/d' -i Makefile
|
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" ];
|
outputs = [ "out" "dev" ];
|
||||||
|
|
||||||
makeFlags = [
|
makeFlags = [
|
||||||
"DESTDIR="
|
"PREFIX=$(out)"
|
||||||
"LIBDIR=$(out)/lib"
|
|
||||||
"SBINDIR=$(out)/sbin"
|
"SBINDIR=$(out)/sbin"
|
||||||
"MANDIR=$(out)/share/man"
|
|
||||||
"BASH_COMPDIR=$(out)/share/bash-completion/completions"
|
|
||||||
"DOCDIR=$(TMPDIR)/share/doc/${pname}" # Don't install docs
|
"DOCDIR=$(TMPDIR)/share/doc/${pname}" # Don't install docs
|
||||||
"HDRDIR=$(dev)/include/iproute2"
|
"HDRDIR=$(dev)/include/iproute2"
|
||||||
];
|
];
|
||||||
@ -36,17 +34,14 @@ stdenv.mkDerivation rec {
|
|||||||
"CONFDIR=$(out)/etc/iproute2"
|
"CONFDIR=$(out)/etc/iproute2"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
depsBuildBuild = [ buildPackages.stdenv.cc ]; # netem requires $HOSTCC
|
||||||
|
nativeBuildInputs = [ bison flex pkg-config ];
|
||||||
buildInputs = [ db iptables libelf libmnl ];
|
buildInputs = [ db iptables libelf libmnl ];
|
||||||
nativeBuildInputs = [ bison flex pkgconfig ];
|
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
postInstall = ''
|
|
||||||
PATH=${bash}/bin:$PATH patchShebangs $out/sbin
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = https://wiki.linuxfoundation.org/networking/iproute2;
|
homepage = "https://wiki.linuxfoundation.org/networking/iproute2";
|
||||||
description = "A collection of utilities for controlling TCP/IP networking and traffic control in Linux";
|
description = "A collection of utilities for controlling TCP/IP networking and traffic control in Linux";
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
license = licenses.gpl2;
|
license = licenses.gpl2;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user