nixpkgs/pkgs/servers/mail/opensmtpd/extras.nix

92 lines
2.3 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, openssl, libevent, libasr,
python2, pkgconfig, lua5, perl, libmysqlclient, postgresql, sqlite, hiredis,
enablePython ? true,
enableLua ? true,
enablePerl ? true,
enableMysql ? true,
enablePostgres ? true,
enableSqlite ? true,
enableRedis ? true,
}:
stdenv.mkDerivation rec {
pname = "opensmtpd-extras";
2020-05-06 04:48:36 +00:00
version = "6.7.1";
src = fetchurl {
url = "https://www.opensmtpd.org/archives/${pname}-${version}.tar.gz";
2020-05-06 04:48:36 +00:00
sha256 = "1b1mx71bvmv92lbm08wr2p60g3qhikvv3n15zsr6dcwbk9aqahzq";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ openssl libevent
libasr python2 lua5 perl libmysqlclient postgresql sqlite hiredis ];
configureFlags = [
"--sysconfdir=/etc"
"--localstatedir=/var"
"--with-privsep-user=smtpd"
"--with-libevent-dir=${libevent.dev}"
"--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"
2021-01-15 07:07:56 +00:00
] ++ lib.optionals enablePython [
"--with-python=${python2}"
"--with-filter-python"
"--with-queue-python"
"--with-table-python"
"--with-scheduler-python"
2021-01-15 07:07:56 +00:00
] ++ lib.optionals enableLua [
"--with-lua=${pkgconfig}"
"--with-filter-lua"
2021-01-15 07:07:56 +00:00
] ++ lib.optionals enablePerl [
"--with-perl=${perl}"
"--with-filter-perl"
2021-01-15 07:07:56 +00:00
] ++ lib.optionals enableMysql [
"--with-table-mysql"
2021-01-15 07:07:56 +00:00
] ++ lib.optionals enablePostgres [
"--with-table-postgres"
2021-01-15 07:07:56 +00:00
] ++ lib.optionals enableSqlite [
"--with-table-sqlite"
2021-01-15 07:07:56 +00:00
] ++ lib.optionals enableRedis [
"--with-table-redis"
];
2021-01-15 07:07:56 +00:00
NIX_CFLAGS_COMPILE = lib.optionalString enableRedis
"-I${hiredis}/include/hiredis -lhiredis"
2021-01-15 07:07:56 +00:00
+ lib.optionalString enableMysql
2019-10-30 11:34:47 +00:00
" -L${libmysqlclient}/lib/mysql";
meta = with lib; {
homepage = "https://www.opensmtpd.org/";
description = "Extra plugins for the OpenSMTPD mail server";
license = licenses.isc;
2018-03-23 23:10:46 +00:00
platforms = platforms.linux;
maintainers = with maintainers; [ gebner ekleog ];
};
}