Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

freshBootstrapTools: rename from stdenvBootstrapTools #182058

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions pkgs/stdenv/darwin/make-bootstrap-tools.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{ pkgspath ? ../../.., test-pkgspath ? pkgspath
, localSystem ? { system = builtins.currentSystem; }
, crossSystem ? null
, bootstrapFiles ? null
, system ? builtins.currentSystem, crossSystem ? null, bootstrapFiles ? null
}:

let cross = if crossSystem != null
Expand All @@ -13,7 +11,7 @@ let cross = if crossSystem != null
in (import "${pkgspath}/pkgs/stdenv/darwin" args').stagesDarwin;
}
else {};
in with import pkgspath ({ inherit localSystem; } // cross // custom-bootstrap);
in with import pkgspath ({ inherit system; } // cross // custom-bootstrap);

let
llvmPackages = llvmPackages_11;
Expand Down Expand Up @@ -366,7 +364,7 @@ in rec {
test-pkgs = import test-pkgspath {
# if the bootstrap tools are for another platform, we should be testing
# that platform.
localSystem = if crossSystem != null then crossSystem else localSystem;
system = if crossSystem != null then crossSystem else system;

stdenvStages = args: let
args' = args // { inherit bootstrapLlvmVersion bootstrapFiles; };
Expand Down
5 changes: 4 additions & 1 deletion pkgs/stdenv/linux/make-bootstrap-tools.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{ pkgs ? import ../../.. {} }:
{ localSystem ? { system = builtins.currentSystem; }
, crossSystem ? null
}:

let
pkgs = import ../../.. { inherit localSystem crossSystem; };
libc = pkgs.stdenv.cc.libc;
in with pkgs; rec {

Expand Down
16 changes: 7 additions & 9 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2054,15 +2054,13 @@ with pkgs;

brewtarget = libsForQt514.callPackage ../applications/misc/brewtarget { } ;

stdenvBootstrapTools = if stdenv.hostPlatform.isDarwin then
callPackage ../stdenv/darwin/make-bootstrap-tools.nix {
localSystem = stdenv.buildPlatform;
crossSystem =
if stdenv.buildPlatform == stdenv.hostPlatform then null else stdenv.hostPlatform;
}
else if stdenv.hostPlatform.isLinux then
callPackage ../stdenv/linux/make-bootstrap-tools.nix {}
else throw "stdenvBootstrapTools: unknown hostPlatform ${stdenv.hostPlatform.config}";
freshBootstrapTools =
let args = { crossSystem = stdenv.hostPlatform.system; }; in
if stdenv.hostPlatform.isDarwin
then callPackage ../stdenv/darwin/make-bootstrap-tools.nix args
else if stdenv.hostPlatform.isLinux
then callPackage ../stdenv/linux/make-bootstrap-tools.nix args
else throw "freshBootstrapTools: unknown hostPlatform ${stdenv.hostPlatform.config}";

boxes = callPackage ../tools/text/boxes { };

Expand Down
Loading