27 withHyperscan ? stdenv.hostPlatform.isx86_64,
28 withLuaJIT ? stdenv.hostPlatform.isx86_64,
32 assert withHyperscan -> stdenv.hostPlatform.isx86_64;
34 stdenv.mkDerivation rec {
38 src = fetchFromGitHub {
42 hash = "sha256-x0Mw2ug5H6BZI6LKOjFufYzGVxZIkgxXHeIX7Emsj8A=";
45 hardeningEnable = [ "pie" ];
68 ++ lib.optional withHyperscan hyperscan
69 ++ lib.optionals withBlas [
73 ++ lib.optional withLuaJIT luajit
74 ++ lib.optional (!withLuaJIT) lua;
78 # pcre2 jit seems to cause crashes: https://github.com/NixOS/nixpkgs/pull/181908
81 "-DRUNDIR=/run/rspamd"
82 "-DDBDIR=/var/lib/rspamd"
83 "-DLOGDIR=/var/log/rspamd"
84 "-DLOCAL_CONFDIR=/etc/rspamd"
85 "-DENABLE_JEMALLOC=ON"
91 ++ lib.optional withHyperscan "-DENABLE_HYPERSCAN=ON"
92 ++ lib.optional (!withLuaJIT) "-DENABLE_LUAJIT=OFF";
94 passthru.tests.rspamd = nixosTests.rspamd;
97 homepage = "https://rspamd.com";
98 license = licenses.asl20;
99 description = "Advanced spam filtering system";
100 maintainers = with maintainers; [
106 platforms = with platforms; linux;