1 { stdenv, fetchurl, lib, tls ? true, gnutls ? null }:
3 assert tls -> gnutls != null;
5 stdenv.mkDerivation rec {
11 url = "https://untroubled.org/nullmailer/nullmailer-${version}.tar.gz";
12 sha256 = "0md8cf90fl2yf3zh9njjy42a673v4j4ygyq95xg7fzkygdigm1lq";
15 buildInputs = lib.optional tls gnutls;
19 "--localstatedir=/var"
20 ] ++ lib.optional tls "--enable-tls";
22 installFlags = [ "DESTDIR=$(out)" ];
24 # We have to remove the ''var'' directory, since nix can't handle named pipes
25 # and we can't use it in the store anyway. Same for ''etc''.
26 # The second line is need, because the installer of nullmailer will copy its
27 # own prepared version of ''etc'' and ''var'' and also uses the prefix path (configure phase)
28 # for hardcoded absolute references to its own binary farm, e.g. sendmail binary is
29 # calling nullmailer-inject binary. Since we can't configure inside the store of
30 # the derivation we need both directories in the root, but don't want to put them there
31 # during install, hence we have to fix mumbling inside the install directory.
32 # This is kind of a hack, but the only way I know of, yet.
34 rm -rf $out/var/ $out/etc/
39 enableParallelBuilding = true;
42 homepage = "http://untroubled.org/nullmailer/";
44 A sendmail/qmail/etc replacement MTA for hosts which relay to a fixed set of smart relays.
45 It is designed to be simple to configure, secure, and easily extendable.
47 license = lib.licenses.gpl2Plus;
48 platforms = lib.platforms.all;
49 maintainers = with lib.maintainers ; [ sargon ];