Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 48 lines 1.1 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 fetchpatch, 6}: 7 8stdenv.mkDerivation rec { 9 pname = "net-tools"; 10 version = "2.10"; 11 12 src = fetchurl { 13 url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.xz"; 14 sha256 = "sha256-smJDWlJB6Jv6UcPKvVEzdTlS96e3uT8y4Iy52W9YDWk="; 15 }; 16 17 patches = [ 18 (fetchpatch { 19 name = "CVE-2025-46836.patch"; 20 url = "https://github.com/ecki/net-tools/commit/7a8f42fb20013a1493d8cae1c43436f85e656f2d.patch"; 21 hash = "sha256-2R9giETNN3e2t1DPQj0kb4uYCXpkBxnF8grWIBLM7s0="; 22 }) 23 ]; 24 25 preBuild = '' 26 cp ${./config.h} config.h 27 ''; 28 29 makeFlags = [ 30 "CC=${stdenv.cc.targetPrefix}cc" 31 "AR=${stdenv.cc.targetPrefix}ar" 32 "BASEDIR=$(out)" 33 "mandir=/share/man" 34 "HAVE_ARP_TOOLS=1" 35 "HAVE_PLIP_TOOLS=1" 36 "HAVE_SERIAL_TOOLS=1" 37 "HAVE_HOSTNAME_TOOLS=1" 38 "HAVE_HOSTNAME_SYMLINKS=1" 39 "HAVE_MII=1" 40 ]; 41 42 meta = { 43 homepage = "http://net-tools.sourceforge.net/"; 44 description = "Set of tools for controlling the network subsystem in Linux"; 45 license = lib.licenses.gpl2Plus; 46 platforms = lib.platforms.linux; 47 }; 48}