mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 07:05:13 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
41 lines
1.3 KiB
Nix
41 lines
1.3 KiB
Nix
{lib, stdenv, pkg-config, luajit, openssl, fetchurl, libpcap, pcre, libdnet, daq, zlib, flex, bison, makeWrapper
|
|
, libtirpc
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
version = "2.9.20";
|
|
pname = "snort";
|
|
|
|
src = fetchurl {
|
|
name = "${pname}-${version}.tar.gz";
|
|
url = "https://snort.org/downloads/archive/snort/${pname}-${version}.tar.gz";
|
|
sha256 = "sha256-KUAOE/U7GDHguLEOwSJKHLqm3BUzpTIqIN2Au4S0mBw=";
|
|
};
|
|
|
|
nativeBuildInputs = [ makeWrapper pkg-config ];
|
|
buildInputs = [ luajit openssl libpcap pcre libdnet daq zlib flex bison libtirpc ];
|
|
|
|
env.NIX_CFLAGS_COMPILE = toString [ "-I${libtirpc.dev}/include/tirpc" ];
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
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"
|
|
'';
|
|
|
|
meta = {
|
|
description = "Network intrusion prevention and detection system (IDS/IPS)";
|
|
homepage = "https://www.snort.org";
|
|
maintainers = with lib.maintainers; [ aycanirican ];
|
|
license = lib.licenses.gpl2;
|
|
platforms = with lib.platforms; linux;
|
|
};
|
|
}
|