2018-08-18 20:06:49 +02:00
|
|
|
{ stdenv, fetchFromGitHub, fetchpatch
|
2019-03-24 20:00:28 +01:00
|
|
|
, meson, ninja, pkgconfig, gettext, libxslt, docbook_xsl_ns
|
|
|
|
, libcap, nettle, libidn2, openssl, systemd
|
2018-08-18 20:06:49 +02:00
|
|
|
}:
|
2004-08-05 21:30:00 +02:00
|
|
|
|
2018-09-02 12:40:46 +02:00
|
|
|
with stdenv.lib;
|
|
|
|
|
2013-03-18 12:21:00 +01:00
|
|
|
let
|
2019-05-15 23:33:04 +02:00
|
|
|
time = "20190515";
|
2018-09-02 12:40:46 +02:00
|
|
|
# ninfod probably could build on cross, but the Makefile doesn't pass --host
|
|
|
|
# etc to the sub configure...
|
|
|
|
withNinfod = stdenv.hostPlatform == stdenv.buildPlatform;
|
|
|
|
sunAsIsLicense = {
|
|
|
|
fullName = "AS-IS, SUN MICROSYSTEMS license";
|
|
|
|
url = "https://github.com/iputils/iputils/blob/s${time}/rdisc.c";
|
|
|
|
};
|
|
|
|
in stdenv.mkDerivation {
|
2013-03-18 12:21:00 +01:00
|
|
|
name = "iputils-${time}";
|
2013-06-04 14:18:55 +02:00
|
|
|
|
2018-08-18 20:06:49 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "iputils";
|
|
|
|
repo = "iputils";
|
|
|
|
rev = "s${time}";
|
2019-05-15 23:33:04 +02:00
|
|
|
sha256 = "1k2wzgk0d47d1g9k8c1a5l24ml8h8xxz1vrs0vfbyxr7qghdhn4i";
|
2004-08-05 21:30:00 +02:00
|
|
|
};
|
|
|
|
|
2019-03-24 20:00:28 +01:00
|
|
|
# ninfod cannot be build with nettle yet:
|
|
|
|
patches =
|
|
|
|
[ ./build-ninfod-with-openssl.patch
|
2019-05-15 23:33:04 +02:00
|
|
|
(fetchpatch { # build-sys/doc: Fix the dependency on xsltproc
|
|
|
|
url = "https://github.com/iputils/iputils/commit/3b013f271931c3fe771e5a2c591f35d617de90f3.patch";
|
|
|
|
sha256 = "0ilhlgiqdflry7km3ik8i4h1yymm5f5zmwyl5r029q7x1p8kinfw";
|
2019-03-24 20:00:28 +01:00
|
|
|
})
|
2019-05-15 23:33:04 +02:00
|
|
|
(fetchpatch { # build-sys: Make setcap really optional
|
|
|
|
url = "https://github.com/iputils/iputils/commit/473be6467f995865244e7e68b2fa587a4ee79551.patch";
|
|
|
|
sha256 = "0781147qaf0jwa177jbmh474r8hqs0jwgi5vgx9csb43jzdm8hqf";
|
2019-03-24 20:00:28 +01:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
mesonFlags =
|
|
|
|
[ "-DUSE_CRYPTO=nettle"
|
|
|
|
"-DBUILD_RARPD=true"
|
|
|
|
"-DBUILD_TRACEROUTE6=true"
|
2019-05-15 23:33:04 +02:00
|
|
|
"-DNO_SETCAP_OR_SUID=true"
|
2019-03-24 20:00:28 +01:00
|
|
|
"-Dsystemdunitdir=etc/systemd/system"
|
|
|
|
]
|
|
|
|
++ optional (!withNinfod) "-DBUILD_NINFOD=false"
|
|
|
|
# Disable idn usage w/musl (https://github.com/iputils/iputils/pull/111):
|
|
|
|
++ optional stdenv.hostPlatform.isMusl "-DUSE_IDN=false";
|
|
|
|
|
2019-05-15 23:33:04 +02:00
|
|
|
nativeBuildInputs = [ meson ninja pkgconfig gettext libxslt.bin docbook_xsl_ns ];
|
2019-03-24 20:00:28 +01:00
|
|
|
buildInputs = [ libcap nettle systemd ]
|
2018-09-02 12:40:46 +02:00
|
|
|
++ optional (!stdenv.hostPlatform.isMusl) libidn2
|
|
|
|
++ optional withNinfod openssl; # TODO: Build with nettle
|
2013-03-18 15:07:03 +01:00
|
|
|
|
2018-09-02 12:40:46 +02:00
|
|
|
meta = {
|
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-09-02 12:40:46 +02:00
|
|
|
license = with licenses; [ gpl2Plus bsd3 sunAsIsLicense ];
|
2018-04-15 10:27:09 +02:00
|
|
|
platforms = platforms.linux;
|
2018-08-18 20:06:49 +02:00
|
|
|
maintainers = with maintainers; [ primeos lheckemann ];
|
2019-07-15 08:30:16 +02:00
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
A set of small useful utilities for Linux networking including:
|
|
|
|
|
|
|
|
arping
|
|
|
|
clockdiff
|
|
|
|
ninfod
|
|
|
|
ping
|
|
|
|
rarpd
|
|
|
|
rdisc
|
|
|
|
tftpd
|
|
|
|
tracepath
|
|
|
|
traceroute6
|
|
|
|
'';
|
2011-02-02 17:05:18 +01:00
|
|
|
};
|
2004-08-05 21:30:00 +02:00
|
|
|
}
|