Conversation
Notices
-
New in #nix 2.0:
> $ nix run --help
> Usage: nix run <FLAGS>... <INSTALLABLES>...
> Summary: run a shell in which the specified packages are available.
Sweet! Thank you, #nixos IRC!
-
Up until now that has been `nix-shell -E 'with import <nixpkgs> {}; with import ./. {}; stdenv.mkDerivation { name="whatever"; buildInputs=[things i want]; }'`, and now it's just `nix run -f . things i want`.
There has always been `nix-shell -p things i want`, but that's for things in nixpkgs only, not things in your current directory.
-
@jamey There is no trivial way to make nix-shell create an environment of derivations x y z, unless those derivations are in <nixpkgs>, see above.
`nix-shell -A myderivation` will create an environment with the *dependencies* of myderivation.
Now why they created a command with the confusing name "run" instead of adding a parameter to nix-shell, I can't explain.