-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nix: Multiline shebang not working #280033
Comments
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/nix-shell-shebang-flakes-haskell/38064/4 |
This only works with nix 2.19 and up. |
Ok thanks, I tried to run the latest nix version via nix shell, but it was of course only in the current shell, while I guess
documented somewhere? |
Reopening since the nixVersions.stable update was reverted. |
On second review, I don't know that we can do much in nixpkgs. Upgrading nix is dependent on nix upstream providing a version of nix > 2.19 that also does not cause regressions especially for our nixos tests. And the documentation is also out of our control. |
Describe the bug
The documentation here https://nixos.org/manual/nix/stable/command-ref/new-cli/nix.html?highlight=shebang#shebang-interpreter mentions that one can create an executable file:
and run it, but I get an error:
I found a solution using the
-S
option ofenv
like:This works, but I don't see how to run this way more complex stuff. For instance, the documentation mentions that we can run:
but I get the same error.
Steps To Reproduce
Steps to reproduce the behavior: just described in previous section.
Notify maintainers
Metadata
I'm running NixOs 2caf4ef
Add a 👍 reaction to issues you find important.
The text was updated successfully, but these errors were encountered: