2019-02-03 15:30:29 +00:00
|
|
|
{stdenv, fetchurl, tlsSupport ? true, openssl ? null}:
|
2007-11-08 17:48:52 +00:00
|
|
|
|
|
|
|
assert tlsSupport -> openssl != null;
|
2007-08-07 22:22:31 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2011-04-06 11:41:36 +00:00
|
|
|
name = "ssmtp-2.64";
|
2018-05-03 05:58:11 +00:00
|
|
|
|
2007-08-07 22:22:31 +00:00
|
|
|
src = fetchurl {
|
2015-05-21 21:52:24 +00:00
|
|
|
url = mirror://debian/pool/main/s/ssmtp/ssmtp_2.64.orig.tar.bz2;
|
2011-04-06 11:41:36 +00:00
|
|
|
sha256 = "0dps8s87ag4g3jr6dk88hs9zl46h3790marc5c2qw7l71k4pvhr2";
|
2007-08-07 22:22:31 +00:00
|
|
|
};
|
2011-04-06 11:41:36 +00:00
|
|
|
|
2017-03-25 01:46:51 +00:00
|
|
|
# A request has been made to merge this patch into ssmtp.
|
|
|
|
# See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=858781
|
|
|
|
patches = [ ./ssmtp_support_AuthPassFile_parameter.patch ];
|
|
|
|
|
2018-07-25 21:44:21 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--sysconfdir=/etc"
|
|
|
|
(stdenv.lib.enableFeature tlsSupport "ssl")
|
|
|
|
];
|
2011-04-06 11:41:36 +00:00
|
|
|
|
|
|
|
postConfigure =
|
|
|
|
''
|
|
|
|
# Don't run the script that interactively generates a config file.
|
|
|
|
# Also don't install the broken, cyclic symlink /lib/sendmail.
|
|
|
|
sed -e '/INSTALLED_CONFIGURATION_FILE/d' \
|
|
|
|
-e 's|/lib/sendmail|$(TMPDIR)/sendmail|' \
|
|
|
|
-i Makefile
|
2018-11-29 04:50:02 +00:00
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace '$(INSTALL) -s' '$(INSTALL) -s --strip-program $(STRIP)'
|
2011-04-06 11:41:36 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
installFlags = "etcdir=$(out)/etc";
|
|
|
|
|
2007-08-07 22:22:31 +00:00
|
|
|
installTargets = [ "install" "install-sendmail" ];
|
2018-05-03 05:58:11 +00:00
|
|
|
|
2007-11-08 17:48:52 +00:00
|
|
|
buildInputs = stdenv.lib.optional tlsSupport openssl;
|
2016-08-02 16:06:29 +00:00
|
|
|
|
2019-01-04 19:33:51 +00:00
|
|
|
NIX_LDFLAGS = stdenv.lib.optional tlsSupport [ "-lcrypto" ];
|
|
|
|
|
2017-03-25 01:46:51 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
platforms = platforms.linux;
|
2018-08-11 12:34:24 +00:00
|
|
|
license = licenses.gpl2;
|
2017-03-25 01:46:51 +00:00
|
|
|
maintainers = with maintainers; [ basvandijk ];
|
2016-08-02 16:06:29 +00:00
|
|
|
};
|
2007-08-07 22:22:31 +00:00
|
|
|
}
|