biglybt: 3.5.0.0 -> 3.6.0.0
[NixPkgs.git] / pkgs / servers / mail / opensmtpd / default.nix
blobf93bc857116fc70aecead419f2f618acba8060f4
1 { lib
2 , stdenv
3 , fetchurl
4 , autoreconfHook
5 , autoconf-archive
6 , pkgconf
7 , libtool
8 , bison
9 , libasr
10 , libevent
11 , zlib
12 , libressl
13 , db
14 , pam
15 , libxcrypt
16 , nixosTests
19 stdenv.mkDerivation rec {
20   pname = "opensmtpd";
21   version = "7.4.0p0";
23   nativeBuildInputs = [ autoreconfHook autoconf-archive pkgconf libtool bison ];
24   buildInputs = [ libevent zlib libressl db pam libxcrypt ];
26   src = fetchurl {
27     url = "https://www.opensmtpd.org/archives/${pname}-${version}.tar.gz";
28     hash = "sha256-wYHMw0NKEeWDYZ4AAoUg1Ff+Bi403AO+6jWAeCIM43Q=";
29   };
31   patches = [
32     ./proc_path.diff # TODO: upstream to OpenSMTPD, see https://github.com/NixOS/nixpkgs/issues/54045
33   ];
35   postPatch = ''
36     substituteInPlace mk/smtpctl/Makefile.am --replace "chgrp" "true"
37     substituteInPlace mk/smtpctl/Makefile.am --replace "chmod 2555" "chmod 0555"
38   '';
40   configureFlags = [
41     "--sysconfdir=/etc"
42     "--localstatedir=/var"
43     "--with-mantype=doc"
44     "--with-auth-pam"
45     "--without-auth-bsdauth"
46     "--with-path-socket=/run"
47     "--with-path-pidfile=/run"
48     "--with-user-smtpd=smtpd"
49     "--with-user-queue=smtpq"
50     "--with-group-queue=smtpq"
51     "--with-path-CAfile=/etc/ssl/certs/ca-certificates.crt"
52     "--with-libevent=${libevent.dev}"
53     "--with-table-db"
54   ];
56   installFlags = [
57     "sysconfdir=\${out}/etc"
58     "localstatedir=\${TMPDIR}"
59   ];
61   meta = with lib; {
62     homepage = "https://www.opensmtpd.org/";
63     description = ''
64       A free implementation of the server-side SMTP protocol as defined by
65       RFC 5321, with some additional standard extensions
66     '';
67     license = licenses.isc;
68     platforms = platforms.linux;
69     maintainers = with maintainers; [ obadz ekleog vifino ];
70   };
71   passthru.tests = {
72     basic-functionality-and-dovecot-interaction = nixosTests.opensmtpd;
73     rspamd-integration = nixosTests.opensmtpd-rspamd;
74   };