2023-06-21 10:39:32 +02:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2023-06-24 04:52:09 +02:00
|
|
|
, fetchFromGitHub
|
2023-06-21 10:39:32 +02:00
|
|
|
, perl
|
|
|
|
, installShellFiles
|
|
|
|
, libpcap
|
|
|
|
}:
|
2015-02-05 14:52:14 +01:00
|
|
|
|
2021-08-01 22:48:53 +02:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "dhcpdump";
|
2023-06-24 04:52:09 +02:00
|
|
|
version = "1.9";
|
2015-02-05 14:52:14 +01:00
|
|
|
|
2023-06-24 04:52:09 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bbonev";
|
|
|
|
repo = pname;
|
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-ck6DLsLQ00unNqPLBKkxaJLDCaPFjTFJcQjTbKSq0U8=";
|
2015-02-05 14:52:14 +01:00
|
|
|
};
|
|
|
|
|
2023-06-21 10:39:32 +02:00
|
|
|
strictDeps = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
perl # pod2man
|
|
|
|
installShellFiles
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libpcap
|
|
|
|
];
|
2015-02-05 14:52:14 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
2023-06-21 10:39:32 +02:00
|
|
|
runHook preBuild
|
|
|
|
|
|
|
|
install -Dm555 dhcpdump "$out/bin/dhcpdump"
|
|
|
|
installManPage dhcpdump.8
|
|
|
|
|
|
|
|
runHook postBuild
|
2015-02-05 14:52:14 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2015-02-05 14:52:14 +01:00
|
|
|
description = "A tool for visualization of DHCP packets as recorded and output by tcpdump to analyze DHCP server responses";
|
2023-06-24 04:52:09 +02:00
|
|
|
homepage = "https://github.com/bbonev/dhcpdump";
|
|
|
|
changelog = "https://github.com/bbonev/dhcpdump/releases/tag/v${version}";
|
2018-09-10 21:20:19 +02:00
|
|
|
platforms = platforms.linux;
|
2023-06-21 10:44:12 +02:00
|
|
|
maintainers = with maintainers; [ nickcao ];
|
2018-09-10 21:20:19 +02:00
|
|
|
license = licenses.bsd2;
|
2024-02-11 03:19:15 +01:00
|
|
|
mainProgram = "dhcpdump";
|
2015-02-05 14:52:14 +01:00
|
|
|
};
|
|
|
|
}
|