Pass ‘config’ to stdenv/generic/default.nix
This is a backport of cf8daf63120adedbeaf5bc8c2f396be2496a741e in stdenv-updates (sans the userHook stuff).
This commit is contained in:
parent
0db6ea6f76
commit
deaef8abaf
@ -10,7 +10,7 @@
|
|||||||
# system, e.g., cygwin and mingw builds on i686-cygwin. Most people
|
# system, e.g., cygwin and mingw builds on i686-cygwin. Most people
|
||||||
# can ignore it.
|
# can ignore it.
|
||||||
|
|
||||||
{system, stdenvType ? system, allPackages ? import ../.., platform}:
|
{ system, stdenvType ? system, allPackages ? import ../.., platform, config }:
|
||||||
|
|
||||||
assert system != "i686-cygwin" -> system == stdenvType;
|
assert system != "i686-cygwin" -> system == stdenvType;
|
||||||
|
|
||||||
@ -24,7 +24,7 @@ rec {
|
|||||||
# be used with care, since many Nix packages will not build properly
|
# be used with care, since many Nix packages will not build properly
|
||||||
# with it (e.g., because they require GNU Make).
|
# with it (e.g., because they require GNU Make).
|
||||||
stdenvNative = (import ./native {
|
stdenvNative = (import ./native {
|
||||||
inherit system allPackages;
|
inherit system allPackages config;
|
||||||
}).stdenv;
|
}).stdenv;
|
||||||
|
|
||||||
stdenvNativePkgs = allPackages {
|
stdenvNativePkgs = allPackages {
|
||||||
@ -35,13 +35,14 @@ rec {
|
|||||||
|
|
||||||
# The Nix build environment.
|
# The Nix build environment.
|
||||||
stdenvNix = import ./nix {
|
stdenvNix = import ./nix {
|
||||||
|
inherit config;
|
||||||
stdenv = stdenvNative;
|
stdenv = stdenvNative;
|
||||||
pkgs = stdenvNativePkgs;
|
pkgs = stdenvNativePkgs;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
# Linux standard environment.
|
# Linux standard environment.
|
||||||
stdenvLinux = (import ./linux {inherit system allPackages platform;}).stdenvLinux;
|
stdenvLinux = (import ./linux { inherit system allPackages platform config;}).stdenvLinux;
|
||||||
|
|
||||||
|
|
||||||
# MinGW/MSYS standard environment.
|
# MinGW/MSYS standard environment.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{ system, name ? "stdenv", preHook ? "", initialPath, gcc, shell
|
{ system, name ? "stdenv", preHook ? "", initialPath, gcc, shell
|
||||||
, extraAttrs ? {}, overrides ? (pkgs: {})
|
, extraAttrs ? {}, overrides ? (pkgs: {}), config
|
||||||
|
|
||||||
, # The `fetchurl' to use for downloading curl and its dependencies
|
, # The `fetchurl' to use for downloading curl and its dependencies
|
||||||
# (see all-packages.nix).
|
# (see all-packages.nix).
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
# The function defaults are for easy testing.
|
# The function defaults are for easy testing.
|
||||||
{ system ? builtins.currentSystem
|
{ system ? builtins.currentSystem
|
||||||
, allPackages ? import ../../top-level/all-packages.nix
|
, allPackages ? import ../../top-level/all-packages.nix
|
||||||
, platform ? null }:
|
, platform ? null, config }:
|
||||||
|
|
||||||
rec {
|
rec {
|
||||||
|
|
||||||
@ -81,7 +81,7 @@ rec {
|
|||||||
{gcc, extraAttrs ? {}, overrides ? (pkgs: {}), extraPath ? [], fetchurl}:
|
{gcc, extraAttrs ? {}, overrides ? (pkgs: {}), extraPath ? [], fetchurl}:
|
||||||
|
|
||||||
import ../generic {
|
import ../generic {
|
||||||
inherit system;
|
inherit system config;
|
||||||
name = "stdenv-linux-boot";
|
name = "stdenv-linux-boot";
|
||||||
preHook =
|
preHook =
|
||||||
''
|
''
|
||||||
@ -261,7 +261,7 @@ rec {
|
|||||||
# dependency (`nix-store -qR') on bootstrapTools or the
|
# dependency (`nix-store -qR') on bootstrapTools or the
|
||||||
# first binutils built.
|
# first binutils built.
|
||||||
stdenvLinux = import ../generic rec {
|
stdenvLinux = import ../generic rec {
|
||||||
inherit system;
|
inherit system config;
|
||||||
|
|
||||||
preHook = commonPreHook;
|
preHook = commonPreHook;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ system, allPackages ? import ../../.. }:
|
{ system, allPackages ? import ../../.., config }:
|
||||||
|
|
||||||
rec {
|
rec {
|
||||||
|
|
||||||
@ -98,7 +98,7 @@ rec {
|
|||||||
|
|
||||||
fetchurlBoot = fetchurl;
|
fetchurlBoot = fetchurl;
|
||||||
|
|
||||||
inherit system shell gcc overrides;
|
inherit system shell gcc overrides config;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
{ stdenv, pkgs }:
|
{ stdenv, pkgs, config }:
|
||||||
|
|
||||||
import ../generic rec {
|
import ../generic rec {
|
||||||
|
inherit config;
|
||||||
|
|
||||||
preHook =
|
preHook =
|
||||||
''
|
''
|
||||||
export NIX_ENFORCE_PURITY=1
|
export NIX_ENFORCE_PURITY=1
|
||||||
|
@ -196,7 +196,7 @@ let
|
|||||||
|
|
||||||
|
|
||||||
allStdenvs = import ../stdenv {
|
allStdenvs = import ../stdenv {
|
||||||
inherit system stdenvType platform;
|
inherit system stdenvType platform config;
|
||||||
allPackages = args: import ./all-packages.nix ({ inherit config system; } // args);
|
allPackages = args: import ./all-packages.nix ({ inherit config system; } // args);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user