jql: 8.0.0 -> 8.0.2 (#362884)
[NixPkgs.git] / pkgs / servers / mail / opensmtpd / extras.nix
blob0acf74133d9b53b0477caecf6bae294af5be7ad0
2   lib,
3   stdenv,
4   fetchurl,
5   openssl,
6   libevent,
7   libasr,
8   ncurses,
9   pkg-config,
10   lua5,
11   perl,
12   libmysqlclient,
13   postgresql,
14   sqlite,
15   hiredis,
16   enableLua ? true,
17   enablePerl ? true,
18   enableMysql ? true,
19   enablePostgres ? true,
20   enableSqlite ? true,
21   enableRedis ? true,
24 stdenv.mkDerivation rec {
25   pname = "opensmtpd-extras";
26   version = "6.7.1";
28   src = fetchurl {
29     url = "https://www.opensmtpd.org/archives/${pname}-${version}.tar.gz";
30     sha256 = "1b1mx71bvmv92lbm08wr2p60g3qhikvv3n15zsr6dcwbk9aqahzq";
31   };
33   nativeBuildInputs = [ pkg-config ];
34   buildInputs = [
35     openssl
36     libevent
37     libasr
38     lua5
39     perl
40     libmysqlclient
41     postgresql
42     sqlite
43     hiredis
44   ];
46   configureFlags =
47     [
48       "--sysconfdir=/etc"
49       "--localstatedir=/var"
50       "--with-privsep-user=smtpd"
51       "--with-libevent-dir=${libevent.dev}"
53       "--with-filter-clamav"
54       "--with-filter-dkim-signer"
55       "--with-filter-dnsbl"
56       "--with-filter-monkey"
57       "--with-filter-pause"
58       "--with-filter-regex"
59       "--with-filter-spamassassin"
60       "--with-filter-stub"
61       "--with-filter-trace"
62       "--with-filter-void"
63       "--with-queue-null"
64       "--with-queue-ram"
65       "--with-queue-stub"
66       "--with-table-ldap"
67       "--with-table-socketmap"
68       "--with-table-passwd"
69       "--with-table-stub"
70       "--with-scheduler-ram"
71       "--with-scheduler-stub"
73     ]
74     ++ lib.optionals enableLua [
75       "--with-lua=${pkg-config}"
76       "--with-filter-lua"
78     ]
79     ++ lib.optionals enablePerl [
80       "--with-perl=${perl}"
81       "--with-filter-perl"
83     ]
84     ++ lib.optionals enableMysql [
85       "--with-table-mysql"
87     ]
88     ++ lib.optionals enablePostgres [
89       "--with-table-postgres"
91     ]
92     ++ lib.optionals enableSqlite [
93       "--with-table-sqlite"
95     ]
96     ++ lib.optionals enableRedis [
97       "--with-table-redis"
98     ];
100   env.NIX_CFLAGS_COMPILE =
101     lib.optionalString enableRedis "-I${hiredis}/include/hiredis -lhiredis"
102     + lib.optionalString enableMysql " -L${libmysqlclient}/lib/mysql";
104   meta = with lib; {
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; [
110       gebner
111       ekleog
112     ];
113   };