1 { lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, pkg-config, libpcap, guile_2_2, openssl }:
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
11 sha256 = "0kfdjgch667gfb3qpiadd2dj3fxc7r19nr620gffb1ahca02wq31";
15 # Pull upstream patch for -fno-common toolchains:
17 name = "fno-common.patch";
18 url = "https://github.com/rixed/junkie/commit/52209c5b0c9a09981739ede9701cd73e82a88ea5.patch";
19 sha256 = "1qg01jinqn5wr2mz77rzaidnrli35di0k7lnx6kfm7dh7v8kxbrr";
23 # IP_DONTFRAG is defined on macOS from Big Sur
24 postPatch = lib.optionalString (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11") ''
25 sed -i '10i#undef IP_DONTFRAG' include/junkie/proto/ip.h
28 buildInputs = [ libpcap guile_2_2 openssl ];
29 nativeBuildInputs = [ autoreconfHook pkg-config ];
31 "GUILELIBDIR=\${out}/${guile_2_2.siteDir}"
32 "GUILECACHEDIR=\${out}/${guile_2_2.siteCcacheDir}"
36 description = "Deep packet inspection swiss-army knife";
37 homepage = "https://github.com/rixed/junkie";
38 license = lib.licenses.agpl3Plus;
39 maintainers = [ lib.maintainers.rixed ];
40 platforms = lib.platforms.unix;
42 Junkie is a network sniffer like Tcpdump or Wireshark, but designed to
43 be easy to program and extend.
45 It comes with several command line tools to demonstrate this:
48 - a tool listing TLS certificates...