2018-08-18 18:06:49 +00:00
|
|
|
{ stdenv, fetchFromGitHub, fetchpatch
|
2019-03-24 19:00:28 +00:00
|
|
|
, meson, ninja, pkgconfig, gettext, libxslt, docbook_xsl_ns
|
|
|
|
, libcap, nettle, libidn2, openssl, systemd
|
2018-08-18 18:06:49 +00:00
|
|
|
}:
|
2004-08-05 19:30:00 +00:00
|
|
|
|
2018-09-02 10:40:46 +00:00
|
|
|
with stdenv.lib;
|
|
|
|
|
2013-03-18 11:21:00 +00:00
|
|
|
let
|
2019-03-24 19:00:28 +00:00
|
|
|
time = "20190324";
|
2018-09-02 10:40:46 +00: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 11:21:00 +00:00
|
|
|
name = "iputils-${time}";
|
2013-06-04 12:18:55 +00:00
|
|
|
|
2018-08-18 18:06:49 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "iputils";
|
|
|
|
repo = "iputils";
|
|
|
|
rev = "s${time}";
|
2019-03-24 19:00:28 +00:00
|
|
|
sha256 = "0b755gv3370c0rrphx14mrsqjb396zqnsm9lsws842a4k4zrqmvi";
|
2004-08-05 19:30:00 +00:00
|
|
|
};
|
|
|
|
|
2019-03-24 19:00:28 +00:00
|
|
|
# ninfod cannot be build with nettle yet:
|
|
|
|
patches =
|
|
|
|
[ ./build-ninfod-with-openssl.patch
|
|
|
|
(fetchpatch { # tracepath: fix musl build, again
|
|
|
|
url = "https://github.com/iputils/iputils/commit/c9aca1b53324bcd1b5a2de5c645813f80eccd016.patch";
|
|
|
|
sha256 = "0faqgkqbi57cyx1zgzzy6xgd24xr0iawix7mjs47j92ra9gw90cz";
|
|
|
|
})
|
|
|
|
(fetchpatch { # doc: Use namespace correctly
|
|
|
|
url = "https://github.com/iputils/iputils/commit/c503834519d21973323980850431101f90e663ef.patch";
|
|
|
|
sha256 = "1yp6b6403ddccbhfzsb36cscxd36d4xb8syc1g02a18xkswiwf09";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
mesonFlags =
|
|
|
|
[ "-DUSE_CRYPTO=nettle"
|
|
|
|
"-DBUILD_RARPD=true"
|
|
|
|
"-DBUILD_TRACEROUTE6=true"
|
|
|
|
"-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";
|
|
|
|
|
|
|
|
nativeBuildInputs = [ meson ninja pkgconfig gettext libxslt.bin docbook_xsl_ns libcap ];
|
|
|
|
buildInputs = [ libcap nettle systemd ]
|
2018-09-02 10:40:46 +00:00
|
|
|
++ optional (!stdenv.hostPlatform.isMusl) libidn2
|
|
|
|
++ optional withNinfod openssl; # TODO: Build with nettle
|
2013-03-18 14:07:03 +00:00
|
|
|
|
2018-09-02 10:40:46 +00:00
|
|
|
meta = {
|
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-09-02 10:40:46 +00:00
|
|
|
license = with licenses; [ gpl2Plus bsd3 sunAsIsLicense ];
|
2018-04-15 08:27:09 +00:00
|
|
|
platforms = platforms.linux;
|
2018-08-18 18:06:49 +00:00
|
|
|
maintainers = with maintainers; [ primeos lheckemann ];
|
2011-02-02 16:05:18 +00:00
|
|
|
};
|
2004-08-05 19:30:00 +00:00
|
|
|
}
|