19 enablePostgres ? true,
24 stdenv.mkDerivation rec {
25 pname = "opensmtpd-extras";
29 url = "https://www.opensmtpd.org/archives/${pname}-${version}.tar.gz";
30 sha256 = "1b1mx71bvmv92lbm08wr2p60g3qhikvv3n15zsr6dcwbk9aqahzq";
33 nativeBuildInputs = [ pkg-config ];
49 "--localstatedir=/var"
50 "--with-privsep-user=smtpd"
51 "--with-libevent-dir=${libevent.dev}"
53 "--with-filter-clamav"
54 "--with-filter-dkim-signer"
56 "--with-filter-monkey"
59 "--with-filter-spamassassin"
67 "--with-table-socketmap"
70 "--with-scheduler-ram"
71 "--with-scheduler-stub"
74 ++ lib.optionals enableLua [
75 "--with-lua=${pkg-config}"
79 ++ lib.optionals enablePerl [
84 ++ lib.optionals enableMysql [
88 ++ lib.optionals enablePostgres [
89 "--with-table-postgres"
92 ++ lib.optionals enableSqlite [
96 ++ lib.optionals enableRedis [
100 env.NIX_CFLAGS_COMPILE =
101 lib.optionalString enableRedis "-I${hiredis}/include/hiredis -lhiredis"
102 + lib.optionalString enableMysql " -L${libmysqlclient}/lib/mysql";
105 homepage = "https://www.opensmtpd.org/";
106 description = "Extra plugins for the OpenSMTPD mail server";
107 license = licenses.isc;
108 platforms = platforms.linux;
109 maintainers = with maintainers; [