diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-07-31 16:02:37 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-07-31 16:02:37 +0200 |
commit | 2ae9ac23698276c3e045d9b21f5c6ffb40f38324 (patch) | |
tree | 73ffe63eacea1ece2180a05e5a951756295ee2c0 /doc/manual/src/command-ref/nix-shell.md | |
parent | 1d0a7b54fa330b041a720932ee4e05dcad1d2d5c (diff) |
console -> shell
Diffstat (limited to 'doc/manual/src/command-ref/nix-shell.md')
-rw-r--r-- | doc/manual/src/command-ref/nix-shell.md | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/doc/manual/src/command-ref/nix-shell.md b/doc/manual/src/command-ref/nix-shell.md index 27826717b..fc42a202a 100644 --- a/doc/manual/src/command-ref/nix-shell.md +++ b/doc/manual/src/command-ref/nix-shell.md @@ -110,7 +110,7 @@ The following common options are supported: To build the dependencies of the package Pan, and start an interactive shell in which to build it: -```shell +```console $ nix-shell '<nixpkgs>' -A pan [nix-shell]$ unpackPhase [nix-shell]$ cd pan-* @@ -122,7 +122,7 @@ $ nix-shell '<nixpkgs>' -A pan To clear the environment first, and do some additional automatic initialisation of the interactive shell: -```shell +```console $ nix-shell '<nixpkgs>' -A pan --pure \ --command 'export NIX_DEBUG=1; export NIX_CORES=8; return' ``` @@ -131,13 +131,13 @@ Nix expressions can also be given on the command line using the `-E` and `-p` flags. For instance, the following starts a shell containing the packages `sqlite` and `libX11`: -```shell +```console $ nix-shell -E 'with import <nixpkgs> { }; runCommand "dummy" { buildInputs = [ sqlite xorg.libX11 ]; } ""' ``` A shorter way to do the same is: -```shell +```console $ nix-shell -p sqlite xorg.libX11 [nix-shell]$ echo $NIX_LDFLAGS … -L/nix/store/j1zg5v…-sqlite-3.8.0.2/lib -L/nix/store/0gmcz9…-libX11-1.6.1/lib … @@ -147,7 +147,7 @@ Note that `-p` accepts multiple full nix expressions that are valid in the `buildInputs = [ ... ]` shown above, not only package names. So the following is also legal: -```shell +```console $ nix-shell -p sqlite 'git.override { withManual = false; }' ``` @@ -156,7 +156,7 @@ it by passing `-I` or setting `NIX_PATH`. For example, the following gives you a shell containing the Pan package from a specific revision of Nixpkgs: -```shell +```console $ nix-shell -p pan -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/8a3eea054838b55aca962c3fbde9c83c102b8bf2.tar.gz [nix-shell:~]$ pan --version |