2007-11-08 17:48:52 +00:00
|
|
|
{stdenv, fetchurl, tlsSupport ? false, openssl ? null}:
|
|
|
|
|
|
|
|
assert tlsSupport -> openssl != null;
|
2007-08-07 23:22:31 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2011-04-06 12:41:36 +01:00
|
|
|
name = "ssmtp-2.64";
|
|
|
|
|
2007-08-07 23:22:31 +01:00
|
|
|
src = fetchurl {
|
2015-05-21 22:52:24 +01:00
|
|
|
url = mirror://debian/pool/main/s/ssmtp/ssmtp_2.64.orig.tar.bz2;
|
2011-04-06 12:41:36 +01:00
|
|
|
sha256 = "0dps8s87ag4g3jr6dk88hs9zl46h3790marc5c2qw7l71k4pvhr2";
|
2007-08-07 23:22:31 +01:00
|
|
|
};
|
2011-04-06 12:41:36 +01:00
|
|
|
|
|
|
|
configureFlags = "--sysconfdir=/etc ${if tlsSupport then "--enable-ssl" else ""}";
|
|
|
|
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
|
|
|
installFlags = "etcdir=$(out)/etc";
|
|
|
|
|
2007-08-07 23:22:31 +01:00
|
|
|
installTargets = [ "install" "install-sendmail" ];
|
2011-04-06 12:41:36 +01:00
|
|
|
|
2007-11-08 17:48:52 +00:00
|
|
|
buildInputs = stdenv.lib.optional tlsSupport openssl;
|
2007-08-07 23:22:31 +01:00
|
|
|
}
|