nixpkgs/pkgs/tools/security/haka/default.nix

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

37 lines
1.2 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, cmake, swig, wireshark, check, rsync, libpcap, gawk, libedit, pcre, nixosTests }:
2016-01-09 00:04:41 +00:00
let version = "0.3.0"; in
2019-08-13 21:52:01 +00:00
stdenv.mkDerivation {
2019-08-13 21:52:01 +00:00
pname = "haka";
inherit version;
2016-01-09 00:04:41 +00:00
src = fetchurl {
name = "haka_${version}_source.tar.gz";
2016-01-18 04:54:19 +00:00
url = "https://github.com/haka-security/haka/releases/download/v${version}/haka_${version}_source.tar.gz";
2017-02-24 23:55:56 +00:00
sha256 = "0dm39g3k77sa70zrjsqadidg27a6iqq61jzfdxazpllnrw4mjy4w";
2016-01-09 00:04:41 +00:00
};
env.NIX_CFLAGS_COMPILE = "-Wno-error";
2016-01-09 00:04:41 +00: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
'';
nativeBuildInputs = [ cmake ];
buildInputs = [ swig wireshark check rsync libpcap gawk libedit pcre ];
2016-01-09 00:04:41 +00:00
passthru.tests = { inherit (nixosTests) haka; };
2016-01-09 00:04:41 +00:00
meta = {
2016-07-23 10:32:04 +00:00
description = "A collection of tools that allows capturing TCP/IP packets and filtering them based on Lua policy files";
homepage = "http://www.haka-security.org/";
2021-01-15 09:19:50 +00:00
license = lib.licenses.mpl20;
maintainers = [ lib.maintainers.tvestelind ];
platforms = [ "x86_64-linux" "i686-linux" ]; # fails on aarch64
2016-01-09 00:04:41 +00:00
};
}