about summary refs log tree commit diff
path: root/pkgs/tools/networking/dhcpdump/default.nix
blob: 4f625d9b13770aff08e6b50c3604ef9627142571 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{ lib
, stdenv
, fetchurl
, perl
, installShellFiles
, libpcap
}:

stdenv.mkDerivation rec {
  pname = "dhcpdump";
  version = "1.8";

  src = fetchurl {
    url = "http://www.mavetju.org/download/dhcpdump-${version}.tar.gz";
    hash = "sha256-bV65QYFi+3OLxW5MFoLOf3OS3ZblaMyZbkTCjef3cZA=";
  };

  strictDeps = true;

  nativeBuildInputs = [
    perl # pod2man
    installShellFiles
  ];

  buildInputs = [
    libpcap
  ];

  hardeningDisable = [ "fortify" ];

  installPhase = ''
    runHook preBuild

    install -Dm555 dhcpdump "$out/bin/dhcpdump"
    installManPage dhcpdump.8

    runHook postBuild
  '';

  meta = with lib; {
    description = "A tool for visualization of DHCP packets as recorded and output by tcpdump to analyze DHCP server responses";
    homepage = "http://www.mavetju.org/unix/dhcpdump-man.php";
    platforms = platforms.linux;
    maintainers = with maintainers; [ nickcao ];
    license = licenses.bsd2;
  };
}