2017-02-23 08:57:53 +01:00
|
|
|
{ stdenv, lib, fetchurl, autoreconfHook, pkgconfig
|
2017-03-08 08:35:33 +01:00
|
|
|
, openssl, netcat-gnu, gnutls, gsasl, libidn, Security
|
|
|
|
, systemd ? null }:
|
2013-07-19 00:53:06 +02:00
|
|
|
|
2017-02-23 08:57:53 +01:00
|
|
|
let
|
|
|
|
tester = "n"; # {x| |p|P|n|s}
|
|
|
|
journal = if stdenv.isLinux then "y" else "n";
|
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
2015-01-09 17:31:10 +01:00
|
|
|
name = "msmtp-${version}";
|
2017-02-23 08:57:53 +01:00
|
|
|
version = "1.6.6";
|
2007-09-03 14:10:57 +02:00
|
|
|
|
2008-01-30 18:20:48 +01:00
|
|
|
src = fetchurl {
|
2015-01-09 17:31:10 +01:00
|
|
|
url = "mirror://sourceforge/msmtp/${name}.tar.xz";
|
2017-02-23 08:56:28 +01:00
|
|
|
sha256 = "0ppvww0sb09bnsrpqnvlrn8vx231r24xn2iiwpy020mxc8gxn5fs";
|
2007-09-03 14:10:57 +02:00
|
|
|
};
|
|
|
|
|
2017-02-23 08:57:53 +01:00
|
|
|
patches = [
|
|
|
|
./paths.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [ openssl gnutls gsasl libidn ]
|
2015-11-19 08:38:11 +01:00
|
|
|
++ stdenv.lib.optional stdenv.isDarwin Security;
|
2017-02-23 08:57:53 +01:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkgconfig ];
|
2015-11-19 08:38:11 +01:00
|
|
|
|
|
|
|
configureFlags =
|
|
|
|
stdenv.lib.optional stdenv.isDarwin [ "--with-macosx-keyring" ];
|
2010-05-27 21:33:33 +02:00
|
|
|
|
2015-01-09 17:31:10 +01:00
|
|
|
postInstall = ''
|
2017-02-23 08:57:53 +01:00
|
|
|
substitute scripts/msmtpq/msmtpq $out/bin/msmtpq \
|
|
|
|
--replace @msmtp@ $out/bin/msmtp \
|
2017-03-08 08:35:33 +01:00
|
|
|
--replace @nc@ ${netcat-gnu}/bin/nc \
|
2017-02-23 08:57:53 +01:00
|
|
|
--replace @journal@ ${journal} \
|
|
|
|
${lib.optionalString (journal == "y") "--replace @systemdcat@ ${systemd}/bin/systemd-cat" } \
|
|
|
|
--replace @test@ ${tester}
|
|
|
|
|
|
|
|
substitute scripts/msmtpq/msmtp-queue $out/bin/msmtp-queue \
|
|
|
|
--replace @msmtpq@ $out/bin/msmtpq
|
|
|
|
|
|
|
|
chmod +x $out/bin/*
|
2015-01-09 17:31:10 +01:00
|
|
|
'';
|
|
|
|
|
2017-02-23 08:57:53 +01:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Simple and easy to use SMTP client with excellent sendmail compatibility";
|
|
|
|
homepage = "http://msmtp.sourceforge.net/";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = with maintainers; [ garbas peterhoeg ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
2007-09-03 14:10:57 +02:00
|
|
|
}
|