2015-11-14 20:32:51 +00:00
|
|
|
{ stdenv, fetchurl, openssl, libevent, libasr,
|
2019-09-22 08:38:09 +01:00
|
|
|
python2, pkgconfig, lua5, perl, libmysqlclient, postgresql, sqlite, hiredis,
|
2018-11-09 13:37:09 +00:00
|
|
|
enablePython ? true,
|
|
|
|
enableLua ? true,
|
|
|
|
enablePerl ? true,
|
|
|
|
enableMysql ? true,
|
|
|
|
enablePostgres ? true,
|
|
|
|
enableSqlite ? true,
|
|
|
|
enableRedis ? true,
|
|
|
|
}:
|
2017-12-27 15:15:33 +00:00
|
|
|
|
2015-11-14 20:32:51 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "opensmtpd-extras";
|
2020-05-06 05:48:36 +01:00
|
|
|
version = "6.7.1";
|
2015-11-14 20:32:51 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 13:41:18 +01:00
|
|
|
url = "https://www.opensmtpd.org/archives/${pname}-${version}.tar.gz";
|
2020-05-06 05:48:36 +01:00
|
|
|
sha256 = "1b1mx71bvmv92lbm08wr2p60g3qhikvv3n15zsr6dcwbk9aqahzq";
|
2015-11-14 20:32:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
buildInputs = [ openssl libevent
|
2019-09-22 08:38:09 +01:00
|
|
|
libasr python2 lua5 perl libmysqlclient postgresql sqlite hiredis ];
|
2015-11-14 20:32:51 +00:00
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--sysconfdir=/etc"
|
|
|
|
"--localstatedir=/var"
|
|
|
|
"--with-privsep-user=smtpd"
|
2016-04-16 18:35:59 +01:00
|
|
|
"--with-libevent-dir=${libevent.dev}"
|
2015-11-14 20:32:51 +00:00
|
|
|
|
|
|
|
"--with-filter-clamav"
|
|
|
|
"--with-filter-dkim-signer"
|
|
|
|
"--with-filter-dnsbl"
|
|
|
|
"--with-filter-monkey"
|
|
|
|
"--with-filter-pause"
|
|
|
|
"--with-filter-regex"
|
|
|
|
"--with-filter-spamassassin"
|
|
|
|
"--with-filter-stub"
|
|
|
|
"--with-filter-trace"
|
|
|
|
"--with-filter-void"
|
|
|
|
"--with-queue-null"
|
|
|
|
"--with-queue-ram"
|
|
|
|
"--with-queue-stub"
|
|
|
|
"--with-table-ldap"
|
|
|
|
"--with-table-socketmap"
|
|
|
|
"--with-table-passwd"
|
|
|
|
"--with-table-stub"
|
|
|
|
"--with-scheduler-ram"
|
|
|
|
"--with-scheduler-stub"
|
|
|
|
|
2019-11-20 09:17:54 +00:00
|
|
|
] ++ stdenv.lib.optionals enablePython [
|
2015-11-14 20:32:51 +00:00
|
|
|
"--with-python=${python2}"
|
|
|
|
"--with-filter-python"
|
|
|
|
"--with-queue-python"
|
|
|
|
"--with-table-python"
|
|
|
|
"--with-scheduler-python"
|
|
|
|
|
2019-11-20 09:17:54 +00:00
|
|
|
] ++ stdenv.lib.optionals enableLua [
|
2015-11-14 20:32:51 +00:00
|
|
|
"--with-lua=${pkgconfig}"
|
|
|
|
"--with-filter-lua"
|
|
|
|
|
2019-11-20 09:17:54 +00:00
|
|
|
] ++ stdenv.lib.optionals enablePerl [
|
2015-11-14 20:32:51 +00:00
|
|
|
"--with-perl=${perl}"
|
|
|
|
"--with-filter-perl"
|
|
|
|
|
2019-11-20 09:17:54 +00:00
|
|
|
] ++ stdenv.lib.optionals enableMysql [
|
2015-11-14 20:32:51 +00:00
|
|
|
"--with-table-mysql"
|
|
|
|
|
2019-11-20 09:17:54 +00:00
|
|
|
] ++ stdenv.lib.optionals enablePostgres [
|
2015-11-14 20:32:51 +00:00
|
|
|
"--with-table-postgres"
|
|
|
|
|
2019-11-20 09:17:54 +00:00
|
|
|
] ++ stdenv.lib.optionals enableSqlite [
|
2015-11-14 20:32:51 +00:00
|
|
|
"--with-table-sqlite"
|
|
|
|
|
2019-11-20 09:17:54 +00:00
|
|
|
] ++ stdenv.lib.optionals enableRedis [
|
2015-11-14 20:32:51 +00:00
|
|
|
"--with-table-redis"
|
|
|
|
];
|
|
|
|
|
2019-10-30 11:34:47 +00:00
|
|
|
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString enableRedis
|
2018-11-09 13:37:09 +00:00
|
|
|
"-I${hiredis}/include/hiredis -lhiredis"
|
2019-10-30 11:34:47 +00:00
|
|
|
+ stdenv.lib.optionalString enableMysql
|
|
|
|
" -L${libmysqlclient}/lib/mysql";
|
2015-11-14 20:32:51 +00:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://www.opensmtpd.org/";
|
2015-11-14 20:32:51 +00:00
|
|
|
description = "Extra plugins for the OpenSMTPD mail server";
|
|
|
|
license = licenses.isc;
|
2018-03-23 23:10:46 +00:00
|
|
|
platforms = platforms.linux;
|
2018-11-09 13:37:09 +00:00
|
|
|
maintainers = with maintainers; [ gebner ekleog ];
|
2015-11-14 20:32:51 +00:00
|
|
|
};
|
|
|
|
}
|