70 lines
1.0 KiB
Plaintext
70 lines
1.0 KiB
Plaintext
==================
|
|
empty
|
|
==================
|
|
|
|
---
|
|
|
|
(source_file)
|
|
|
|
==================
|
|
nix-shell with a bash payload
|
|
==================
|
|
|
|
#!/usr/bin/env nix-shell
|
|
#!nix-shell -i bash
|
|
echo "hello, world!"
|
|
---
|
|
|
|
(source_file
|
|
(nix_shell_directive
|
|
(interpreter)))
|
|
|
|
==================
|
|
nix-shell with interspersed payload
|
|
==================
|
|
|
|
#!/usr/bin/env nix-shell
|
|
echo hello
|
|
echo again
|
|
#!nix-shell -i bash
|
|
echo everybody
|
|
---
|
|
|
|
(source_file
|
|
(nix_shell_directive
|
|
(interpreter)))
|
|
|
|
==================
|
|
nix-shell with multiple directives
|
|
==================
|
|
|
|
#!/usr/bin/env nix-shell
|
|
echo hello
|
|
#!nix-shell -p gnused
|
|
#!nix-shell -i bash
|
|
echo again
|
|
#!nix-shell
|
|
echo everybody
|
|
---
|
|
|
|
(source_file
|
|
(nix_shell_directive)
|
|
(nix_shell_directive
|
|
(interpreter))
|
|
(nix_shell_directive))
|
|
|
|
==================
|
|
nix-shell with conflicting interpreters (last wins, but good luck with that)
|
|
==================
|
|
|
|
#!/usr/bin/env nix-shell
|
|
#!nix-shell -i bash
|
|
#!nix-shell -i python3
|
|
---
|
|
|
|
(source_file
|
|
(nix_shell_directive
|
|
(interpreter))
|
|
(nix_shell_directive
|
|
(interpreter)))
|