2021-01-15 05:42:41 +00:00
|
|
|
{lib, stdenv, pkgconfig, luajit, openssl, fetchurl, libpcap, pcre, libdnet, daq, zlib, flex, bison, makeWrapper
|
2020-08-12 10:12:19 +01:00
|
|
|
, libtirpc
|
|
|
|
}:
|
2013-05-30 14:05:39 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-08-12 10:12:19 +01:00
|
|
|
version = "2.9.16.1";
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "snort";
|
2020-08-12 10:12:19 +01:00
|
|
|
|
2013-05-30 14:05:39 +01:00
|
|
|
src = fetchurl {
|
2019-08-15 13:41:18 +01:00
|
|
|
name = "${pname}-${version}.tar.gz";
|
|
|
|
url = "https://snort.org/downloads/archive/snort/${pname}-${version}.tar.gz";
|
2020-08-12 10:12:19 +01:00
|
|
|
sha256 = "13lzvjli6kbsnkd7lf0rm71l2mnz38pxk76ia9yrjb6clfhlbb73";
|
2013-05-30 14:05:39 +01:00
|
|
|
};
|
2020-08-12 10:12:19 +01:00
|
|
|
|
|
|
|
buildInputs = [ makeWrapper pkgconfig luajit openssl libpcap pcre libdnet daq zlib flex bison libtirpc ];
|
|
|
|
|
|
|
|
NIX_CFLAGS_COMPILE = [ "-I${libtirpc.dev}/include/tirpc" ];
|
2015-10-02 08:11:04 +01:00
|
|
|
|
|
|
|
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"
|
2020-09-13 07:43:04 +01:00
|
|
|
];
|
2015-10-02 08:11:04 +01:00
|
|
|
|
|
|
|
postInstall = ''
|
2015-10-03 15:22:40 +01:00
|
|
|
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"
|
2015-10-02 08:11:04 +01:00
|
|
|
'';
|
2020-10-08 06:36:15 +01:00
|
|
|
|
2013-05-30 14:05:39 +01:00
|
|
|
meta = {
|
2014-08-24 15:21:08 +01:00
|
|
|
description = "Network intrusion prevention and detection system (IDS/IPS)";
|
2020-04-01 02:11:51 +01:00
|
|
|
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
|
|
|
};
|
|
|
|
}
|