nixpkgs/pkgs/by-name/tr/tracebox/package.nix

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

61 lines
1.1 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
2023-12-11 00:27:14 +00:00
env = {
CXXFLAGS = "-std=c++14";
LUA_LIB = "-llua";
PCAPLIB = "-lpcap";
};
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 = "Middlebox detection tool";
2024-04-26 11:35:31 +00:00
license = licenses.gpl2Only;
2022-09-15 20:47:05 +00:00
maintainers = with maintainers; [ ck3d ];
2015-05-08 11:19:31 +00:00
platforms = platforms.linux;
};
}