rspamd: add option to use hyperscan or vectorscan
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
ragel,
|
||||
fasttext,
|
||||
icu,
|
||||
hyperscan,
|
||||
vectorscan,
|
||||
jemalloc,
|
||||
blas,
|
||||
@@ -27,10 +28,15 @@
|
||||
# Enabling blas support breaks bayes filter training from dovecot in nixos-mailserver tests
|
||||
# https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/issues/321
|
||||
withBlas ? false,
|
||||
withHyperscan ? false,
|
||||
withLuaJIT ? stdenv.hostPlatform.isx86_64,
|
||||
withVectorscan ? true,
|
||||
nixosTests,
|
||||
}:
|
||||
|
||||
assert withHyperscan -> stdenv.hostPlatform.isx86_64;
|
||||
assert (!withHyperscan) || (!withVectorscan);
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "rspamd";
|
||||
version = "3.12.1";
|
||||
@@ -66,14 +72,15 @@ stdenv.mkDerivation rec {
|
||||
xxHash
|
||||
zstd
|
||||
libarchive
|
||||
vectorscan
|
||||
]
|
||||
++ lib.optionals withBlas [
|
||||
blas
|
||||
lapack
|
||||
]
|
||||
++ lib.optional withHyperscan hyperscan
|
||||
++ lib.optional withLuaJIT luajit
|
||||
++ lib.optional (!withLuaJIT) lua;
|
||||
++ lib.optional (!withLuaJIT) lua
|
||||
++ lib.optional withVectorscan vectorscan;
|
||||
|
||||
cmakeFlags = [
|
||||
# pcre2 jit seems to cause crashes: https://github.com/NixOS/nixpkgs/pull/181908
|
||||
|
||||
Reference in New Issue
Block a user