See also GitHub - xzfc/cached-nix-shell: Instant startup time for nix-shell.
And Nix flakes also allow faster shells thanks to evaluation cache. Edit: Not sure if it can be used in shebang, cannot find a reference now.
But yours adds extra convenience of handling Haskell dependencies more simply.
Nice! Reminds me of https://github.com/igor-petruk/scriptisto
Most of the time I start in bash, thinking the task won’t be too complicated… but then before I know it I’m having to reread the bash man pages to figure out how arrays work for the thousandth time.
This is too real
There’s an earlier project with the same purpose and name by @bennofs here, although it hasn’t seen any updates this year, and I don’t believe it compiles the script itself: GitHub - bennofs/nix-script: A shebang for running scripts inside nix-shell with defined dependencies