diff options
author | Domen Kožar <domen@dev.si> | 2021-10-17 20:54:00 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-17 20:54:00 -0500 |
commit | 51c812d6bba414611ff874f90733422a9708f6da (patch) | |
tree | 39b7a39ba1346c4533baaaba2ad719a0b2f1297f /doc/manual | |
parent | 97b49041363b4689d3faf7b7bb4e2f64bd7b0584 (diff) | |
parent | ffeec5f283464744fc0ba850622671eb1e91e4c7 (diff) |
Merge pull request #5365 from arafangion/master
Clarify that not all nix packages will use the default build phases
Diffstat (limited to 'doc/manual')
-rw-r--r-- | doc/manual/src/command-ref/nix-shell.md | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/doc/manual/src/command-ref/nix-shell.md b/doc/manual/src/command-ref/nix-shell.md index 72f6730f1..0bd54b955 100644 --- a/doc/manual/src/command-ref/nix-shell.md +++ b/doc/manual/src/command-ref/nix-shell.md @@ -110,13 +110,19 @@ shell in which to build it: ```console $ nix-shell '<nixpkgs>' -A pan -[nix-shell]$ unpackPhase +[nix-shell]$ eval ${unpackPhase:-unpackPhase} [nix-shell]$ cd pan-* -[nix-shell]$ configurePhase -[nix-shell]$ buildPhase +[nix-shell]$ eval ${configurePhase:-configurePhase} +[nix-shell]$ eval ${buildPhase:-buildPhase} [nix-shell]$ ./pan/gui/pan ``` +The reason we use form `eval ${configurePhase:-configurePhase}` here is because +those packages that override these phases do so by exporting the overridden +values in the environment variable of the same name. +Here bash is being told to either evaluate the contents of 'configurePhase', +if it exists as a variable, otherwise evaluate the configurePhase function. + To clear the environment first, and do some additional automatic initialisation of the interactive shell: |