nix-shell.2
Start an interactive shell based on a Nix expression. tldr-pages
On several platforms
Several platforms
Start with nix expression in shell.nix or default.nix in the current directory
nix-shellIdentifyRun shell command in non-interactive shell and exit
nix-shell --run "command argument1 argument2 ..."IdentifyStart with expression in default.nix in the current directory
nix-shell default.nixIdentifyStart with packages loaded from nixpkgs
nix-shell --packages package1 package2 ...IdentifyStart with packages loaded from specific nixpkgs revision
nix-shell --packages package1 package2 ... --include nixpkgs=https://github.com/NixOS/nixpkgs/archive/nixpkgs_revision.tar.gzIdentifyEvaluate rest of file in specific interpreter, for use in #!-scripts (see <https://nixos.org/manual/nix/stable/#use-as-a-interpreter>)
nix-shell -i interpreter --packages package1 package2 ...Identify