mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-14 02:06:16 +02:00
c3f9344cae
Changed `If not command` to `If no command`, also specified that the default shell launched in `nix shell` can be specified with `$SHELL`.
1 KiB
1 KiB
R""(
Examples
-
Start a shell providing
youtube-dl
from thenixpkgs
flake:# nix shell nixpkgs#youtube-dl # youtube-dl --version 2020.11.01.1
-
Start a shell providing GNU Hello from NixOS 20.03:
# nix shell nixpkgs/nixos-20.03#hello
-
Run GNU Hello:
# nix shell nixpkgs#hello -c hello --greeting 'Hi everybody!' Hi everybody!
-
Run GNU Hello in a chroot store:
# nix shell --store ~/my-nix nixpkgs#hello -c hello
-
Start a shell providing GNU Hello in a chroot store:
# nix shell --store ~/my-nix nixpkgs#hello nixpkgs#bashInteractive -c bash
Note that it's necessary to specify
bash
explicitly because your default shell (e.g./bin/bash
) generally will not exist in the chroot.
Description
nix shell
runs a command in an environment in which the $PATH
variable
provides the specified installables. If no command is specified, it starts the
default shell of your user account specified by $SHELL
.
)""