Since that document, Python PEP 723 was approved, see https://peps.python.org/pep-0723/ and https://packaging.python.org/en/latest/specifications/inline...
Similarly, Rust RFC 3502 was approved and an unstable implementation is available, see https://rust-lang.github.io/rfcs/3502-cargo-script.html
reply
#!/usr/bin/env nix-shell #!nix-shell -i bash -p cowsay imagemagick identify "$1" | cowsay