nixpkgs/pkgs/tools/networking/junkie/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

52 lines
1.6 KiB
Nix
Raw Normal View History

2023-08-03 18:11:55 +00:00
{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, pkg-config, libpcap, guile_2_2, openssl }:
2018-12-21 10:37:20 +00:00
stdenv.mkDerivation rec {
pname = "junkie";
version = "2.8.0";
src = fetchFromGitHub {
owner = "rixed";
repo = "junkie";
rev = "v${version}";
sha256 = "0kfdjgch667gfb3qpiadd2dj3fxc7r19nr620gffb1ahca02wq31";
2018-12-21 10:37:20 +00:00
};
2023-01-04 08:16:05 +00:00
patches = [
# Pull upstream patch for -fno-common toolchains:
(fetchpatch {
name = "fno-common.patch";
url = "https://github.com/rixed/junkie/commit/52209c5b0c9a09981739ede9701cd73e82a88ea5.patch";
sha256 = "1qg01jinqn5wr2mz77rzaidnrli35di0k7lnx6kfm7dh7v8kxbrr";
})
];
2023-01-04 08:16:05 +00:00
# IP_DONTFRAG is defined on macOS from Big Sur
postPatch = lib.optionalString (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11") ''
sed -i '10i#undef IP_DONTFRAG' include/junkie/proto/ip.h
'';
2023-08-03 18:11:55 +00:00
buildInputs = [ libpcap guile_2_2 openssl ];
2023-01-04 08:16:05 +00:00
nativeBuildInputs = [ autoreconfHook pkg-config ];
2018-12-21 10:37:20 +00:00
configureFlags = [
2023-08-05 20:08:23 +00:00
"GUILELIBDIR=\${out}/${guile_2_2.siteDir}"
"GUILECACHEDIR=\${out}/${guile_2_2.siteCcacheDir}"
2018-12-21 10:37:20 +00:00
];
meta = {
description = "Deep packet inspection swiss-army knife";
homepage = "https://github.com/rixed/junkie";
2021-01-15 09:19:50 +00:00
license = lib.licenses.agpl3Plus;
maintainers = [ lib.maintainers.rixed ];
platforms = lib.platforms.unix;
2018-12-21 10:37:20 +00:00
longDescription = ''
Junkie is a network sniffer like Tcpdump or Wireshark, but designed to
be easy to program and extend.
It comes with several command line tools to demonstrate this:
- a packet dumper;
- a nettop tool;
- a tool listing TLS certificates...
'';
};
}