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 {
|
2019-08-15 12:41:18 +00:00
|
|
|
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
|
|
|
};
|
|
|
|
|
2017-09-05 21:26:13 +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";
|
|
|
|
};
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|