1 {lib, stdenv, fetchurl, tlsSupport ? true, openssl ? null}:
3 assert tlsSupport -> openssl != null;
9 url = "mirror://debian/pool/main/s/ssmtp/ssmtp_2.64.orig.tar.bz2";
10 sha256 = "0dps8s87ag4g3jr6dk88hs9zl46h3790marc5c2qw7l71k4pvhr2";
13 # A request has been made to merge this patch into ssmtp.
14 # See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=858781
15 patches = [ ./ssmtp_support_AuthPassFile_parameter.patch ];
19 (lib.enableFeature tlsSupport "ssl")
24 # Don't run the script that interactively generates a config file.
25 # Also don't install the broken, cyclic symlink /lib/sendmail.
26 sed -e '/INSTALLED_CONFIGURATION_FILE/d' \
27 -e 's|/lib/sendmail|$(TMPDIR)/sendmail|' \
29 substituteInPlace Makefile \
30 --replace '$(INSTALL) -s' '$(INSTALL) -s --strip-program $(STRIP)'
33 installFlags = [ "etcdir=$(out)/etc" ];
35 installTargets = [ "install" "install-sendmail" ];
37 buildInputs = lib.optional tlsSupport openssl;
39 NIX_LDFLAGS = lib.optionalString tlsSupport "-lcrypto";
42 platforms = platforms.linux;
43 license = licenses.gpl2;
44 maintainers = with maintainers; [ basvandijk ];