summaryrefslogtreecommitdiff
path: root/custom/uucp.nix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2016-04-27 13:35:30 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2016-04-27 13:35:30 +0200
commitec15b0dfb49af79e13f380719c850194762dec63 (patch)
treeac80658980cde3547d0bc6105e7f9f39db3c06ef /custom/uucp.nix
parentbf23c34ff47ee937262d562ff95a3806ca96b970 (diff)
downloadnixos-ec15b0dfb49af79e13f380719c850194762dec63.tar
nixos-ec15b0dfb49af79e13f380719c850194762dec63.tar.gz
nixos-ec15b0dfb49af79e13f380719c850194762dec63.tar.bz2
nixos-ec15b0dfb49af79e13f380719c850194762dec63.tar.xz
nixos-ec15b0dfb49af79e13f380719c850194762dec63.zip
rmail
Diffstat (limited to 'custom/uucp.nix')
-rw-r--r--custom/uucp.nix28
1 files changed, 18 insertions, 10 deletions
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 {
172 172
173 environment.systemPackages = with pkgs; [ 173 environment.systemPackages = with pkgs; [
174 uucp 174 uucp
175 (pkgs.writeScriptBin "rmail" '' 175 ({ stdenv }: stdenv.lib.mkDerivation {
176 #!${pkgs.stdenv.shell} 176 name = "rmail";
177 src = pkgs.writeScript "rmail" ''
178 #!${pkgs.stdenv.shell}
177 179
178 # Dummy UUCP rmail command for postfix/qmail systems 180 # Dummy UUCP rmail command for postfix/qmail systems
179 181
180 IFS=" " read junk from junk junk junk junk junk junk junk relay 182 IFS=" " read junk from junk junk junk junk junk junk junk relay
181 183
182 case "$from" in 184 case "$from" in
183 *[@!]*) ;; 185 *[@!]*) ;;
184 *) from="$from@$relay";; 186 *) from="$from@$relay";;
185 esac 187 esac
186 188
187 exec /var/setuid-wrappers/sendmail -i -f "$from" -- "$@" 189 exec /var/setuid-wrappers/sendmail -i -f "$from" -- "$@"
188 '') 190 '';
191 builder = pkgs.writeScript "builder" ''
192 #!${stdenv.shell}
193 mkdir -p $out/bin
194 ln -s ${src} $out/bin/rmail
195 '';
196 });
189 ]; 197 ];
190 }; 198 };
191} 199}