2021-09-23 15:35:13 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, autoreconfHook, libcrafter, libpcap, lua }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "tracebox";
|
|
|
|
version = "0.2";
|
|
|
|
|
2021-09-23 15:35:13 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tracebox";
|
|
|
|
repo = "tracebox";
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-2r503xEF3/F9QQCEaSnd4Hw/RbbAhVj9C0SVZepVrT8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
|
|
|
buildInputs = [ libcrafter lua ];
|
|
|
|
|
|
|
|
configureFlags = [ "--with-lua=yes" ];
|
|
|
|
|
|
|
|
NIX_LDFLAGS = "${libpcap}/lib/libpcap.so ${libcrafter}/lib/libcrafter.so";
|
|
|
|
|
|
|
|
preAutoreconf = ''
|
|
|
|
substituteInPlace Makefile.am --replace "noinst" ""
|
|
|
|
sed '/noinst/d' -i configure.ac
|
|
|
|
sed '/libcrafter/d' -i src/tracebox/Makefile.am
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://www.tracebox.org/";
|
|
|
|
description = "A middlebox detection tool";
|
2021-01-15 22:18:51 +00:00
|
|
|
license = lib.licenses.gpl2;
|
2021-05-20 23:08:51 +00:00
|
|
|
maintainers = [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|