Skip to content

Commit

Permalink
minimal-bootstrap: fix build in flakes
Browse files Browse the repository at this point in the history
The minimal bootstrap sources currently rely on builtins.currentSystem,
which is not available in restricted evaluation mode.
  • Loading branch information
artemist committed Oct 20, 2023
1 parent 5c78e5b commit 76d0d65
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
{ hostPlatform
}:

rec {
Expand Down Expand Up @@ -65,7 +65,7 @@ rec {
*/
minimal-bootstrap-sources = derivation {
inherit name;
system = builtins.currentSystem;
system = hostPlatform.system;
outputHashMode = "recursive";
inherit outputHashAlgo outputHash;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@
#

{ lib
, hostPlatform
, fetchFromGitHub
, fetchpatch
}:

let
expected = import ./bootstrap-sources.nix { };
expected = import ./bootstrap-sources.nix { inherit hostPlatform; };
in

fetchFromGitHub {
Expand Down
4 changes: 3 additions & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28322,7 +28322,9 @@ with pkgs;
checkMeta = callPackage ../stdenv/generic/check-meta.nix { };
});
minimal-bootstrap-sources = callPackage ../os-specific/linux/minimal-bootstrap/stage0-posix/bootstrap-sources.nix { };
make-minimal-bootstrap-sources = callPackage ../os-specific/linux/minimal-bootstrap/stage0-posix/make-bootstrap-sources.nix { };
make-minimal-bootstrap-sources = callPackage ../os-specific/linux/minimal-bootstrap/stage0-posix/make-bootstrap-sources.nix {
inherit (stdenv) hostPlatform;
};

mingetty = callPackage ../os-specific/linux/mingetty { };

Expand Down

0 comments on commit 76d0d65

Please sign in to comment.