2021-01-15 14:45:37 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch
|
2021-01-19 06:50:56 +00:00
|
|
|
, meson, ninja, pkg-config, gettext, libxslt, docbook_xsl_ns
|
2020-10-19 19:41:53 +00:00
|
|
|
, libcap, libidn2
|
2018-08-18 18:06:49 +00:00
|
|
|
}:
|
2004-08-05 19:30:00 +00:00
|
|
|
|
2021-01-15 14:45:37 +00:00
|
|
|
with lib;
|
2018-09-02 10:40:46 +00:00
|
|
|
|
2013-03-18 11:21:00 +00:00
|
|
|
let
|
2020-08-21 18:47:08 +00:00
|
|
|
version = "20200821";
|
2018-09-02 10:40:46 +00:00
|
|
|
sunAsIsLicense = {
|
|
|
|
fullName = "AS-IS, SUN MICROSYSTEMS license";
|
2019-07-09 23:45:21 +00:00
|
|
|
url = "https://github.com/iputils/iputils/blob/s${version}/rdisc.c";
|
2018-09-02 10:40:46 +00:00
|
|
|
};
|
2019-07-09 23:45:21 +00:00
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
pname = "iputils";
|
|
|
|
inherit version;
|
2013-06-04 12:18:55 +00:00
|
|
|
|
2018-08-18 18:06:49 +00:00
|
|
|
src = fetchFromGitHub {
|
2019-07-09 23:45:21 +00:00
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
|
|
|
rev = "s${version}";
|
2020-08-21 18:47:08 +00:00
|
|
|
sha256 = "1jhbcz75a4ij1myyyi110ma1d8d5hpm3scz9pyw7js6qym50xvh4";
|
2004-08-05 19:30:00 +00:00
|
|
|
};
|
|
|
|
|
2020-10-19 20:02:46 +00:00
|
|
|
patches = [
|
|
|
|
# Proposed upstream patch to reduce dependency on systemd: https://github.com/iputils/iputils/pull/297
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/iputils/iputils/commit/13d6aefd57fd471ecad06e19073dcc44608dff5e.patch";
|
|
|
|
sha256 = "1n62zxmzp7hgz9qapbbpqv3fxqvc3qyd2a73jhp357x6by84kj49";
|
|
|
|
})
|
|
|
|
];
|
2020-10-19 19:41:53 +00:00
|
|
|
|
2020-08-21 18:47:08 +00:00
|
|
|
mesonFlags = [
|
|
|
|
"-DBUILD_RARPD=true"
|
|
|
|
"-DBUILD_TRACEROUTE6=true"
|
|
|
|
"-DBUILD_TFTPD=true"
|
|
|
|
"-DNO_SETCAP_OR_SUID=true"
|
|
|
|
"-Dsystemdunitdir=etc/systemd/system"
|
2020-10-19 20:02:46 +00:00
|
|
|
"-DINSTALL_SYSTEMD_UNITS=true"
|
2020-08-21 18:47:08 +00:00
|
|
|
]
|
2019-03-24 19:00:28 +00:00
|
|
|
# Disable idn usage w/musl (https://github.com/iputils/iputils/pull/111):
|
|
|
|
++ optional stdenv.hostPlatform.isMusl "-DUSE_IDN=false";
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ meson ninja pkg-config gettext libxslt.bin docbook_xsl_ns ];
|
2020-10-19 19:41:53 +00:00
|
|
|
buildInputs = [ libcap ]
|
2019-07-09 23:45:21 +00:00
|
|
|
++ optional (!stdenv.hostPlatform.isMusl) libidn2;
|
2013-03-18 14:07:03 +00:00
|
|
|
|
2018-09-02 10:40:46 +00:00
|
|
|
meta = {
|
2011-02-02 16:05:18 +00:00
|
|
|
description = "A set of small useful utilities for Linux networking";
|
2020-08-21 18:47:08 +00:00
|
|
|
inherit (src.meta) homepage;
|
|
|
|
changelog = "https://github.com/iputils/iputils/releases/tag/s${version}";
|
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 ];
|
2019-07-15 06:30:16 +00:00
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
A set of small useful utilities for Linux networking including:
|
|
|
|
|
|
|
|
arping
|
|
|
|
clockdiff
|
|
|
|
ninfod
|
|
|
|
ping
|
|
|
|
rarpd
|
|
|
|
rdisc
|
|
|
|
tftpd
|
|
|
|
tracepath
|
|
|
|
traceroute6
|
|
|
|
'';
|
2011-02-02 16:05:18 +00:00
|
|
|
};
|
2004-08-05 19:30:00 +00:00
|
|
|
}
|