mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-19 16:45:49 +01:00
44 lines
1.3 KiB
Nix
44 lines
1.3 KiB
Nix
{ stdenv, lib, fetchFromGitHub, cmake, perl
|
|
, glib, luajit, openssl, pcre, pkgconfig, sqlite, ragel, icu
|
|
, hyperscan, jemalloc, openblas, lua, libsodium
|
|
, withBlas ? true
|
|
, withHyperscan ? stdenv.isx86_64
|
|
, withLuaJIT ? stdenv.isx86_64
|
|
}:
|
|
|
|
assert withHyperscan -> stdenv.isx86_64;
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "rspamd";
|
|
version = "2.5";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "rspamd";
|
|
repo = "rspamd";
|
|
rev = version;
|
|
sha256 = "01fhh07dddc6v7a5kq6h1z221vl0d4af43cchqkf54ycyxxxw06h";
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake pkgconfig perl ];
|
|
buildInputs = [ glib openssl pcre sqlite ragel icu jemalloc libsodium ]
|
|
++ lib.optional withHyperscan hyperscan
|
|
++ lib.optional withBlas openblas
|
|
++ lib.optional withLuaJIT luajit ++ lib.optional (!withLuaJIT) lua;
|
|
|
|
cmakeFlags = [
|
|
"-DDEBIAN_BUILD=ON"
|
|
"-DRUNDIR=/run/rspamd"
|
|
"-DDBDIR=/var/lib/rspamd"
|
|
"-DLOGDIR=/var/log/rspamd"
|
|
"-DLOCAL_CONFDIR=/etc/rspamd"
|
|
"-DENABLE_JEMALLOC=ON"
|
|
] ++ lib.optional withHyperscan "-DENABLE_HYPERSCAN=ON";
|
|
|
|
meta = with stdenv.lib; {
|
|
homepage = "https://rspamd.com";
|
|
license = licenses.asl20;
|
|
description = "Advanced spam filtering system";
|
|
maintainers = with maintainers; [ avnik fpletz globin ];
|
|
platforms = with platforms; linux;
|
|
};
|
|
}
|