Set SKIP_CC_CVMFS=1 in nix-shell pure mode to avoid CVMFS pollution

This commit is contained in:
Tyson Whitehead
2018-04-25 13:50:42 -04:00
parent b3a150a471
commit 9ebec6056b
3 changed files with 17 additions and 15 deletions

View File

@@ -170,19 +170,9 @@ channel to the clusters until fixed.
The `nix-shell` command can be used to enter a non-sandboxed version
of the build environment from the top-level directory. Passing the
`--pure` option causes it to purge the environment. RHEL and Fedora
do not guard against multiple evaluations of the */etc/profile.d*
scripts though, so the default *~/.bashrc* will restore it unless it
is modified to not source */etc/bashrc* when `__ETC_PROFILE_SOURCED`
is set
```bash
sed -i -e 's|^\(\s*\)\(\. /etc/bashrc\)\s*$|\1test -n "$__ETC_PROFILE_SOURCED" \|\| \2|' ~/.bashrc
```
With this one-time change, a purged simulated build environment can be
entered by running
`--pure` option causes it to purge the environment (RHEL and Fedora do
not guard against multiple evaluations of the */etc/profile.d* scripts
via `__ETC_PROFILE_SOURCED` so this may not be 100% effective)
```bash
nix-shell --pure --attr attribute