You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
nix-shell load file and additional package from command line #16812
I want to load a project's nix environment, plus add a few packages of my own. But nix-shell doesn't support ~ nix-shell shell.nix -p foo bar which would have been very convenient.
Proposed solution
Support loading both a nix for file and additional packages.
1.nix-shell shell.nix -p foo bar
2. `nix-shell -f shell.nix -p foo bar
Alternative solutions
Combining two separate .nix files, somehow. (quite a lot more work).
Hi, thanks for the question.
I'm kinda a newbie but for me seems a bit "strange" as behavior. I'm using nix primarily to have something reproducible and well-documented, so adding package in this way seems counter-intuitive at my eyes.
With my knowledge, to combine two or more nix file, something like this should work:
I'm using nix primarily to have something reproducible and well-documented, so adding package in this way seems counter-intuitive at my eyes.
This is what I mostly use it for as well, but to be able to develop, and be able to use copy paste inside opencode Ai cli tool, I need to also have something xclip. So it's a development requirement that is not needed for running/using the project, but it's something I want. How is this usually solved?
I'm using nix primarily to have something reproducible and well-documented, so adding package in this way seems counter-intuitive at my eyes.
This is what I mostly use it for as well, but to be able to develop, and be able to use copy paste inside opencode Ai cli tool, I need to also have something xclip. So it's a development requirement that is not needed for running/using the project, but it's something I want. How is this usually solved?
I would says this is a system-level problem of having a set up for handle clipboard properly more than a single environment addition
Activity
Filippo-Galli commentedon Nov 14, 2026
Hi, thanks for the question.
I'm kinda a newbie but for me seems a bit "strange" as behavior. I'm using nix primarily to have something reproducible and well-documented, so adding package in this way seems counter-intuitive at my eyes.
With my knowledge, to combine two or more nix file, something like this should work:
kaddkaka commentedon Nov 14, 2026
This is what I mostly use it for as well, but to be able to develop, and be able to use copy paste inside opencode Ai cli tool, I need to also have something
xclip. So it's a development requirement that is not needed for running/using the project, but it's something I want. How is this usually solved?Filippo-Galli commentedon Nov 14, 2026
I would says this is a system-level problem of having a set up for handle clipboard properly more than a single environment addition