2017-02-15 10:04:35 +00:00
|
|
|
{ stdenv, fetchurl
|
2018-07-17 21:11:16 +01:00
|
|
|
, sysfsutils, gnutls, openssl
|
2017-08-11 10:40:08 +01:00
|
|
|
, libcap, opensp, docbook_sgml_dtd_31
|
2017-02-15 10:04:35 +00:00
|
|
|
, libidn, nettle
|
2016-05-13 02:53:37 +01:00
|
|
|
, SGMLSpm, libgcrypt }:
|
2004-08-05 20:30:00 +01:00
|
|
|
|
2013-03-18 11:21:00 +00:00
|
|
|
let
|
2017-02-15 10:04:35 +00:00
|
|
|
time = "20161105";
|
2013-03-18 11:21:00 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "iputils-${time}";
|
2013-06-04 13:18:55 +01:00
|
|
|
|
2004-08-05 20:30:00 +01:00
|
|
|
src = fetchurl {
|
2017-02-15 10:04:35 +00:00
|
|
|
url = "https://github.com/iputils/iputils/archive/s${time}.tar.gz";
|
|
|
|
sha256 = "12mdmh4qbf5610csaw3rkzhpzf6djndi4jsl4gyr8wni0cphj4zq";
|
2004-08-05 20:30:00 +01:00
|
|
|
};
|
|
|
|
|
2013-03-18 14:07:03 +00:00
|
|
|
prePatch = ''
|
2017-08-11 10:40:08 +01:00
|
|
|
sed -e s/sgmlspl/sgmlspl.pl/ \
|
|
|
|
-e s/nsgmls/onsgmls/ \
|
|
|
|
-i doc/Makefile
|
2013-03-18 14:07:03 +00:00
|
|
|
'';
|
2011-02-02 16:05:18 +00:00
|
|
|
|
2018-01-14 07:02:05 +00:00
|
|
|
# Disable idn usage w/musl: https://github.com/iputils/iputils/pull/111
|
|
|
|
makeFlags = [ "USE_GNUTLS=no" ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl "USE_IDN=no";
|
2013-06-04 13:18:55 +01:00
|
|
|
|
2018-02-27 23:11:17 +00:00
|
|
|
depsBuildBuild = [ opensp SGMLSpm docbook_sgml_dtd_31 ];
|
2016-05-13 02:53:37 +01:00
|
|
|
buildInputs = [
|
2018-07-17 21:11:16 +01:00
|
|
|
sysfsutils openssl libcap libgcrypt nettle
|
2018-01-14 07:02:05 +00:00
|
|
|
] ++ stdenv.lib.optional (!stdenv.hostPlatform.isMusl) libidn;
|
2013-03-18 14:07:03 +00:00
|
|
|
|
2018-02-27 23:11:17 +00:00
|
|
|
# ninfod probably could build on cross, but the Makefile doesn't pass --host etc to the sub configure...
|
|
|
|
buildFlags = "man all" + stdenv.lib.optionalString (!stdenv.isCross) " ninfod";
|
2013-03-18 14:07:03 +00:00
|
|
|
|
2011-02-02 16:05:18 +00:00
|
|
|
installPhase =
|
|
|
|
''
|
2017-02-15 10:04:35 +00:00
|
|
|
mkdir -p $out/bin
|
2018-04-15 09:27:09 +01:00
|
|
|
cp -p ping tracepath clockdiff arping rdisc rarpd $out/bin/
|
2018-02-27 23:11:17 +00:00
|
|
|
if [ -x ninfod/ninfod ]; then
|
|
|
|
cp -p ninfod/ninfod $out/bin
|
|
|
|
fi
|
2013-03-18 14:07:03 +00:00
|
|
|
|
|
|
|
mkdir -p $out/share/man/man8
|
2017-02-15 10:04:35 +00:00
|
|
|
cp -p \
|
2018-04-15 09:27:09 +01:00
|
|
|
doc/clockdiff.8 doc/arping.8 doc/ping.8 doc/rdisc.8 doc/rarpd.8 doc/tracepath.8 doc/ninfod.8 \
|
2016-10-28 19:05:35 +01:00
|
|
|
$out/share/man/man8
|
2011-02-02 16:05:18 +00:00
|
|
|
'';
|
2013-06-04 13:18:55 +01:00
|
|
|
|
2018-04-15 09:27:09 +01:00
|
|
|
meta = with stdenv.lib; {
|
2017-02-15 10:04:35 +00:00
|
|
|
homepage = https://github.com/iputils/iputils;
|
2011-02-02 16:05:18 +00:00
|
|
|
description = "A set of small useful utilities for Linux networking";
|
2018-04-15 09:27:09 +01:00
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ lheckemann ];
|
2011-02-02 16:05:18 +00:00
|
|
|
};
|
2004-08-05 20:30:00 +01:00
|
|
|
}
|