nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 50 lines 1.0 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 perl, 6 installShellFiles, 7 libpcap, 8}: 9 10stdenv.mkDerivation rec { 11 pname = "dhcpdump"; 12 version = "1.9"; 13 14 src = fetchFromGitHub { 15 owner = "bbonev"; 16 repo = "dhcpdump"; 17 tag = "v${version}"; 18 hash = "sha256-ck6DLsLQ00unNqPLBKkxaJLDCaPFjTFJcQjTbKSq0U8="; 19 }; 20 21 strictDeps = true; 22 23 nativeBuildInputs = [ 24 perl # pod2man 25 installShellFiles 26 ]; 27 28 buildInputs = [ 29 libpcap 30 ]; 31 32 installPhase = '' 33 runHook preInstall 34 35 install -Dm555 dhcpdump "$out/bin/dhcpdump" 36 installManPage dhcpdump.8 37 38 runHook postInstall 39 ''; 40 41 meta = { 42 description = "Tool for visualization of DHCP packets as recorded and output by tcpdump to analyze DHCP server responses"; 43 homepage = "https://github.com/bbonev/dhcpdump"; 44 changelog = "https://github.com/bbonev/dhcpdump/releases/tag/v${version}"; 45 platforms = lib.platforms.linux; 46 maintainers = with lib.maintainers; [ nickcao ]; 47 license = lib.licenses.bsd2; 48 mainProgram = "dhcpdump"; 49 }; 50}