nix-shell Command Examples

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.

nix-shell

nix-shell --run "{{command}} {{argument1 argument2 ...}}"

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}}

nix-shell -i {{interpreter}} --packages {{package1 package2 ...}}