-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Description
With nix-shell -A, I can pass it a .nix file to run expressions against, but I can't emulate that behavior easily with nix-shell -p. For example, nix-shell -p foo will install foo in my shell. If I run nix-shell '<nixpkgs>' -A foo, that doesn't give me the same thing. If I want something similar, @puffnfresh on IRC suggested this nasty thing:
nix-shell -E 'with import <nixpkgs> { }; runCommand "ignored" { buildInputs = [ (import ./.).foo ]; } ""'
which doesn't seem great. Can we have an easy way to get behavior like -p without relying on NIX_PATH voodoo or the incantation above?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels