Prevent an unnecessary evaluation of lib
This commit is contained in:
parent
cd948c093f
commit
be3fc3ae2f
|
@ -5,7 +5,7 @@
|
||||||
# Posix utilities, the GNU C compiler, and so on. On other systems,
|
# Posix utilities, the GNU C compiler, and so on. On other systems,
|
||||||
# we use the native C library.
|
# we use the native C library.
|
||||||
|
|
||||||
{ system, allPackages ? import ../.., platform, config }:
|
{ system, allPackages ? import ../.., platform, config, lib }:
|
||||||
|
|
||||||
|
|
||||||
rec {
|
rec {
|
||||||
|
@ -28,14 +28,14 @@ rec {
|
||||||
|
|
||||||
# The Nix build environment.
|
# The Nix build environment.
|
||||||
stdenvNix = import ./nix {
|
stdenvNix = import ./nix {
|
||||||
inherit config;
|
inherit config lib;
|
||||||
stdenv = stdenvNative;
|
stdenv = stdenvNative;
|
||||||
pkgs = stdenvNativePkgs;
|
pkgs = stdenvNativePkgs;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
# Linux standard environment.
|
# Linux standard environment.
|
||||||
stdenvLinux = (import ./linux { inherit system allPackages platform config;}).stdenvLinux;
|
stdenvLinux = (import ./linux { inherit system allPackages platform config lib; }).stdenvLinux;
|
||||||
|
|
||||||
|
|
||||||
# Select the appropriate stdenv for the platform `system'.
|
# Select the appropriate stdenv for the platform `system'.
|
||||||
|
|
|
@ -7,12 +7,10 @@
|
||||||
# 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, config ? {} }:
|
, platform ? null, config ? {}, lib }:
|
||||||
|
|
||||||
rec {
|
rec {
|
||||||
|
|
||||||
lib = import ../../../lib;
|
|
||||||
|
|
||||||
bootstrapFiles =
|
bootstrapFiles =
|
||||||
if system == "i686-linux" then import ./bootstrap/i686.nix
|
if system == "i686-linux" then import ./bootstrap/i686.nix
|
||||||
else if system == "x86_64-linux" then import ./bootstrap/x86_64.nix
|
else if system == "x86_64-linux" then import ./bootstrap/x86_64.nix
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ stdenv, pkgs, config }:
|
{ stdenv, pkgs, config, lib }:
|
||||||
|
|
||||||
import ../generic rec {
|
import ../generic rec {
|
||||||
inherit config;
|
inherit config;
|
||||||
|
@ -7,7 +7,7 @@ import ../generic rec {
|
||||||
''
|
''
|
||||||
export NIX_ENFORCE_PURITY=1
|
export NIX_ENFORCE_PURITY=1
|
||||||
export NIX_IGNORE_LD_THROUGH_GCC=1
|
export NIX_IGNORE_LD_THROUGH_GCC=1
|
||||||
'' + (if stdenv.isDarwin then ''
|
'' + lib.optionalString stdenv.isDarwin ''
|
||||||
export NIX_ENFORCE_PURITY=
|
export NIX_ENFORCE_PURITY=
|
||||||
export NIX_DONT_SET_RPATH=1
|
export NIX_DONT_SET_RPATH=1
|
||||||
export NIX_NO_SELF_RPATH=1
|
export NIX_NO_SELF_RPATH=1
|
||||||
|
@ -18,7 +18,7 @@ import ../generic rec {
|
||||||
export SDKROOT=$(/usr/bin/xcrun --show-sdk-path 2> /dev/null || true)
|
export SDKROOT=$(/usr/bin/xcrun --show-sdk-path 2> /dev/null || true)
|
||||||
export NIX_CFLAGS_COMPILE+=" --sysroot=/var/empty -idirafter $SDKROOT/usr/include -F$SDKROOT/System/Library/Frameworks -Wno-multichar -Wno-deprecated-declarations"
|
export NIX_CFLAGS_COMPILE+=" --sysroot=/var/empty -idirafter $SDKROOT/usr/include -F$SDKROOT/System/Library/Frameworks -Wno-multichar -Wno-deprecated-declarations"
|
||||||
export NIX_LDFLAGS_AFTER+=" -L$SDKROOT/usr/lib"
|
export NIX_LDFLAGS_AFTER+=" -L$SDKROOT/usr/lib"
|
||||||
'' else "");
|
'';
|
||||||
|
|
||||||
initialPath = (import ../common-path.nix) {pkgs = pkgs;};
|
initialPath = (import ../common-path.nix) {pkgs = pkgs;};
|
||||||
|
|
||||||
|
|
|
@ -205,7 +205,7 @@ let
|
||||||
|
|
||||||
|
|
||||||
allStdenvs = import ../stdenv {
|
allStdenvs = import ../stdenv {
|
||||||
inherit system platform config;
|
inherit system platform config lib;
|
||||||
allPackages = args: import ./all-packages.nix ({ inherit config system; } // args);
|
allPackages = args: import ./all-packages.nix ({ inherit config system; } // args);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue