mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-21 11:34:13 +00:00
rspamd: Make libfann and libgd optional
GD is experimental and never-enabled-by-default.
This commit is contained in:
parent
ff5eba906a
commit
1b59c4a6cc
@ -1,5 +1,9 @@
|
|||||||
{ stdenv, fetchFromGitHub, cmake, perl
|
{ stdenv, lib, fetchFromGitHub, cmake, perl
|
||||||
, file, glib, libevent, luajit, openssl, pcre, pkgconfig, sqlite, ragel, icu, libfann }:
|
, file, glib, libevent, luajit, openssl, pcre, pkgconfig, sqlite, ragel, icu
|
||||||
|
, libfann, gd
|
||||||
|
, withFann ? true
|
||||||
|
, withGd ? false
|
||||||
|
}:
|
||||||
|
|
||||||
let libmagic = file; # libmagic provided by file package ATM
|
let libmagic = file; # libmagic provided by file package ATM
|
||||||
in
|
in
|
||||||
@ -16,7 +20,9 @@ stdenv.mkDerivation rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake pkgconfig perl ];
|
nativeBuildInputs = [ cmake pkgconfig perl ];
|
||||||
buildInputs = [ glib libevent libmagic luajit openssl pcre sqlite ragel icu libfann ];
|
buildInputs = [ glib libevent libmagic luajit openssl pcre sqlite ragel icu ]
|
||||||
|
++ lib.optional withFann libfann
|
||||||
|
++ lib.optional withGd gd;
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
"-DDEBIAN_BUILD=ON"
|
"-DDEBIAN_BUILD=ON"
|
||||||
@ -24,7 +30,8 @@ stdenv.mkDerivation rec {
|
|||||||
"-DDBDIR=/var/lib/rspamd"
|
"-DDBDIR=/var/lib/rspamd"
|
||||||
"-DLOGDIR=/var/log/rspamd"
|
"-DLOGDIR=/var/log/rspamd"
|
||||||
"-DLOCAL_CONFDIR=/etc/rspamd"
|
"-DLOCAL_CONFDIR=/etc/rspamd"
|
||||||
];
|
] ++ lib.optional withFann "-DENABLE_FANN=ON"
|
||||||
|
++ lib.optional withGd "-DENABLE_GD=ON";
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = https://github.com/vstakhov/rspamd;
|
homepage = https://github.com/vstakhov/rspamd;
|
||||||
|
Loading…
Reference in New Issue
Block a user