Unverified Commit a41e9c6e authored by lewo's avatar lewo Committed by GitHub
Browse files

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

rspamd: use system libraries
parents 6e793654 6ed48bd4
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -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";