diff options
Diffstat (limited to 'pkgs/build-support/gcc-wrapper/default.nix')
-rw-r--r-- | pkgs/build-support/gcc-wrapper/default.nix | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/pkgs/build-support/gcc-wrapper/default.nix b/pkgs/build-support/gcc-wrapper/default.nix index 631212a9f227..a9c3f3382b85 100644 --- a/pkgs/build-support/gcc-wrapper/default.nix +++ b/pkgs/build-support/gcc-wrapper/default.nix @@ -5,11 +5,13 @@ # derivation provides a wrapper that sets up the right environment # variables so that the compiler and the linker just "work". -{ name, stdenv, isNative, nativePrefix ? "" -, gcc ? null, glibc ? null, binutils ? null}: +{ name, stdenv, nativeTools, nativeGlibc, nativePrefix ? "" +, gcc ? null, glibc ? null, binutils ? null +}: -assert isNative -> nativePrefix != ""; -assert !isNative -> gcc != null && glibc != null && binutils != null; +assert nativeTools -> nativePrefix != ""; +assert !nativeTools -> gcc != null && binutils != null; +assert !nativeGlibc -> glibc != null; derivation { system = stdenv.system; @@ -17,9 +19,8 @@ derivation { setupHook = ./setup-hook.sh; gccWrapper = ./gcc-wrapper.sh; ldWrapper = ./ld-wrapper.sh; - inherit name stdenv isNative nativePrefix gcc glibc binutils; - enforcePurity = if isNative then false else gcc.enforcePurity; - langC = if isNative then true else gcc.langC; - langCC = if isNative then true else gcc.langCC; - langF77 = if isNative then false else gcc.langF77; + inherit name stdenv nativeTools nativeGlibc nativePrefix gcc glibc binutils; + langC = if nativeTools then true else gcc.langC; + langCC = if nativeTools then true else gcc.langCC; + langF77 = if nativeTools then false else gcc.langF77; } |