2024-09-26 11:04:55 +00:00
|
|
|
{
|
|
|
|
stdenvNoCC,
|
|
|
|
callPackage,
|
|
|
|
lib,
|
|
|
|
fetchurl,
|
|
|
|
releaseManifestFile,
|
|
|
|
releaseInfoFile,
|
|
|
|
allowPrerelease ? false,
|
|
|
|
depsFile,
|
|
|
|
bootstrapSdk,
|
|
|
|
pkgsBuildHost,
|
2024-04-21 15:54:59 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
inherit (lib.importJSON releaseInfoFile) tarballHash artifactsUrl artifactsHash;
|
|
|
|
|
|
|
|
pkgs = callPackage ./stage1.nix {
|
|
|
|
inherit releaseManifestFile tarballHash depsFile;
|
2024-09-26 11:04:55 +00:00
|
|
|
bootstrapSdk = bootstrapSdk.overrideAttrs (old: {
|
|
|
|
passthru = old.passthru or { } // {
|
|
|
|
artifacts = stdenvNoCC.mkDerivation rec {
|
|
|
|
name = lib.nameFromURL artifactsUrl ".tar.gz";
|
2024-04-21 15:54:59 +00:00
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = artifactsUrl;
|
|
|
|
hash = artifactsHash;
|
|
|
|
};
|
2024-04-21 15:54:59 +00:00
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
sourceRoot = ".";
|
2024-04-21 15:54:59 +00:00
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
|
|
|
cp -r * $out/
|
|
|
|
'';
|
2024-04-21 15:54:59 +00:00
|
|
|
};
|
2024-09-26 11:04:55 +00:00
|
|
|
};
|
|
|
|
});
|
2024-04-21 15:54:59 +00:00
|
|
|
};
|
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
in
|
|
|
|
pkgs
|
|
|
|
// {
|
|
|
|
vmr = pkgs.vmr.overrideAttrs (old: {
|
2024-04-21 15:54:59 +00:00
|
|
|
passthru = old.passthru // {
|
|
|
|
updateScript = pkgsBuildHost.callPackage ./update.nix {
|
|
|
|
inherit releaseManifestFile releaseInfoFile allowPrerelease;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
});
|
|
|
|
}
|