Unverified Commit 55358b47 authored by John Ericson's avatar John Ericson Committed by GitHub
Browse files

Merge pull request #233391 from emilytrau/minimal-imports

minimal-bootstrap: remove imports from outside bootstrap
parents 240d8405 bc87c59c
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -2,13 +2,15 @@
, config
, buildPlatform
, hostPlatform
, fetchurl
, checkMeta
}:

lib.makeScope
  # Prevent using top-level attrs to protect against introducing dependency on
  # non-bootstrap packages by mistake. Any top-level inputs must be explicitly
  # declared here.
  (extra: lib.callPackageWith ({ inherit lib config buildPlatform hostPlatform; } // extra))
  (extra: lib.callPackageWith ({ inherit lib config buildPlatform hostPlatform fetchurl checkMeta; } // extra))
  (self: with self; {

    bash_2_05 = callPackage ./bash/2.nix { tinycc = tinycc-mes; };
@@ -61,7 +63,7 @@ lib.makeScope
    tinycc-bootstrappable = lib.recurseIntoAttrs (callPackage ./tinycc/bootstrappable.nix { });
    tinycc-mes = lib.recurseIntoAttrs (callPackage ./tinycc/mes.nix { });

    inherit (callPackage ./utils.nix { }) fetchurl derivationWithMeta writeTextFile writeText;
    inherit (callPackage ./utils.nix { }) derivationWithMeta writeTextFile writeText;

    test = kaem.runCommand "minimal-bootstrap-test" {} ''
      echo ${bash_2_05.tests.get-version}
+0 −1
Original line number Diff line number Diff line
{ lib
, fetchurl
, writeText
, callPackage
, kaem
, m2libc
+1 −8
Original line number Diff line number Diff line
@@ -3,16 +3,9 @@
, callPackage
, kaem
, mescc-tools-extra
, checkMeta
}:

let
  checkMeta = callPackage ../../../stdenv/generic/check-meta.nix { };
in
rec {
  fetchurl = import ../../../build-support/fetchurl/boot.nix {
    inherit (buildPlatform) system;
  };

  derivationWithMeta = attrs:
    let
      passthru = attrs.passthru or {};
+4 −0
Original line number Diff line number Diff line
@@ -27214,6 +27214,10 @@ with pkgs;
  minimal-bootstrap = recurseIntoAttrs (import ../os-specific/linux/minimal-bootstrap {
    inherit (stdenv) buildPlatform hostPlatform;
    inherit lib config;
    fetchurl = import ../build-support/fetchurl/boot.nix {
      inherit (stdenv.buildPlatform) system;
    };
    checkMeta = callPackage ../stdenv/generic/check-meta.nix { };
  });
  mingetty = callPackage ../os-specific/linux/mingetty { };