diff --git a/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/bootstrap-sources.nix b/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/bootstrap-sources.nix index f06db98a8efee..45f556e3c3557 100644 --- a/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/bootstrap-sources.nix +++ b/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/bootstrap-sources.nix @@ -18,17 +18,9 @@ rec { # Packaged resources required for the first bootstrapping stage. # Contains source code and 256-byte hex0 binary seed. # - # We don't have access to utilities such as fetchgit and fetchzip since this - # is this is part of the bootstrap process and would introduce a circular - # dependency. The only tool we have to fetch source trees is `import ` - # with the unpack option, taking a NAR file as input. This requires source - # tarballs to be repackaged. - # - # To build see `make-bootstrap-sources.nix` - src = import { - inherit name; - url = "https://github.com/emilytrau/bootstrap-tools-nar-mirror/releases/download/2023-05-02/${name}.nar.xz"; - hash = "sha256-ZRG0k49MxL1UTZhuMTvPoEprdSpJRNVy8QhLE6k+etg="; - unpack = true; + src = builtins.fetchGit { + inherit name rev; + url = "https://github.com/oriansj/stage0-posix"; + shallow = true; }; } diff --git a/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/make-bootstrap-sources.nix b/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/make-bootstrap-sources.nix deleted file mode 100644 index fec03f370bc38..0000000000000 --- a/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/make-bootstrap-sources.nix +++ /dev/null @@ -1,46 +0,0 @@ -# Packaged resources required for the first bootstrapping stage. -# Contains source code and 256-byte hex0 binary seed. -# -# We don't have access to utilities such as fetchgit and fetchzip since this -# is this is part of the bootstrap process and would introduce a circular -# dependency. The only tool we have to fetch source trees is `import ` -# with the unpack option, taking a NAR file as input. This requires source -# tarballs to be repackaged. -# -# To build: -# -# nix-build pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/make-bootstrap-sources.nix -# => ./result/stage0-posix-$version-$rev-source.nar.xz -# - -{ pkgs ? import ../../../../.. {} }: -let - inherit (pkgs) callPackage runCommand fetchFromGitHub nix xz; - - inherit (import ./bootstrap-sources.nix) name rev; - - src = fetchFromGitHub { - owner = "oriansj"; - repo = "stage0-posix"; - inherit rev; - sha256 = "sha256-ZRG0k49MxL1UTZhuMTvPoEprdSpJRNVy8QhLE6k+etg="; - fetchSubmodules = true; - postFetch = '' - # Remove vendored/duplicate M2libc's - echo "Removing duplicate M2libc" - rm -rf \ - $out/M2-Mesoplanet/M2libc \ - $out/M2-Planet/M2libc \ - $out/mescc-tools/M2libc \ - $out/mescc-tools-extra/M2libc - ''; - }; -in -runCommand name { - nativeBuildInputs = [ nix xz ]; - - passthru = { inherit src; }; -} '' - mkdir $out - nix-store --dump ${src} | xz -c > "$out/${name}.nar.xz" -''