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