1 { lib, stdenv, fetchurl, openssl, libevent, libasr, ncurses,
2 pkg-config, lua5, perl, libmysqlclient, postgresql, sqlite, hiredis,
11 stdenv.mkDerivation rec {
12 pname = "opensmtpd-extras";
16 url = "https://www.opensmtpd.org/archives/${pname}-${version}.tar.gz";
17 sha256 = "1b1mx71bvmv92lbm08wr2p60g3qhikvv3n15zsr6dcwbk9aqahzq";
20 nativeBuildInputs = [ pkg-config ];
21 buildInputs = [ openssl libevent
22 libasr lua5 perl libmysqlclient postgresql sqlite hiredis ];
26 "--localstatedir=/var"
27 "--with-privsep-user=smtpd"
28 "--with-libevent-dir=${libevent.dev}"
30 "--with-filter-clamav"
31 "--with-filter-dkim-signer"
33 "--with-filter-monkey"
36 "--with-filter-spamassassin"
44 "--with-table-socketmap"
47 "--with-scheduler-ram"
48 "--with-scheduler-stub"
50 ] ++ lib.optionals enableLua [
51 "--with-lua=${pkg-config}"
54 ] ++ lib.optionals enablePerl [
58 ] ++ lib.optionals enableMysql [
61 ] ++ lib.optionals enablePostgres [
62 "--with-table-postgres"
64 ] ++ lib.optionals enableSqlite [
67 ] ++ lib.optionals enableRedis [
71 env.NIX_CFLAGS_COMPILE = lib.optionalString enableRedis
72 "-I${hiredis}/include/hiredis -lhiredis"
73 + lib.optionalString enableMysql
74 " -L${libmysqlclient}/lib/mysql";
77 homepage = "https://www.opensmtpd.org/";
78 description = "Extra plugins for the OpenSMTPD mail server";
79 license = licenses.isc;
80 platforms = platforms.linux;
81 maintainers = with maintainers; [ gebner ekleog ];