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.
This commit is contained in:
parent
518340624d
commit
0cb16a6955
@ -98,7 +98,7 @@ let
|
||||
# `switch-to-configuration' that activates the configuration and
|
||||
# makes it bootable.
|
||||
baseSystem = showWarnings (
|
||||
if [] == failed then pkgs.stdenv.mkDerivation {
|
||||
if [] == failed then pkgs.stdenvNoCC.mkDerivation {
|
||||
name = let hn = config.networking.hostName;
|
||||
nn = if (hn != "") then hn else "unnamed";
|
||||
in "nixos-system-${nn}-${config.system.nixosLabel}";
|
||||
|
@ -8,7 +8,7 @@ let
|
||||
|
||||
etc' = filter (f: f.enable) (attrValues config.environment.etc);
|
||||
|
||||
etc = pkgs.stdenv.mkDerivation {
|
||||
etc = pkgs.stdenvNoCC.mkDerivation {
|
||||
name = "etc";
|
||||
|
||||
builder = ./make-etc.sh;
|
||||
|
@ -1,9 +1,9 @@
|
||||
{ stdenv }:
|
||||
{ stdenvNoCC }:
|
||||
|
||||
args:
|
||||
|
||||
# see the substituteAll in the nixpkgs documentation for usage and constaints
|
||||
stdenv.mkDerivation ({
|
||||
stdenvNoCC.mkDerivation ({
|
||||
name = if args ? name then args.name else baseNameOf (toString args.src);
|
||||
builder = ./substitute-all.sh;
|
||||
inherit (args) src;
|
||||
|
@ -74,6 +74,8 @@ in
|
||||
else
|
||||
stdenv);
|
||||
|
||||
stdenvNoCC = stdenv.override { cc = null; };
|
||||
|
||||
# For convenience, allow callers to get the path to Nixpkgs.
|
||||
path = ../..;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user