diff options
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/guix.texi | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index c624c497d2a..05eac9bda96 100644 --- a/doc/guix.texi +++ b/doc/guix.texi | |||
| @@ -6803,20 +6803,26 @@ creating an environment in which search paths only contain package inputs. | |||
| 6803 | 6803 | ||
| 6804 | @item --preserve=@var{regexp} | 6804 | @item --preserve=@var{regexp} |
| 6805 | @itemx -E @var{regexp} | 6805 | @itemx -E @var{regexp} |
| 6806 | @itemx -E @var{var}=@var{value} | ||
| 6806 | When used alongside @option{--pure}, preserve the environment variables | 6807 | When used alongside @option{--pure}, preserve the environment variables |
| 6807 | matching @var{regexp}---in other words, put them on a ``white list'' of | 6808 | matching @var{regexp}---in other words, put them on a ``white list'' of |
| 6808 | environment variables that must be preserved. This option can be repeated | 6809 | environment variables that must be preserved. This option can be |
| 6809 | several times. | 6810 | repeated several times. |
| 6811 | |||
| 6812 | When @var{regexp} contains a variable assignment (with a @samp{=} | ||
| 6813 | character), the @var{var} environment variable is directly set to the | ||
| 6814 | @var{value} in the environment. This is used in the example below to | ||
| 6815 | set the number of threads OpenMPI should use: | ||
| 6810 | 6816 | ||
| 6811 | @example | 6817 | @example |
| 6812 | guix shell --pure --preserve=^SLURM openmpi @dots{} \ | 6818 | guix shell --pure --preserve=^SLURM -E OMP_NUM_THREADS=16 openmpi @dots{} \ |
| 6813 | -- mpirun @dots{} | 6819 | -- mpirun @dots{} |
| 6814 | @end example | 6820 | @end example |
| 6815 | 6821 | ||
| 6816 | This example runs @command{mpirun} in a context where the only environment | 6822 | This example runs @command{mpirun} in a context where the only environment |
| 6817 | variables defined are @env{PATH}, environment variables whose name starts | 6823 | variables defined are @env{PATH}, environment variables whose name starts |
| 6818 | with @samp{SLURM}, as well as the usual ``precious'' variables (@env{HOME}, | 6824 | with @samp{SLURM}, variable @env{TERM} set to @samp{no=color}, as well as |
| 6819 | @env{USER}, etc.). | 6825 | the usual ``precious'' variables (@env{HOME}, @env{USER}, etc.). |
| 6820 | 6826 | ||
| 6821 | @item --search-paths | 6827 | @item --search-paths |
| 6822 | Display the environment variable definitions that make up the | 6828 | Display the environment variable definitions that make up the |
| @@ -7319,6 +7325,7 @@ creating an environment in which search paths only contain package inputs. | |||
| 7319 | 7325 | ||
| 7320 | @item --preserve=@var{regexp} | 7326 | @item --preserve=@var{regexp} |
| 7321 | @itemx -E @var{regexp} | 7327 | @itemx -E @var{regexp} |
| 7328 | @itemx -E @var{var}=@var{value} | ||
| 7322 | When used alongside @option{--pure}, preserve the environment variables | 7329 | When used alongside @option{--pure}, preserve the environment variables |
| 7323 | matching @var{regexp}---in other words, put them on a ``white list'' of | 7330 | matching @var{regexp}---in other words, put them on a ``white list'' of |
| 7324 | environment variables that must be preserved. This option can be repeated | 7331 | environment variables that must be preserved. This option can be repeated |
