nix-shell shebangs run shellHook from outer shell?! #344

Open
opened 2024-05-23 20:44:24 +00:00 by jade · 3 comments
Owner
#!/usr/bin/env nix-shell
#!nix-shell -i python3 -p 'python3.withPackages (ps: [ ps.requests ])'

This should never happen, goodness gracious. If you run from inside a nix shell that has a shellHook, it will run the shellHook again in the complete wrong context. When processing a shebang imo you should Just Not Use The shellHook.

lix/lix-nixos-module » ./update_pins.py
Hey there!

If you're thinking of working on Lix, please consider talking to us about it!
You should be aware that we are not accepting major features without some condi
tions,
and we highly recommend looking at our freeze status page on the wiki:
  https://wiki.lix.systems/books/lix-contributors/page/freezes-and-recommended-
contributions

We also have an overview of the codebase at
  https://wiki.lix.systems/books/lix-contributors/page/codebase-overview,
and other helpful information on the wiki.

But above all else, we want to hear from you!
We can help you figure out where in the codebase to look for whatever you want 
to do,
and we'd like to work together with all contributors as much as possible.
Lix is a collaborative project :)

You can open an issue at https://git.lix.systems/lix-project/lix/issues
or chat with us on Matrix: #space:lix.systems.

(Run `touch .nocontribmsg` to hide this message.)

Immediate action item: fix the Lix shellHook to check the workdir is actually Lix.

``` #!/usr/bin/env nix-shell #!nix-shell -i python3 -p 'python3.withPackages (ps: [ ps.requests ])' ``` This should never happen, goodness gracious. If you run from inside a nix shell that has a shellHook, it will run the shellHook again in the complete wrong context. When processing a shebang imo you should Just Not Use The shellHook. ``` lix/lix-nixos-module » ./update_pins.py Hey there! If you're thinking of working on Lix, please consider talking to us about it! You should be aware that we are not accepting major features without some condi tions, and we highly recommend looking at our freeze status page on the wiki: https://wiki.lix.systems/books/lix-contributors/page/freezes-and-recommended- contributions We also have an overview of the codebase at https://wiki.lix.systems/books/lix-contributors/page/codebase-overview, and other helpful information on the wiki. But above all else, we want to hear from you! We can help you figure out where in the codebase to look for whatever you want to do, and we'd like to work together with all contributors as much as possible. Lix is a collaborative project :) You can open an issue at https://git.lix.systems/lix-project/lix/issues or chat with us on Matrix: #space:lix.systems. (Run `touch .nocontribmsg` to hide this message.) ``` Immediate action item: fix the Lix shellHook to check the workdir is actually Lix.
jade added the
bug
label 2024-05-23 20:44:35 +00:00
Author
Owner

7a12bc2007

thanks so much @stuebinm

https://git.lix.systems/lix-project/lix/commit/7a12bc2007accb5022037b5a04b0e5475a8bb409 thanks so much @stuebinm
Author
Owner

Leaving this open to track fixing this in the general case as well. But our packaging was definitely busted and is now fixed and that's awesome.

Leaving this open to track fixing this in the general case as well. But our packaging was definitely busted and is now fixed and that's awesome.
Member

oh huh, hadn't even noticed there was an issue for this 🙈

oh huh, hadn't even noticed there was an issue for this 🙈
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#344
No description provided.