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