depot/third_party/nixpkgs/pkgs/tools/networking/dhcpdump/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

49 lines
1,022 B
Nix

{ lib
, stdenv
, fetchFromGitHub
, perl
, installShellFiles
, libpcap
}:
stdenv.mkDerivation rec {
pname = "dhcpdump";
version = "1.9";
src = fetchFromGitHub {
owner = "bbonev";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-ck6DLsLQ00unNqPLBKkxaJLDCaPFjTFJcQjTbKSq0U8=";
};
strictDeps = true;
nativeBuildInputs = [
perl # pod2man
installShellFiles
];
buildInputs = [
libpcap
];
installPhase = ''
runHook preBuild
install -Dm555 dhcpdump "$out/bin/dhcpdump"
installManPage dhcpdump.8
runHook postBuild
'';
meta = with lib; {
description = "Tool for visualization of DHCP packets as recorded and output by tcpdump to analyze DHCP server responses";
homepage = "https://github.com/bbonev/dhcpdump";
changelog = "https://github.com/bbonev/dhcpdump/releases/tag/v${version}";
platforms = platforms.linux;
maintainers = with maintainers; [ nickcao ];
license = licenses.bsd2;
mainProgram = "dhcpdump";
};
}