Start an interactive shell based on a Nix expression. See also:
nix3 shell
. More information: https://nixos.org/manual/nix/stable/command-ref/nix-shell.html.
shell.nix
or default.nix
in the current directory:nix-shell
nix-shell --run "command argument1 argument2 ..."
default.nix
in the current directory:nix-shell default.nix
nix-shell --packages package1 package2 ...
nix-shell --packages package1 package2 ... -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/nixpkgs_revision.tar.gz
#!-scripts
(see https://nixos.org/manual/nix/stable/#use-as-a-interpreter):nix-shell -i interpreter --packages package1 package2 ...