2021-02-19 19:06:45 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub
|
2021-02-05 17:12:51 +00:00
|
|
|
, meson, ninja, pkg-config, gettext, libxslt, docbook_xsl_ns
|
2020-10-19 09:53:12 +00:00
|
|
|
, libcap, libidn2
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2021-02-19 19:06:45 +00:00
|
|
|
version = "20210202";
|
2020-04-24 23:36:52 +00:00
|
|
|
sunAsIsLicense = {
|
|
|
|
fullName = "AS-IS, SUN MICROSYSTEMS license";
|
|
|
|
url = "https://github.com/iputils/iputils/blob/s${version}/rdisc.c";
|
|
|
|
};
|
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
pname = "iputils";
|
|
|
|
inherit version;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
2021-02-19 19:06:45 +00:00
|
|
|
rev = version;
|
|
|
|
sha256 = "08j2hfgnfh31vv9rn1ml7090j2lsvm9wdpdz13rz60rmyzrx9dq3";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
mesonFlags = [
|
|
|
|
"-DBUILD_RARPD=true"
|
|
|
|
"-DBUILD_TRACEROUTE6=true"
|
|
|
|
"-DBUILD_TFTPD=true"
|
|
|
|
"-DNO_SETCAP_OR_SUID=true"
|
|
|
|
"-Dsystemdunitdir=etc/systemd/system"
|
2020-10-19 09:53:12 +00:00
|
|
|
"-DINSTALL_SYSTEMD_UNITS=true"
|
2020-09-25 04:45:31 +00:00
|
|
|
]
|
2020-04-24 23:36:52 +00:00
|
|
|
# Disable idn usage w/musl (https://github.com/iputils/iputils/pull/111):
|
2021-02-19 19:06:45 +00:00
|
|
|
++ lib.optional stdenv.hostPlatform.isMusl "-DUSE_IDN=false";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ meson ninja pkg-config gettext libxslt.bin docbook_xsl_ns ];
|
2020-10-19 09:53:12 +00:00
|
|
|
buildInputs = [ libcap ]
|
2021-02-19 19:06:45 +00:00
|
|
|
++ lib.optional (!stdenv.hostPlatform.isMusl) libidn2;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-19 19:06:45 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A set of small useful utilities for Linux networking";
|
2020-09-25 04:45:31 +00:00
|
|
|
inherit (src.meta) homepage;
|
|
|
|
changelog = "https://github.com/iputils/iputils/releases/tag/s${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = with licenses; [ gpl2Plus bsd3 sunAsIsLicense ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ primeos lheckemann ];
|
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
A set of small useful utilities for Linux networking including:
|
|
|
|
|
|
|
|
arping
|
|
|
|
clockdiff
|
|
|
|
ninfod
|
|
|
|
ping
|
|
|
|
rarpd
|
|
|
|
rdisc
|
|
|
|
tftpd
|
|
|
|
tracepath
|
|
|
|
traceroute6
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|