iproute: Simplify and improve the expression

This commit is contained in:
Michael Weiss 2020-04-06 13:50:15 +02:00
parent 91a20dac08
commit aa46e1ae34
No known key found for this signature in database
GPG Key ID: 5BE487C4D4771D83

@ -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;