Nix-shell shebang: Difference between revisions

imported>Turion
Add section Haskell
imported>Mausch
Add link to new CLI docs
Line 7: Line 7:
The first shebang line is always <code>#! /usr/bin/env nix-shell</code>.<br>
The first shebang line is always <code>#! /usr/bin/env nix-shell</code>.<br>
The second shebang line declares the script language and the script dependencies.
The second shebang line declares the script language and the script dependencies.
As of Nix 2.19.0 you can also use the new CLI <code>nix shell</code> and flakes to define shebangs. See [https://nixos.org/manual/nix/stable/command-ref/new-cli/nix.html?highlight=shebang#shebang-interpreter docs].


== Examples ==
== Examples ==