Many projects have shell scripts with shebangs to absolute executables i.e. /usr/bin/python
.
Patching all those instances can be tedious and annoying.
That’s why I build envfs fuse filesystem.
envfs is mounted to /usr/bin and returns for symlinks based on what is the process PATH environment variable:
$ ls -l /usr/bin/{bash,python}
lr----x--t 0 root 1 Jan 1970 /usr/bin/bash -> /nix/store/j37555sj2w3xsql3f8qrwbaim7pv67hg-bash-interactive-4.4-p23/bin/bash
lr----x--t 0 root 1 Jan 1970 /usr/bin/python -> /home/joerg/.nix-profile/bin/python
$ cat > foo.py <<EOF
#!/usr/bin/python
print("hello world")
EOF
$ chmod +x ./foo.py
$ ./foo.py
hello world
Set up instruction are on the project page.
Cheers!