From ec15b0dfb49af79e13f380719c850194762dec63 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 27 Apr 2016 13:35:30 +0200 Subject: rmail --- custom/uucp.nix | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) (limited to 'custom') diff --git a/custom/uucp.nix b/custom/uucp.nix index 602f95fd..164a5e02 100644 --- a/custom/uucp.nix +++ b/custom/uucp.nix @@ -172,20 +172,28 @@ in { environment.systemPackages = with pkgs; [ uucp - (pkgs.writeScriptBin "rmail" '' - #!${pkgs.stdenv.shell} + ({ stdenv }: stdenv.lib.mkDerivation { + name = "rmail"; + src = pkgs.writeScript "rmail" '' + #!${pkgs.stdenv.shell} - # Dummy UUCP rmail command for postfix/qmail systems + # Dummy UUCP rmail command for postfix/qmail systems - IFS=" " read junk from junk junk junk junk junk junk junk relay + IFS=" " read junk from junk junk junk junk junk junk junk relay - case "$from" in - *[@!]*) ;; - *) from="$from@$relay";; - esac + case "$from" in + *[@!]*) ;; + *) from="$from@$relay";; + esac - exec /var/setuid-wrappers/sendmail -i -f "$from" -- "$@" - '') + exec /var/setuid-wrappers/sendmail -i -f "$from" -- "$@" + ''; + builder = pkgs.writeScript "builder" '' + #!${stdenv.shell} + mkdir -p $out/bin + ln -s ${src} $out/bin/rmail + ''; + }); ]; }; } -- cgit v1.2.3