rspamd: add option to use hyperscan or vectorscan (#443372)

This commit is contained in:
Franz Pletz
2025-09-16 15:59:05 +00:00
committed by GitHub
+9 -2
View File
@@ -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