Nix-shell shebang: Difference between revisions
imported>Mausch Add link to new CLI docs |
imported>Tobias.bora No edit summary |
||
Line 123: | Line 123: | ||
echo hello world | echo hello world | ||
</syntaxHighlight> | </syntaxHighlight> | ||
== Flake == | |||
It is also possible to make it work for flake like in: | |||
<syntaxHighlight lang="bash"> | |||
#!/usr/bin/env -S nix shell nixpkgs#bash nixpkgs#hello nixpkgs#cowsay --command bash | |||
hello | cowsay | |||
</syntaxHighlight> | |||
The [https://nixos.org/manual/nix/stable/command-ref/new-cli/nix.html?highlight=shebang#shebang-interpreter doc] mentions that it should be possible to run more complex commands using multiple lines, but it does not work for me as reported [here https://github.com/NixOS/nixpkgs/issues/280033]. | |||
== Performance == | == Performance == |