3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/networking/ids/snort/default.nix

41 lines
1.3 KiB
Nix
Raw Normal View History

{lib, stdenv, pkg-config, luajit, openssl, fetchurl, libpcap, pcre, libdnet, daq, zlib, flex, bison, makeWrapper
, libtirpc
}:
2013-05-30 14:05:39 +01:00
stdenv.mkDerivation rec {
2021-06-29 02:54:56 +01:00
version = "2.9.18";
pname = "snort";
2013-05-30 14:05:39 +01:00
src = fetchurl {
name = "${pname}-${version}.tar.gz";
url = "https://snort.org/downloads/archive/snort/${pname}-${version}.tar.gz";
2021-06-29 02:54:56 +01:00
sha256 = "0xrc7crchflfrk4x5dq5zx22zkmgcrbkww5r1pvkc3cyyr18cc6h";
2013-05-30 14:05:39 +01:00
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ pkg-config luajit openssl libpcap pcre libdnet daq zlib flex bison libtirpc ];
NIX_CFLAGS_COMPILE = [ "-I${libtirpc.dev}/include/tirpc" ];
enableParallelBuilding = true;
2018-07-25 22:44:21 +01:00
configureFlags = [
"--disable-static-daq"
"--enable-control-socket"
"--with-daq-includes=${daq}/includes"
"--with-daq-libraries=${daq}/lib"
];
postInstall = ''
wrapProgram $out/bin/snort --add-flags "--daq-dir ${daq}/lib/daq --dynamic-preprocessor-lib-dir $out/lib/snort_dynamicpreprocessor/ --dynamic-engine-lib-dir $out/lib/snort_dynamicengine"
'';
2013-05-30 14:05:39 +01:00
meta = {
description = "Network intrusion prevention and detection system (IDS/IPS)";
homepage = "https://www.snort.org";
2021-01-15 05:42:41 +00:00
maintainers = with lib.maintainers; [ aycanirican ];
license = lib.licenses.gpl2;
platforms = with lib.platforms; linux;
2013-05-30 14:05:39 +01:00
};
}