biglybt: 3.5.0.0 -> 3.6.0.0
[NixPkgs.git] / pkgs / servers / mail / opensmtpd / extras.nix
blobf179bf96368ff8e0768c19c143eb404028c81ae1
1 { lib, stdenv, fetchurl, openssl, libevent, libasr, ncurses,
2   pkg-config, lua5, perl, libmysqlclient, postgresql, sqlite, hiredis,
3   enableLua ? true,
4   enablePerl ? true,
5   enableMysql ? true,
6   enablePostgres ? true,
7   enableSqlite ? true,
8   enableRedis ? true,
9 }:
11 stdenv.mkDerivation rec {
12   pname = "opensmtpd-extras";
13   version = "6.7.1";
15   src = fetchurl {
16     url = "https://www.opensmtpd.org/archives/${pname}-${version}.tar.gz";
17     sha256 = "1b1mx71bvmv92lbm08wr2p60g3qhikvv3n15zsr6dcwbk9aqahzq";
18   };
20   nativeBuildInputs = [ pkg-config ];
21   buildInputs = [ openssl libevent
22     libasr lua5 perl libmysqlclient postgresql sqlite hiredis ];
24   configureFlags = [
25     "--sysconfdir=/etc"
26     "--localstatedir=/var"
27     "--with-privsep-user=smtpd"
28     "--with-libevent-dir=${libevent.dev}"
30     "--with-filter-clamav"
31     "--with-filter-dkim-signer"
32     "--with-filter-dnsbl"
33     "--with-filter-monkey"
34     "--with-filter-pause"
35     "--with-filter-regex"
36     "--with-filter-spamassassin"
37     "--with-filter-stub"
38     "--with-filter-trace"
39     "--with-filter-void"
40     "--with-queue-null"
41     "--with-queue-ram"
42     "--with-queue-stub"
43     "--with-table-ldap"
44     "--with-table-socketmap"
45     "--with-table-passwd"
46     "--with-table-stub"
47     "--with-scheduler-ram"
48     "--with-scheduler-stub"
50   ] ++ lib.optionals enableLua [
51     "--with-lua=${pkg-config}"
52     "--with-filter-lua"
54   ] ++ lib.optionals enablePerl [
55     "--with-perl=${perl}"
56     "--with-filter-perl"
58   ] ++ lib.optionals enableMysql [
59     "--with-table-mysql"
61   ] ++ lib.optionals enablePostgres [
62     "--with-table-postgres"
64   ] ++ lib.optionals enableSqlite [
65     "--with-table-sqlite"
67   ] ++ lib.optionals enableRedis [
68     "--with-table-redis"
69   ];
71   env.NIX_CFLAGS_COMPILE = lib.optionalString enableRedis
72       "-I${hiredis}/include/hiredis -lhiredis"
73     + lib.optionalString enableMysql
74       " -L${libmysqlclient}/lib/mysql";
76   meta = with lib; {
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 ];
82   };