9bb3fccb5b
continuation of #109595 pkgconfig was aliased in 2018, however, it remained in all-packages.nix due to its wide usage. This cleans up the remaining references to pkgs.pkgsconfig and moves the entry to aliases.nix. python3Packages.pkgconfig remained unchanged because it's the canonical name of the upstream package on pypi.
49 lines
1.4 KiB
Nix
49 lines
1.4 KiB
Nix
{ stdenv, lib, fetchFromGitHub, cmake, perl
|
|
, glib, luajit, openssl, pcre, pkg-config, sqlite, ragel, icu
|
|
, hyperscan, jemalloc, blas, lapack, lua, libsodium
|
|
, withBlas ? true
|
|
, withHyperscan ? stdenv.isx86_64
|
|
, withLuaJIT ? stdenv.isx86_64
|
|
, nixosTests
|
|
}:
|
|
|
|
assert withHyperscan -> stdenv.isx86_64;
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "rspamd";
|
|
version = "2.6";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "rspamd";
|
|
repo = "rspamd";
|
|
rev = version;
|
|
sha256 = "0vwa7k2s2bkfb8w78z5izkd6ywjbzqysb0grls898y549hm8ii70";
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake pkg-config perl ];
|
|
buildInputs = [ glib openssl pcre sqlite ragel icu jemalloc libsodium ]
|
|
++ lib.optional withHyperscan hyperscan
|
|
++ lib.optionals withBlas [ blas lapack ]
|
|
++ lib.optional withLuaJIT luajit ++ lib.optional (!withLuaJIT) lua;
|
|
|
|
cmakeFlags = [
|
|
"-DDEBIAN_BUILD=ON"
|
|
"-DRUNDIR=/run/rspamd"
|
|
"-DDBDIR=/var/lib/rspamd"
|
|
"-DLOGDIR=/var/log/rspamd"
|
|
"-DLOCAL_CONFDIR=/etc/rspamd"
|
|
"-DENABLE_JEMALLOC=ON"
|
|
] ++ lib.optional withHyperscan "-DENABLE_HYPERSCAN=ON"
|
|
++ lib.optional (!withLuaJIT) "-DENABLE_LUAJIT=OFF";
|
|
|
|
passthru.tests.rspamd = nixosTests.rspamd;
|
|
|
|
meta = with lib; {
|
|
homepage = "https://rspamd.com";
|
|
license = licenses.asl20;
|
|
description = "Advanced spam filtering system";
|
|
maintainers = with maintainers; [ avnik fpletz globin ];
|
|
platforms = with platforms; linux;
|
|
};
|
|
}
|