sane-scripts: port sane-which to nix-shell

This commit is contained in:
Colin 2023-06-07 07:25:43 +00:00
parent 4a18dfeef3
commit 2a1d87650b
2 changed files with 7 additions and 1 deletions

View File

@ -291,6 +291,11 @@ let
src = ./src;
pkgs = [ "coreutils-full" "gnugrep" "gnused" "sane-scripts.ip-check" "systemd" ];
};
which = static-nix-shell.mkBash {
pname = "sane-which";
src = ./src;
pkgs = [ "coreutils-full" "file" ];
};
};
in
symlinkJoin {

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p coreutils-full -p file
# traces a PATH lookup by printing the source, resolution, and any symlinks traversed
# finally, prints the content of the file
echo $1