@@ -1,13 +1,21 @@
11{ stdenv, fetchurl, openssl, libevent, libasr,
2− python2, pkgconfig, lua5, perl, mysql, postgresql, sqlite, hiredis }:
2+ python2, pkgconfig, lua5, perl, mysql, postgresql, sqlite, hiredis,
3+ enablePython ? true,
4+ enableLua ? true,
5+ enablePerl ? true,
6+ enableMysql ? true,
7+ enablePostgres ? true,
8+ enableSqlite ? true,
9+ enableRedis ? true,
10+}:
311
412stdenv.mkDerivation rec {
513 name = "opensmtpd-extras-${version}";
6− version = "5.7.1";
14+ version = "6.4.0";
715
816 src = fetchurl {
917 url = "https://www.opensmtpd.org/archives/${name}.tar.gz";
10− sha256 = "1kld4hxgz792s0cb2gl7m2n618ikzqkj88w5dhaxdrxg4x2c4vdm";
18+ sha256 = "09k25l7zy5ch3fk6qphni2h0rxdp8wacmfag1whi608dgimrhrnb";
1119 };
1220
1321 nativeBuildInputs = [ pkgconfig ];
@@ -40,42 +48,45 @@ stdenv.mkDerivation rec {
4048 "--with-scheduler-ram"
4149 "--with-scheduler-stub"
4250
43− ] ++ stdenv.lib.optional (python2 != null) [
51+ ] ++ stdenv.lib.optional enablePython [
4452 "--with-python=${python2}"
4553 "--with-filter-python"
4654 "--with-queue-python"
4755 "--with-table-python"
4856 "--with-scheduler-python"
4957
50− ] ++ stdenv.lib.optional (lua5 != null) [
58+ ] ++ stdenv.lib.optional enableLua [
5159 "--with-lua=${pkgconfig}"
5260 "--with-filter-lua"
5361
54− ] ++ stdenv.lib.optional (perl != null) [
62+ ] ++ stdenv.lib.optional enablePerl [
5563 "--with-perl=${perl}"
5664 "--with-filter-perl"
5765
58− ] ++ stdenv.lib.optional (mysql != null) [
66+ ] ++ stdenv.lib.optional enableMysql [
5967 "--with-table-mysql"
6068
61− ] ++ stdenv.lib.optional (postgresql != null) [
69+ ] ++ stdenv.lib.optional enablePostgres [
6270 "--with-table-postgres"
6371
64− ] ++ stdenv.lib.optional (sqlite != null) [
72+ ] ++ stdenv.lib.optional enableSqlite [
6573 "--with-table-sqlite"
6674
67− ] ++ stdenv.lib.optional (hiredis != null) [
75+ ] ++ stdenv.lib.optional enableRedis [
6876 "--with-table-redis"
6977 ];
7078
71− NIX_CFLAGS_COMPILE = stdenv.lib.optional (hiredis != null) "-I${hiredis}/include/hiredis" ++
72− stdenv.lib.optional (mysql != null) "-L${mysql.connector-c}/lib/mysql";
79+ NIX_CFLAGS_COMPILE =
80+ stdenv.lib.optional enableRedis
81+ "-I${hiredis}/include/hiredis -lhiredis"
82+ ++ stdenv.lib.optional enableMysql
83+ "-L${mysql.connector-c}/lib/mysql";
7384
7485 meta = with stdenv.lib; {
7586 homepage = https://www.opensmtpd.org/;
7687 description = "Extra plugins for the OpenSMTPD mail server";
7788 license = licenses.isc;
7889 platforms = platforms.linux;
79− maintainers = with maintainers; [ gebner ];
90+ maintainers = with maintainers; [ gebner ekleog ];
8091 };
8192}