Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 stdenv,
4 fetchurl,
5 libpcap,
6 pkg-config,
7 perl,
8}:
9
10stdenv.mkDerivation rec {
11 pname = "tcpdump";
12 version = "4.99.5";
13
14 src = fetchurl {
15 url = "https://www.tcpdump.org/release/tcpdump-${version}.tar.gz";
16 hash = "sha256-jHWFbgCt3urfcNrWfJ/z3TaFNrK4Vjq/aFTXx2TNOts=";
17 };
18
19 postPatch = ''
20 patchShebangs tests
21 '';
22
23 nativeBuildInputs = [ pkg-config ];
24
25 nativeCheckInputs = [ perl ];
26
27 buildInputs = [ libpcap ];
28
29 configureFlags = lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "ac_cv_linux_vers=2";
30
31 meta = with lib; {
32 description = "Network sniffer";
33 homepage = "https://www.tcpdump.org/";
34 license = licenses.bsd3;
35 maintainers = with maintainers; [ globin ];
36 platforms = platforms.unix;
37 mainProgram = "tcpdump";
38 };
39}