2016-01-09 01:04:41 +01:00
|
|
|
{ stdenv, fetchurl, cmake, swig, wireshark, check, rsync, libpcap, gawk, libedit, pcre }:
|
|
|
|
|
|
|
|
let version = "0.3.0"; in
|
|
|
|
|
2019-08-13 23:52:01 +02:00
|
|
|
stdenv.mkDerivation {
|
2019-08-13 23:52:01 +02:00
|
|
|
pname = "haka";
|
|
|
|
inherit version;
|
2016-01-09 01:04:41 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
name = "haka_${version}_source.tar.gz";
|
2016-01-18 05:54:19 +01:00
|
|
|
url = "https://github.com/haka-security/haka/releases/download/v${version}/haka_${version}_source.tar.gz";
|
2017-02-25 00:55:56 +01:00
|
|
|
sha256 = "0dm39g3k77sa70zrjsqadidg27a6iqq61jzfdxazpllnrw4mjy4w";
|
2016-01-09 01:04:41 +01:00
|
|
|
};
|
|
|
|
|
2016-03-20 22:57:48 +01:00
|
|
|
NIX_CFLAGS_COMPILE = "-Wno-error";
|
|
|
|
|
2016-01-09 01:04:41 +01:00
|
|
|
preConfigure = ''
|
|
|
|
sed -i 's,/etc,'$out'/etc,' src/haka/haka.c
|
|
|
|
sed -i 's,/etc,'$out'/etc,' src/haka/CMakeLists.txt
|
|
|
|
sed -i 's,/opt/haka/etc,$out/opt/haka/etc,' src/haka/haka.1
|
|
|
|
sed -i 's,/etc,'$out'/etc,' doc/user/tool_suite_haka.rst
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [ cmake swig wireshark check rsync libpcap gawk libedit pcre ];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
meta = {
|
2016-07-23 12:32:04 +02:00
|
|
|
description = "A collection of tools that allows capturing TCP/IP packets and filtering them based on Lua policy files";
|
2016-01-09 01:04:41 +01:00
|
|
|
homepage = http://www.haka-security.org/;
|
|
|
|
license = stdenv.lib.licenses.mpl20;
|
2017-12-05 23:20:11 +01:00
|
|
|
maintainers = [ stdenv.lib.maintainers.tvestelind ];
|
2016-01-09 01:04:41 +01:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
};
|
|
|
|
}
|