rspamd: reformat
This commit is contained in:
parent
b5dade8ca0
commit
942ae171ab
@ -1,30 +1,31 @@
|
|||||||
{ stdenv
|
{
|
||||||
, lib
|
stdenv,
|
||||||
, fetchFromGitHub
|
lib,
|
||||||
, cmake
|
fetchFromGitHub,
|
||||||
, doctest
|
cmake,
|
||||||
, fmt
|
doctest,
|
||||||
, perl
|
fmt,
|
||||||
, glib
|
perl,
|
||||||
, luajit
|
glib,
|
||||||
, openssl
|
luajit,
|
||||||
, pcre
|
openssl,
|
||||||
, pkg-config
|
pcre,
|
||||||
, sqlite
|
pkg-config,
|
||||||
, ragel
|
sqlite,
|
||||||
, icu
|
ragel,
|
||||||
, hyperscan
|
icu,
|
||||||
, jemalloc
|
hyperscan,
|
||||||
, blas
|
jemalloc,
|
||||||
, lapack
|
blas,
|
||||||
, lua
|
lapack,
|
||||||
, libsodium
|
lua,
|
||||||
, xxHash
|
libsodium,
|
||||||
, zstd
|
xxHash,
|
||||||
, withBlas ? true
|
zstd,
|
||||||
, withHyperscan ? stdenv.isx86_64
|
withBlas ? true,
|
||||||
, withLuaJIT ? stdenv.isx86_64
|
withHyperscan ? stdenv.isx86_64,
|
||||||
, nixosTests
|
withLuaJIT ? stdenv.isx86_64,
|
||||||
|
nixosTests,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert withHyperscan -> stdenv.isx86_64;
|
assert withHyperscan -> stdenv.isx86_64;
|
||||||
@ -42,13 +43,36 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
hardeningEnable = [ "pie" ];
|
hardeningEnable = [ "pie" ];
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake pkg-config perl ];
|
nativeBuildInputs = [
|
||||||
buildInputs = [ doctest fmt glib openssl pcre sqlite ragel icu jemalloc libsodium xxHash zstd ]
|
cmake
|
||||||
|
pkg-config
|
||||||
|
perl
|
||||||
|
];
|
||||||
|
buildInputs =
|
||||||
|
[
|
||||||
|
doctest
|
||||||
|
fmt
|
||||||
|
glib
|
||||||
|
openssl
|
||||||
|
pcre
|
||||||
|
sqlite
|
||||||
|
ragel
|
||||||
|
icu
|
||||||
|
jemalloc
|
||||||
|
libsodium
|
||||||
|
xxHash
|
||||||
|
zstd
|
||||||
|
]
|
||||||
++ lib.optional withHyperscan hyperscan
|
++ lib.optional withHyperscan hyperscan
|
||||||
++ lib.optionals withBlas [ blas lapack ]
|
++ lib.optionals withBlas [
|
||||||
++ lib.optional withLuaJIT luajit ++ lib.optional (!withLuaJIT) lua;
|
blas
|
||||||
|
lapack
|
||||||
|
]
|
||||||
|
++ lib.optional withLuaJIT luajit
|
||||||
|
++ lib.optional (!withLuaJIT) lua;
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags =
|
||||||
|
[
|
||||||
# pcre2 jit seems to cause crashes: https://github.com/NixOS/nixpkgs/pull/181908
|
# pcre2 jit seems to cause crashes: https://github.com/NixOS/nixpkgs/pull/181908
|
||||||
"-DENABLE_PCRE2=OFF"
|
"-DENABLE_PCRE2=OFF"
|
||||||
"-DDEBIAN_BUILD=ON"
|
"-DDEBIAN_BUILD=ON"
|
||||||
@ -61,7 +85,8 @@ stdenv.mkDerivation rec {
|
|||||||
"-DSYSTEM_FMT=ON"
|
"-DSYSTEM_FMT=ON"
|
||||||
"-DSYSTEM_XXHASH=ON"
|
"-DSYSTEM_XXHASH=ON"
|
||||||
"-DSYSTEM_ZSTD=ON"
|
"-DSYSTEM_ZSTD=ON"
|
||||||
] ++ lib.optional withHyperscan "-DENABLE_HYPERSCAN=ON"
|
]
|
||||||
|
++ lib.optional withHyperscan "-DENABLE_HYPERSCAN=ON"
|
||||||
++ lib.optional (!withLuaJIT) "-DENABLE_LUAJIT=OFF";
|
++ lib.optional (!withLuaJIT) "-DENABLE_LUAJIT=OFF";
|
||||||
|
|
||||||
passthru.tests.rspamd = nixosTests.rspamd;
|
passthru.tests.rspamd = nixosTests.rspamd;
|
||||||
@ -70,7 +95,12 @@ stdenv.mkDerivation rec {
|
|||||||
homepage = "https://rspamd.com";
|
homepage = "https://rspamd.com";
|
||||||
license = licenses.asl20;
|
license = licenses.asl20;
|
||||||
description = "Advanced spam filtering system";
|
description = "Advanced spam filtering system";
|
||||||
maintainers = with maintainers; [ avnik fpletz globin lewo ];
|
maintainers = with maintainers; [
|
||||||
|
avnik
|
||||||
|
fpletz
|
||||||
|
globin
|
||||||
|
lewo
|
||||||
|
];
|
||||||
platforms = with platforms; linux;
|
platforms = with platforms; linux;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user