3
0
Fork 0
forked from mirrors/nixpkgs
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 KiB
Nix
Raw Normal View History

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