about summary refs log tree commit diff
path: root/pkgs/os-specific/linux/minimal-bootstrap
diff options
context:
space:
mode:
authorJohn Ericson <git@JohnEricson.me>2023-05-26 13:17:18 +0200
committerGitHub <noreply@github.com>2023-05-26 13:17:18 +0200
commit55358b47b4ecc27a07285a27c773ab5dc1390a82 (patch)
treee59e468be179d1e9ca3c97235994e8016793be2f /pkgs/os-specific/linux/minimal-bootstrap
parent240d8405b142d56873408f31f526bc82d4f98e3b (diff)
parentbc87c59c15e484a43afc0c2659c0d0c45bc9f78b (diff)
downloadnixlib-55358b47b4ecc27a07285a27c773ab5dc1390a82.tar
nixlib-55358b47b4ecc27a07285a27c773ab5dc1390a82.tar.gz
nixlib-55358b47b4ecc27a07285a27c773ab5dc1390a82.tar.bz2
nixlib-55358b47b4ecc27a07285a27c773ab5dc1390a82.tar.lz
nixlib-55358b47b4ecc27a07285a27c773ab5dc1390a82.tar.xz
nixlib-55358b47b4ecc27a07285a27c773ab5dc1390a82.tar.zst
nixlib-55358b47b4ecc27a07285a27c773ab5dc1390a82.zip
Merge pull request #233391 from emilytrau/minimal-imports
minimal-bootstrap: remove imports from outside bootstrap
Diffstat (limited to 'pkgs/os-specific/linux/minimal-bootstrap')
-rw-r--r--pkgs/os-specific/linux/minimal-bootstrap/default.nix6
-rw-r--r--pkgs/os-specific/linux/minimal-bootstrap/mes/default.nix1
-rw-r--r--pkgs/os-specific/linux/minimal-bootstrap/utils.nix9
3 files changed, 5 insertions, 11 deletions
diff --git a/pkgs/os-specific/linux/minimal-bootstrap/default.nix b/pkgs/os-specific/linux/minimal-bootstrap/default.nix
index 066c75b9bf37..6659be076f59 100644
--- a/pkgs/os-specific/linux/minimal-bootstrap/default.nix
+++ b/pkgs/os-specific/linux/minimal-bootstrap/default.nix
@@ -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}
diff --git a/pkgs/os-specific/linux/minimal-bootstrap/mes/default.nix b/pkgs/os-specific/linux/minimal-bootstrap/mes/default.nix
index 5886e153bbef..04ab2fdbfaf0 100644
--- a/pkgs/os-specific/linux/minimal-bootstrap/mes/default.nix
+++ b/pkgs/os-specific/linux/minimal-bootstrap/mes/default.nix
@@ -1,6 +1,5 @@
 { lib
 , fetchurl
-, writeText
 , callPackage
 , kaem
 , m2libc
diff --git a/pkgs/os-specific/linux/minimal-bootstrap/utils.nix b/pkgs/os-specific/linux/minimal-bootstrap/utils.nix
index e710c34aa6ae..bba6edae973a 100644
--- a/pkgs/os-specific/linux/minimal-bootstrap/utils.nix
+++ b/pkgs/os-specific/linux/minimal-bootstrap/utils.nix
@@ -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 {};