nix-monitored
nix-monitored copied to clipboard
Wrapped `nix-shell` binary breaks Nix shell shebang
Any script that uses the nix-shell shebang when nix.monitored.enable = true;
is interpreted as a Nix expression instead of the chosen interpreter.
For example, the following script:
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p inotify-tools
echo "test"
produces the following error:
error: undefined variable 'echo'
at /fake/path/example.sh:4:1:
3|
4| echo "test"
| ^
5|
With the nix-monitored module enabled, is there any built-in way to access the original nix-shell binary? Perhaps this could be worked around by providing a nix-shell-unwrapped
binary in the path (if that isn't already a thing).
Thanks