1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-02 10:31:36 +00:00
nixpkgs/pkgs/tools/networking/ssmtp/default.nix
Tobias Geerinckx-Rice 5d5044b2ec Use mirror:// URIs for ftp.debian.org
Provide a more robust experience for users with horrible network
hardware (me).
2015-05-22 10:39:27 +02:00

30 lines
846 B
Nix

{stdenv, fetchurl, tlsSupport ? false, openssl ? null}:
assert tlsSupport -> openssl != null;
stdenv.mkDerivation {
name = "ssmtp-2.64";
src = fetchurl {
url = mirror://debian/pool/main/s/ssmtp/ssmtp_2.64.orig.tar.bz2;
sha256 = "0dps8s87ag4g3jr6dk88hs9zl46h3790marc5c2qw7l71k4pvhr2";
};
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";
installTargets = [ "install" "install-sendmail" ];
buildInputs = stdenv.lib.optional tlsSupport openssl;
}