diff options
author | Tuomas Tynkkynen <tuomas@tuxera.com> | 2017-05-14 14:24:20 +0300 |
---|---|---|
committer | Tuomas Tynkkynen <tuomas@tuxera.com> | 2017-05-14 14:24:20 +0300 |
commit | beb43a651cbdd4ab0e153567b72bfaeacb0f28f6 (patch) | |
tree | 8ab2721b9b05a787f9436a1f49f74d64f1c35dd6 /pkgs/servers | |
parent | 51e0f8f759250b77a7ab7529f5c7da5053465ff4 (diff) | |
parent | d22b1d0ba14329853af18869447a78419f1e5a6d (diff) | |
download | nixlib-beb43a651cbdd4ab0e153567b72bfaeacb0f28f6.tar nixlib-beb43a651cbdd4ab0e153567b72bfaeacb0f28f6.tar.gz nixlib-beb43a651cbdd4ab0e153567b72bfaeacb0f28f6.tar.bz2 nixlib-beb43a651cbdd4ab0e153567b72bfaeacb0f28f6.tar.lz nixlib-beb43a651cbdd4ab0e153567b72bfaeacb0f28f6.tar.xz nixlib-beb43a651cbdd4ab0e153567b72bfaeacb0f28f6.tar.zst nixlib-beb43a651cbdd4ab0e153567b72bfaeacb0f28f6.zip |
Merge remote-tracking branch 'upstream/master' into staging
Diffstat (limited to 'pkgs/servers')
-rw-r--r-- | pkgs/servers/mail/nullmailer/default.nix | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/pkgs/servers/mail/nullmailer/default.nix b/pkgs/servers/mail/nullmailer/default.nix new file mode 100644 index 000000000000..44840c91b058 --- /dev/null +++ b/pkgs/servers/mail/nullmailer/default.nix @@ -0,0 +1,51 @@ +{ stdenv, fetchurl, lib, tls ? true, gnutls ? null }: + +assert tls -> gnutls != null; + +stdenv.mkDerivation rec { + + version = "2.0"; + name = "nullmailer-${version}"; + + src = fetchurl { + url = "http://untroubled.org/nullmailer/nullmailer-${version}.tar.gz"; + sha256 = "112ghdln8q9yljc8kp9mc3843mh0fyb4rig2v4q2dzy1l324q3yp"; + }; + + buildInputs = stdenv.lib.optional tls gnutls; + + configureFlags = [ + "--sysconfdir=/etc" + "--localstatedir=/var" + ] ++ stdenv.lib.optional tls "--enable-tls"; + + installFlags = [ "DESTDIR=$(out)" ]; + + # We have to remove the ''var'' directory, since nix can't handle named pipes + # and we can't use it in the store anyway. Same for ''etc''. + # The second line is need, because the installer of nullmailer will copy its + # own prepared version of ''etc'' and ''var'' and also uses the prefix path (configure phase) + # for hardcoded absolute references to its own binary farm, e.g. sendmail binary is + # calling nullmailer-inject binary. Since we can't configure inside the store of + # the derivation we need both directories in the root, but don't want to put them there + # during install, hence we have to fix mumbling inside the install directory. + # This is kind of a hack, but the only way I know of, yet. + postInstall = '' + rm -rf $out/var/ $out/etc/ + mv $out/$out/* $out/ + rmdir $out/$out + ''; + + enableParallelBuilding = true; + + meta = { + homepage = "http://untroubled.org/nullmailer/"; + description = '' + A sendmail/qmail/etc replacement MTA for hosts which relay to a fixed set of smart relays. + It is designed to be simple to configure, secure, and easily extendable. + ''; + license = lib.licenses.gpl2; + platforms = lib.platforms.all; + maintainers = with lib.maintainers ; [ sargon ]; + }; +} |