Prevent an unnecessary evaluation of lib

This commit is contained in:
Eelco Dolstra 2014-07-01 17:21:32 +02:00
parent cd948c093f
commit be3fc3ae2f
4 changed files with 8 additions and 10 deletions

View file

@ -5,7 +5,7 @@
# Posix utilities, the GNU C compiler, and so on. On other systems,
# we use the native C library.
{ system, allPackages ? import ../.., platform, config }:
{ system, allPackages ? import ../.., platform, config, lib }:
rec {
@ -28,14 +28,14 @@ rec {
# The Nix build environment.
stdenvNix = import ./nix {
inherit config;
inherit config lib;
stdenv = stdenvNative;
pkgs = stdenvNativePkgs;
};
# 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'.

View file

@ -7,12 +7,10 @@
# The function defaults are for easy testing.
{ system ? builtins.currentSystem
, allPackages ? import ../../top-level/all-packages.nix
, platform ? null, config ? {} }:
, platform ? null, config ? {}, lib }:
rec {
lib = import ../../../lib;
bootstrapFiles =
if system == "i686-linux" then import ./bootstrap/i686.nix
else if system == "x86_64-linux" then import ./bootstrap/x86_64.nix

View file

@ -1,4 +1,4 @@
{ stdenv, pkgs, config }:
{ stdenv, pkgs, config, lib }:
import ../generic rec {
inherit config;
@ -7,7 +7,7 @@ import ../generic rec {
''
export NIX_ENFORCE_PURITY=1
export NIX_IGNORE_LD_THROUGH_GCC=1
'' + (if stdenv.isDarwin then ''
'' + lib.optionalString stdenv.isDarwin ''
export NIX_ENFORCE_PURITY=
export NIX_DONT_SET_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 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"
'' else "");
'';
initialPath = (import ../common-path.nix) {pkgs = pkgs;};

View file

@ -205,7 +205,7 @@ let
allStdenvs = import ../stdenv {
inherit system platform config;
inherit system platform config lib;
allPackages = args: import ./all-packages.nix ({ inherit config system; } // args);
};