-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Static nix-shell shebangs #447
Comments
This is my solution for python: https://github.com/wiedzmin/nixos-config/blob/master/modules/util.nix#L9. Will look into your PoC, looks interesting. |
Thank you for your contribution! I marked this issue as stale due to inactivity. If this remains inactive for another 7 days, I will close this issue. Please read the relevant sections below before commenting. If you are the original author of the issue
If you are not the original author of the issue
Memorandum on closing issuesIf you have nothing of substance to add, please refrain from commenting and allow the bot close the issue. Also, don't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen--nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort. |
This is just a proof of concept and not very actionable at this point. It would need quite a bit of polishing before it could be included in home-manager. I'll close this for now. Please leave a message if you are interested in this issue and think that it should be re-opened. |
I noticed that there are a few reactions to this issue. That may be a reason to leave it open. I do not plan to work on this though, at least not in the near future. The stale bot was probably added to cut down on the backlog, so I'll leave this closed unless somebody wants to push it forward. I'd be happy if somebody else comes up with a solution that can be integrated into home-manager. |
Yeah, I think it is a good idea. But I would suggest creating a separate tool that provides this feature, then we can use it here. It would then also be useful for people not using Home Manager. |
I agree, it would be very nice to have this as an external tool. It's currently hard to integrate such a tool into the home-manager and nixos profile generation though. The scripts should be wrapped/patched at " |
I want to use
nix-shell
shebangs in my personal script collection to make sure all the needed dependencies are available. That has two disadvantages however:So what I'd actually like is nix-shell like dependency declaration that is resolved statically whenever I update my channels. I've hacked together a proof of concept to do this in home-manager: I iterate through all my scripts, parse the nix-shell shebang line and generate a wrapper script that sets
PATH
. It is very hacky at the moment and I'm not sure yet if I will improve it in the future, but I thought it couldn't hurt to share it here. What do you think about including something similar as ahome-manager
library function?Here is my POC which I import in my
home.nix
.The text was updated successfully, but these errors were encountered: