Loading pkgs/build-support/cc-wrapper/default.nix +3 −2 Original line number Diff line number Diff line Loading @@ -10,7 +10,6 @@ , zlib ? null, extraPackages ? [], extraBuildCommands ? "" , dyld ? null # TODO: should this be a setup-hook on dyld? , isGNU ? false, isClang ? cc.isClang or false, gnugrep ? null , hostPlatform, targetPlatform , runCommand ? null }: Loading @@ -22,12 +21,14 @@ assert !nativeTools -> assert !(nativeLibc && noLibc); assert (noLibc || nativeLibc) == (libc == null); assert targetPlatform != hostPlatform -> runCommand != null; assert stdenv.targetPlatform != stdenv.hostPlatform -> runCommand != null; # For ghdl (the vhdl language provider to gcc) we need zlib in the wrapper. assert cc.langVhdl or false -> zlib != null; let inherit (stdenv) hostPlatform targetPlatform; # Prefix for binaries. Customarily ends with a dash separator. # # TODO(@Ericson2314) Make unconditional, or optional but always true by Loading pkgs/stdenv/adapters.nix +3 −5 Original line number Diff line number Diff line Loading @@ -61,11 +61,9 @@ rec { , buildPlatform, hostPlatform, targetPlatform } @ overrideArgs: let stdenv = overrideArgs.stdenv.override { # TODO(@Ericson2314): Cannot do this for now because then Nix thinks the # resulting derivation should be built on the host platform. #hostPlatform = buildPlatform; #targetPlatform = hostPlatform; inherit cc; inherit buildPlatform hostPlatform targetPlatform cc; allowedRequisites = null; Loading pkgs/stdenv/cross/default.nix +4 −7 Original line number Diff line number Diff line Loading @@ -14,21 +14,18 @@ in bootStages ++ [ # Build Packages (vanillaPackages: { buildPlatform = localSystem; hostPlatform = localSystem; targetPlatform = crossSystem; inherit config overlays; selfBuild = false; stdenv = assert vanillaPackages.hostPlatform == localSystem; assert vanillaPackages.targetPlatform == localSystem; vanillaPackages.stdenv.override { targetPlatform = crossSystem; }; # It's OK to change the built-time dependencies allowCustomOverrides = true; inherit (vanillaPackages) stdenv; }) # Run Packages (buildPackages: { buildPlatform = localSystem; hostPlatform = crossSystem; targetPlatform = crossSystem; inherit config overlays; selfBuild = false; stdenv = buildPackages.makeStdenvCross { Loading pkgs/stdenv/custom/default.nix +4 −4 Original line number Diff line number Diff line Loading @@ -15,11 +15,11 @@ in bootStages ++ [ # Additional stage, built using custom stdenv (vanillaPackages: { buildPlatform = localSystem; hostPlatform = localSystem; targetPlatform = localSystem; inherit config overlays; stdenv = config.replaceStdenv { pkgs = vanillaPackages; }; stdenv = assert vanillaPackages.hostPlatform == localSystem; assert vanillaPackages.targetPlatform == localSystem; config.replaceStdenv { pkgs = vanillaPackages; }; }) ] pkgs/stdenv/darwin/default.nix +8 −16 Original line number Diff line number Diff line Loading @@ -65,6 +65,10 @@ in rec { name = "stdenv-darwin-boot-${toString step}"; buildPlatform = localSystem; hostPlatform = localSystem; targetPlatform = localSystem; cc = if isNull last then "/dev/null" else import ../../build-support/cc-wrapper { inherit shell; inherit (last) stdenv; Loading @@ -73,8 +77,6 @@ in rec { nativeTools = true; nativePrefix = bootstrapTools; nativeLibc = false; hostPlatform = localSystem; targetPlatform = localSystem; libc = last.pkgs.darwin.Libsystem; isClang = true; cc = { name = "clang-9.9.9"; outPath = bootstrapTools; }; Loading @@ -90,9 +92,6 @@ in rec { ''; initialPath = [ bootstrapTools ]; hostPlatform = localSystem; targetPlatform = localSystem; fetchurlBoot = import ../../build-support/fetchurl { stdenv = stage0.stdenv; curl = bootstrapTools; Loading @@ -107,9 +106,6 @@ in rec { }; in { buildPlatform = localSystem; hostPlatform = localSystem; targetPlatform = localSystem; inherit config overlays; stdenv = thisStdenv; }; Loading Loading @@ -279,6 +275,10 @@ in rec { name = "stdenv-darwin"; buildPlatform = localSystem; hostPlatform = localSystem; targetPlatform = localSystem; preHook = commonPreHook + '' export PATH_LOCALE=${pkgs.darwin.locale}/share/locale ''; Loading @@ -286,9 +286,6 @@ in rec { stdenvSandboxProfile = binShClosure + libSystemProfile; extraSandboxProfile = binShClosure + libSystemProfile; hostPlatform = localSystem; targetPlatform = localSystem; initialPath = import ../common-path.nix { inherit pkgs; }; shell = "${pkgs.bash}/bin/bash"; Loading @@ -297,8 +294,6 @@ in rec { inherit shell; nativeTools = false; nativeLibc = false; hostPlatform = localSystem; targetPlatform = localSystem; inherit (pkgs) coreutils binutils gnugrep; inherit (pkgs.darwin) dyld; cc = pkgs.llvmPackages.clang-unwrapped; Loading Loading @@ -338,9 +333,6 @@ in rec { stage3 stage4 (prevStage: { buildPlatform = localSystem; hostPlatform = localSystem; targetPlatform = localSystem; inherit config overlays; stdenv = stdenvDarwin prevStage; }) Loading Loading
pkgs/build-support/cc-wrapper/default.nix +3 −2 Original line number Diff line number Diff line Loading @@ -10,7 +10,6 @@ , zlib ? null, extraPackages ? [], extraBuildCommands ? "" , dyld ? null # TODO: should this be a setup-hook on dyld? , isGNU ? false, isClang ? cc.isClang or false, gnugrep ? null , hostPlatform, targetPlatform , runCommand ? null }: Loading @@ -22,12 +21,14 @@ assert !nativeTools -> assert !(nativeLibc && noLibc); assert (noLibc || nativeLibc) == (libc == null); assert targetPlatform != hostPlatform -> runCommand != null; assert stdenv.targetPlatform != stdenv.hostPlatform -> runCommand != null; # For ghdl (the vhdl language provider to gcc) we need zlib in the wrapper. assert cc.langVhdl or false -> zlib != null; let inherit (stdenv) hostPlatform targetPlatform; # Prefix for binaries. Customarily ends with a dash separator. # # TODO(@Ericson2314) Make unconditional, or optional but always true by Loading
pkgs/stdenv/adapters.nix +3 −5 Original line number Diff line number Diff line Loading @@ -61,11 +61,9 @@ rec { , buildPlatform, hostPlatform, targetPlatform } @ overrideArgs: let stdenv = overrideArgs.stdenv.override { # TODO(@Ericson2314): Cannot do this for now because then Nix thinks the # resulting derivation should be built on the host platform. #hostPlatform = buildPlatform; #targetPlatform = hostPlatform; inherit cc; inherit buildPlatform hostPlatform targetPlatform cc; allowedRequisites = null; Loading
pkgs/stdenv/cross/default.nix +4 −7 Original line number Diff line number Diff line Loading @@ -14,21 +14,18 @@ in bootStages ++ [ # Build Packages (vanillaPackages: { buildPlatform = localSystem; hostPlatform = localSystem; targetPlatform = crossSystem; inherit config overlays; selfBuild = false; stdenv = assert vanillaPackages.hostPlatform == localSystem; assert vanillaPackages.targetPlatform == localSystem; vanillaPackages.stdenv.override { targetPlatform = crossSystem; }; # It's OK to change the built-time dependencies allowCustomOverrides = true; inherit (vanillaPackages) stdenv; }) # Run Packages (buildPackages: { buildPlatform = localSystem; hostPlatform = crossSystem; targetPlatform = crossSystem; inherit config overlays; selfBuild = false; stdenv = buildPackages.makeStdenvCross { Loading
pkgs/stdenv/custom/default.nix +4 −4 Original line number Diff line number Diff line Loading @@ -15,11 +15,11 @@ in bootStages ++ [ # Additional stage, built using custom stdenv (vanillaPackages: { buildPlatform = localSystem; hostPlatform = localSystem; targetPlatform = localSystem; inherit config overlays; stdenv = config.replaceStdenv { pkgs = vanillaPackages; }; stdenv = assert vanillaPackages.hostPlatform == localSystem; assert vanillaPackages.targetPlatform == localSystem; config.replaceStdenv { pkgs = vanillaPackages; }; }) ]
pkgs/stdenv/darwin/default.nix +8 −16 Original line number Diff line number Diff line Loading @@ -65,6 +65,10 @@ in rec { name = "stdenv-darwin-boot-${toString step}"; buildPlatform = localSystem; hostPlatform = localSystem; targetPlatform = localSystem; cc = if isNull last then "/dev/null" else import ../../build-support/cc-wrapper { inherit shell; inherit (last) stdenv; Loading @@ -73,8 +77,6 @@ in rec { nativeTools = true; nativePrefix = bootstrapTools; nativeLibc = false; hostPlatform = localSystem; targetPlatform = localSystem; libc = last.pkgs.darwin.Libsystem; isClang = true; cc = { name = "clang-9.9.9"; outPath = bootstrapTools; }; Loading @@ -90,9 +92,6 @@ in rec { ''; initialPath = [ bootstrapTools ]; hostPlatform = localSystem; targetPlatform = localSystem; fetchurlBoot = import ../../build-support/fetchurl { stdenv = stage0.stdenv; curl = bootstrapTools; Loading @@ -107,9 +106,6 @@ in rec { }; in { buildPlatform = localSystem; hostPlatform = localSystem; targetPlatform = localSystem; inherit config overlays; stdenv = thisStdenv; }; Loading Loading @@ -279,6 +275,10 @@ in rec { name = "stdenv-darwin"; buildPlatform = localSystem; hostPlatform = localSystem; targetPlatform = localSystem; preHook = commonPreHook + '' export PATH_LOCALE=${pkgs.darwin.locale}/share/locale ''; Loading @@ -286,9 +286,6 @@ in rec { stdenvSandboxProfile = binShClosure + libSystemProfile; extraSandboxProfile = binShClosure + libSystemProfile; hostPlatform = localSystem; targetPlatform = localSystem; initialPath = import ../common-path.nix { inherit pkgs; }; shell = "${pkgs.bash}/bin/bash"; Loading @@ -297,8 +294,6 @@ in rec { inherit shell; nativeTools = false; nativeLibc = false; hostPlatform = localSystem; targetPlatform = localSystem; inherit (pkgs) coreutils binutils gnugrep; inherit (pkgs.darwin) dyld; cc = pkgs.llvmPackages.clang-unwrapped; Loading Loading @@ -338,9 +333,6 @@ in rec { stage3 stage4 (prevStage: { buildPlatform = localSystem; hostPlatform = localSystem; targetPlatform = localSystem; inherit config overlays; stdenv = stdenvDarwin prevStage; }) Loading