Add stdenvNoCC

This is a standard environment that doesn't contain a C/C++
compiler. This is mostly to prevent trivial builders like runCommand
and substituteAll from pulling in gcc for simple configuration changes
on NixOS.

+6 -4
+1 -1
nixos/modules/system/activation/top-level.nix
··· 98 # `switch-to-configuration' that activates the configuration and 99 # makes it bootable. 100 baseSystem = showWarnings ( 101 - if [] == failed then pkgs.stdenv.mkDerivation { 102 name = let hn = config.networking.hostName; 103 nn = if (hn != "") then hn else "unnamed"; 104 in "nixos-system-${nn}-${config.system.nixosLabel}";
··· 98 # `switch-to-configuration' that activates the configuration and 99 # makes it bootable. 100 baseSystem = showWarnings ( 101 + if [] == failed then pkgs.stdenvNoCC.mkDerivation { 102 name = let hn = config.networking.hostName; 103 nn = if (hn != "") then hn else "unnamed"; 104 in "nixos-system-${nn}-${config.system.nixosLabel}";
+1 -1
nixos/modules/system/etc/etc.nix
··· 8 9 etc' = filter (f: f.enable) (attrValues config.environment.etc); 10 11 - etc = pkgs.stdenv.mkDerivation { 12 name = "etc"; 13 14 builder = ./make-etc.sh;
··· 8 9 etc' = filter (f: f.enable) (attrValues config.environment.etc); 10 11 + etc = pkgs.stdenvNoCC.mkDerivation { 12 name = "etc"; 13 14 builder = ./make-etc.sh;
+2 -2
pkgs/build-support/substitute/substitute-all.nix
··· 1 - { stdenv }: 2 3 args: 4 5 # see the substituteAll in the nixpkgs documentation for usage and constaints 6 - stdenv.mkDerivation ({ 7 name = if args ? name then args.name else baseNameOf (toString args.src); 8 builder = ./substitute-all.sh; 9 inherit (args) src;
··· 1 + { stdenvNoCC }: 2 3 args: 4 5 # see the substituteAll in the nixpkgs documentation for usage and constaints 6 + stdenvNoCC.mkDerivation ({ 7 name = if args ? name then args.name else baseNameOf (toString args.src); 8 builder = ./substitute-all.sh; 9 inherit (args) src;
+2
pkgs/top-level/all-packages.nix
··· 74 else 75 stdenv); 76 77 # For convenience, allow callers to get the path to Nixpkgs. 78 path = ../..; 79
··· 74 else 75 stdenv); 76 77 + stdenvNoCC = stdenv.override { cc = null; }; 78 + 79 # For convenience, allow callers to get the path to Nixpkgs. 80 path = ../..; 81