nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 20.09 61 lines 1.6 kB view raw
1{ stdenv, fetchFromGitHub 2, meson, ninja, pkgconfig, gettext, libxslt, docbook_xsl_ns 3, libcap, systemd, libidn2 4}: 5 6with stdenv.lib; 7 8let 9 version = "20200821"; 10 sunAsIsLicense = { 11 fullName = "AS-IS, SUN MICROSYSTEMS license"; 12 url = "https://github.com/iputils/iputils/blob/s${version}/rdisc.c"; 13 }; 14in stdenv.mkDerivation rec { 15 pname = "iputils"; 16 inherit version; 17 18 src = fetchFromGitHub { 19 owner = pname; 20 repo = pname; 21 rev = "s${version}"; 22 sha256 = "1jhbcz75a4ij1myyyi110ma1d8d5hpm3scz9pyw7js6qym50xvh4"; 23 }; 24 25 mesonFlags = [ 26 "-DBUILD_RARPD=true" 27 "-DBUILD_TRACEROUTE6=true" 28 "-DBUILD_TFTPD=true" 29 "-DNO_SETCAP_OR_SUID=true" 30 "-Dsystemdunitdir=etc/systemd/system" 31 ] 32 # Disable idn usage w/musl (https://github.com/iputils/iputils/pull/111): 33 ++ optional stdenv.hostPlatform.isMusl "-DUSE_IDN=false"; 34 35 nativeBuildInputs = [ meson ninja pkgconfig gettext libxslt.bin docbook_xsl_ns ]; 36 buildInputs = [ libcap systemd ] 37 ++ optional (!stdenv.hostPlatform.isMusl) libidn2; 38 39 meta = { 40 description = "A set of small useful utilities for Linux networking"; 41 inherit (src.meta) homepage; 42 changelog = "https://github.com/iputils/iputils/releases/tag/s${version}"; 43 license = with licenses; [ gpl2Plus bsd3 sunAsIsLicense ]; 44 platforms = platforms.linux; 45 maintainers = with maintainers; [ primeos lheckemann ]; 46 47 longDescription = '' 48 A set of small useful utilities for Linux networking including: 49 50 arping 51 clockdiff 52 ninfod 53 ping 54 rarpd 55 rdisc 56 tftpd 57 tracepath 58 traceroute6 59 ''; 60 }; 61}