nixpkgs/pkgs/os-specific/linux/iputils/default.nix
Will Dietz d5dc9a2140 iputils: 20190515 -> 20190709
https://github.com/iputils/iputils/releases/tag/s20190709

See release notes for details,
but of particular note is that
this expression is now quite simpler
due to the following:

* ninfod now builds w/nettle!
* update includes patches we fetched from upstream
* cross should be handled now, during move to meson
  * prelim testing confirms, meson makes it much easier
    to get things right re:explanation given in comment
    (not propagating host/target info)
* issue re:musl+idn2 appears resolved re:compilation,
  but results in unclear runtime errors regarding
  "invalid flags".  Keep disabled as before as this
  is clearer at the expression level and reports
  failure to resolve instead which is a bit clearer.
  (testing with systemd-less iputils)

This also means our iputils is openssl-free,
which if nothing else is a nice reduction in trans. size :).
(quick imperfect comparison shows:
  39MB -> 35MB w/glibc
  11.4 -> 7.9 w/musl
)

iputils: nvm no IDN w/musl

iputils: nvm keep idn disabled w/musl
2019-07-17 10:31:17 +02:00

60 lines
1.6 KiB
Nix

{ stdenv, fetchFromGitHub, fetchpatch
, meson, ninja, pkgconfig, gettext, libxslt, docbook_xsl_ns
, libcap, nettle, libidn2, systemd
}:
with stdenv.lib;
let
version = "20190709";
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;
rev = "s${version}";
sha256 = "04bp4af15adp79ipxmiakfp0ij6hx5qam266flzbr94pr8z8l693";
};
mesonFlags =
[ "-DUSE_CRYPTO=nettle"
"-DBUILD_RARPD=true"
"-DBUILD_TRACEROUTE6=true"
"-DNO_SETCAP_OR_SUID=true"
"-Dsystemdunitdir=etc/systemd/system"
]
# 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 ];
buildInputs = [ libcap nettle systemd ]
++ optional (!stdenv.hostPlatform.isMusl) libidn2;
meta = {
homepage = https://github.com/iputils/iputils;
description = "A set of small useful utilities for Linux networking";
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
'';
};
}