ssmtp: cleanup, format
This commit is contained in:
parent
9733d7e077
commit
ae99f5aa96
|
@ -1,12 +1,11 @@
|
||||||
{lib, stdenv, fetchurl, tlsSupport ? true, openssl ? null}:
|
{ lib, stdenv, fetchurl, tlsSupport ? true, openssl }:
|
||||||
|
|
||||||
assert tlsSupport -> openssl != null;
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "ssmtp";
|
||||||
stdenv.mkDerivation {
|
version = "2.64";
|
||||||
name = "ssmtp-2.64";
|
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://debian/pool/main/s/ssmtp/ssmtp_2.64.orig.tar.bz2";
|
url = "mirror://debian/pool/main/s/ssmtp/ssmtp_${version}.orig.tar.bz2";
|
||||||
sha256 = "0dps8s87ag4g3jr6dk88hs9zl46h3790marc5c2qw7l71k4pvhr2";
|
sha256 = "0dps8s87ag4g3jr6dk88hs9zl46h3790marc5c2qw7l71k4pvhr2";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -19,16 +18,15 @@ stdenv.mkDerivation {
|
||||||
(lib.enableFeature tlsSupport "ssl")
|
(lib.enableFeature tlsSupport "ssl")
|
||||||
];
|
];
|
||||||
|
|
||||||
postConfigure =
|
postConfigure = ''
|
||||||
''
|
# Don't run the script that interactively generates a config file.
|
||||||
# Don't run the script that interactively generates a config file.
|
# Also don't install the broken, cyclic symlink /lib/sendmail.
|
||||||
# Also don't install the broken, cyclic symlink /lib/sendmail.
|
sed -e '/INSTALLED_CONFIGURATION_FILE/d' \
|
||||||
sed -e '/INSTALLED_CONFIGURATION_FILE/d' \
|
-e 's|/lib/sendmail|$(TMPDIR)/sendmail|' \
|
||||||
-e 's|/lib/sendmail|$(TMPDIR)/sendmail|' \
|
-i Makefile
|
||||||
-i Makefile
|
substituteInPlace Makefile \
|
||||||
substituteInPlace Makefile \
|
--replace '$(INSTALL) -s' '$(INSTALL) -s --strip-program $(STRIP)'
|
||||||
--replace '$(INSTALL) -s' '$(INSTALL) -s --strip-program $(STRIP)'
|
'';
|
||||||
'';
|
|
||||||
|
|
||||||
installFlags = [ "etcdir=$(out)/etc" ];
|
installFlags = [ "etcdir=$(out)/etc" ];
|
||||||
|
|
||||||
|
@ -39,6 +37,7 @@ stdenv.mkDerivation {
|
||||||
NIX_LDFLAGS = lib.optionalString tlsSupport "-lcrypto";
|
NIX_LDFLAGS = lib.optionalString tlsSupport "-lcrypto";
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
description = "simple MTA to deliver mail from a computer to a mail hub";
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
license = licenses.gpl2;
|
license = licenses.gpl2;
|
||||||
maintainers = with maintainers; [ basvandijk ];
|
maintainers = with maintainers; [ basvandijk ];
|
||||||
|
|
Loading…
Reference in a new issue