diff options
Diffstat (limited to 'custom')
-rw-r--r-- | custom/uucp.nix | 28 |
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 | } |