sane-scripts: port sane-sudo-redirect to nix-shell

This commit is contained in:
Colin 2023-06-07 07:17:26 +00:00
parent 0a8eee8af0
commit b9cc581736
2 changed files with 7 additions and 1 deletions

View File

@ -266,6 +266,11 @@ let
src = ./src;
pkgs = [ "systemd" ];
};
sudo-redirect = static-nix-shell.mkBash {
pname = "sane-sudo-redirect";
src = ./src;
pkgs = [ "coreutils-full" ];
};
};
in
symlinkJoin {

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p coreutils-full
# redirects to $1, when writing to $1 requires sudo permissions.
# i.e. convert a failing command: