summary refs log tree commit diff
path: root/pkgs/os-specific/linux/iproute
diff options
context:
space:
mode:
authorMichael Weiss <dev.primeos@gmail.com>2020-04-08 19:05:59 +0200
committerGitHub <noreply@github.com>2020-04-08 19:05:59 +0200
commitb7bf29993b5963f810d9d06b55fb85b0be626c1d (patch)
treec98a2ac373de180574a25e1796740ecab5341b26 /pkgs/os-specific/linux/iproute
parentfd85e86232e36435c760929786ecadb9b855e996 (diff)
parent94f2a76718d30acee9fe16ae8c7b24f349c3cd75 (diff)
downloadnixpkgs-b7bf29993b5963f810d9d06b55fb85b0be626c1d.tar
nixpkgs-b7bf29993b5963f810d9d06b55fb85b0be626c1d.tar.gz
nixpkgs-b7bf29993b5963f810d9d06b55fb85b0be626c1d.tar.bz2
nixpkgs-b7bf29993b5963f810d9d06b55fb85b0be626c1d.tar.lz
nixpkgs-b7bf29993b5963f810d9d06b55fb85b0be626c1d.tar.xz
nixpkgs-b7bf29993b5963f810d9d06b55fb85b0be626c1d.tar.zst
nixpkgs-b7bf29993b5963f810d9d06b55fb85b0be626c1d.zip
Merge pull request #82298 from Ralith/netem
iproute: include netem tools
Diffstat (limited to 'pkgs/os-specific/linux/iproute')
-rw-r--r--pkgs/os-specific/linux/iproute/default.nix23
1 files changed, 9 insertions, 14 deletions
diff --git a/pkgs/os-specific/linux/iproute/default.nix b/pkgs/os-specific/linux/iproute/default.nix
index a6b2d4362bc..46312a637da 100644
--- a/pkgs/os-specific/linux/iproute/default.nix
+++ b/pkgs/os-specific/linux/iproute/default.nix
@@ -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 {
   pname = "iproute2";
@@ -10,20 +13,15 @@ stdenv.mkDerivation rec {
   };
 
   preConfigure = ''
-    patchShebangs ./configure
+    # Don't try to create /var/lib/arpd:
     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"
+    "PREFIX=$(out)"
     "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"
   ];
@@ -36,17 +34,14 @@ stdenv.mkDerivation rec {
     "CONFDIR=$(out)/etc/iproute2"
   ];
 
+  depsBuildBuild = [ buildPackages.stdenv.cc ]; # netem requires $HOSTCC
+  nativeBuildInputs = [ bison flex pkg-config ];
   buildInputs = [ db iptables libelf libmnl ];
-  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;
+    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;