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

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

58 lines
1.0 KiB
Nix
Raw Normal View History

2022-09-15 20:47:05 +00:00
{ lib
, stdenv
, fetchFromGitHub
, autoreconfHook
, libpcap
, lua5_1
, json_c
2022-09-17 00:24:21 +00:00
, testers
, tracebox
2022-09-15 20:47:05 +00:00
}:
2015-05-08 11:19:31 +00:00
stdenv.mkDerivation rec {
pname = "tracebox";
2022-09-15 20:47:05 +00:00
version = "0.4.4";
2015-05-08 11:19:31 +00:00
2021-09-19 17:10:22 +00:00
src = fetchFromGitHub {
owner = "tracebox";
repo = "tracebox";
rev = "v${version}";
2022-09-15 20:47:05 +00:00
hash = "sha256-1KBJ4uXa1XpzEw23IjndZg+aGJXk3PVw8LYKAvxbxCA=";
fetchSubmodules = true;
2015-05-08 11:19:31 +00:00
};
nativeBuildInputs = [ autoreconfHook ];
2022-09-15 20:47:05 +00:00
buildInputs = [
libpcap
lua5_1
json_c
];
2015-05-08 11:19:31 +00:00
2022-09-17 00:24:21 +00:00
postPatch = ''
sed -i configure.ac \
-e 's,$(git describe .*),${version},'
'';
2022-09-15 20:47:05 +00:00
configureFlags = [
"--with-lua=yes"
"--with-libpcap=yes"
];
2015-05-08 11:19:31 +00:00
2022-09-15 20:47:05 +00:00
PCAPLIB="-lpcap";
LUA_LIB="-llua";
2015-05-08 11:19:31 +00:00
2022-09-15 20:47:05 +00:00
enableParallelBuilding = true;
2015-05-08 11:19:31 +00:00
2022-09-17 00:24:21 +00:00
passthru.tests.version = testers.testVersion {
package = tracebox;
command = "tracebox -V";
};
meta = with lib; {
homepage = "http://www.tracebox.org/";
2015-05-08 11:19:31 +00:00
description = "A middlebox detection tool";
2022-09-15 20:47:05 +00:00
license = licenses.gpl2;
maintainers = with maintainers; [ ck3d ];
2015-05-08 11:19:31 +00:00
platforms = platforms.linux;
};
}