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

@@ -35,7 +35,7 @@ self: super: pkgs: with pkgs; {
sambamba = callPackage ./sambamba { };
nixStable = super.nixStable.overrideAttrs
( attrs: { patches = attrs.patches or [] ++ [ ./nix/remote.patch ]; } );
( attrs: { patches = attrs.patches or [] ++ [ ./nix/remote.patch ./nix/cvmfs.patch ]; } );
nix = super.nix.overrideAttrs
( attrs: { patches = attrs.patches or [] ++ [ ./nix/remote.patch ]; } );
( attrs: { patches = attrs.patches or [] ++ [ ./nix/remote.patch ./nix/cvmfs.patch ]; } );
}

12
pkgs/nix/cvmfs.patch Normal file
View File

@@ -0,0 +1,12 @@
diff --git a/scripts/nix-build.in b/scripts/nix-build.in
index bb61e1c..d58d687 100755
--- a/scripts/nix-build.in
+++ b/scripts/nix-build.in
@@ -276,6 +276,7 @@ foreach my $expr (@exprs) {
}
# NixOS hack: prevent /etc/bashrc from sourcing /etc/profile.
$ENV{'__ETC_PROFILE_SOURCED'} = 1;
+ $ENV{'SKIP_CC_CVMFS'} = 1;
}
$ENV{'NIX_BUILD_TOP'} = $ENV{'TMPDIR'} = $ENV{'TEMPDIR'} = $ENV{'TMP'} = $ENV{'TEMP'} = $tmp;
$ENV{'NIX_STORE'} = $Nix::Config::storeDir;