From aa46e1ae342feed39eaf1e63ffadfc69606dafb0 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Mon, 6 Apr 2020 13:50:15 +0200 Subject: [PATCH] iproute: Simplify and improve the expression --- pkgs/os-specific/linux/iproute/default.nix | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/pkgs/os-specific/linux/iproute/default.nix b/pkgs/os-specific/linux/iproute/default.nix index 624644596d94..fd7417839a1e 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 +, bison, flex, pkg-config +, db, iptables, libelf, libmnl +}: stdenv.mkDerivation rec { pname = "iproute2"; @@ -10,7 +13,7 @@ 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 " " " @@ -19,11 +22,8 @@ stdenv.mkDerivation rec { 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 +36,13 @@ stdenv.mkDerivation rec { "CONFDIR=$(out)/etc/iproute2" ]; + 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;