Merge pull request #313778 from SuperSandro2000/rspamd-no-vendor

rspamd: use system libraries
This commit is contained in:
lewo 2024-05-23 08:09:08 +02:00 committed by GitHub
commit a41e9c6e5d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2,6 +2,8 @@
, lib
, fetchFromGitHub
, cmake
, doctest
, fmt
, perl
, glib
, luajit
@ -17,6 +19,8 @@
, lapack
, lua
, libsodium
, xxHash
, zstd
, withBlas ? true
, withHyperscan ? stdenv.isx86_64
, withLuaJIT ? stdenv.isx86_64
@ -39,7 +43,7 @@ stdenv.mkDerivation rec {
hardeningEnable = [ "pie" ];
nativeBuildInputs = [ cmake pkg-config perl ];
buildInputs = [ glib openssl pcre sqlite ragel icu jemalloc libsodium ]
buildInputs = [ doctest fmt glib openssl pcre sqlite ragel icu jemalloc libsodium xxHash zstd ]
++ lib.optional withHyperscan hyperscan
++ lib.optionals withBlas [ blas lapack ]
++ lib.optional withLuaJIT luajit ++ lib.optional (!withLuaJIT) lua;
@ -53,6 +57,10 @@ stdenv.mkDerivation rec {
"-DLOGDIR=/var/log/rspamd"
"-DLOCAL_CONFDIR=/etc/rspamd"
"-DENABLE_JEMALLOC=ON"
"-DSYSTEM_DOCTEST=ON"
"-DSYSTEM_FMT=ON"
"-DSYSTEM_XXHASH=ON"
"-DSYSTEM_ZSTD=ON"
] ++ lib.optional withHyperscan "-DENABLE_HYPERSCAN=ON"
++ lib.optional (!withLuaJIT) "-DENABLE_LUAJIT=OFF";