nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at netboot-syslinux-multiplatform 51 lines 1.8 kB view raw
1{ stdenv, fetchurl, lib, tls ? true, gnutls ? null }: 2 3assert tls -> gnutls != null; 4 5stdenv.mkDerivation rec { 6 7 version = "2.2"; 8 pname = "nullmailer"; 9 10 src = fetchurl { 11 url = "https://untroubled.org/nullmailer/nullmailer-${version}.tar.gz"; 12 sha256 = "0md8cf90fl2yf3zh9njjy42a673v4j4ygyq95xg7fzkygdigm1lq"; 13 }; 14 15 buildInputs = lib.optional tls gnutls; 16 17 configureFlags = [ 18 "--sysconfdir=/etc" 19 "--localstatedir=/var" 20 ] ++ lib.optional tls "--enable-tls"; 21 22 installFlags = [ "DESTDIR=$(out)" ]; 23 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. 33 postInstall = '' 34 rm -rf $out/var/ $out/etc/ 35 mv $out/$out/* $out/ 36 rmdir $out/$out 37 ''; 38 39 enableParallelBuilding = true; 40 41 meta = { 42 homepage = "http://untroubled.org/nullmailer/"; 43 description = '' 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. 46 ''; 47 license = lib.licenses.gpl2; 48 platforms = lib.platforms.all; 49 maintainers = with lib.maintainers ; [ sargon ]; 50 }; 51}