diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2023-06-06 13:56:43 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2023-06-06 13:56:43 +0200 |
commit | 42e908a3081a040619d5f65ce52d08cb1e29397d (patch) | |
tree | 6930c0bfc212ea4c11c0c98e8723b3b57c79f4ba /maintainers/upload-release.pl | |
parent | 2b01e835e25e65f7ab752ffe1b938805ecf55efc (diff) |
Upload fallback-paths.nix as part of the release
https://github.com/NixOS/nixpkgs/pull/235463
Diffstat (limited to 'maintainers/upload-release.pl')
-rwxr-xr-x | maintainers/upload-release.pl | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/maintainers/upload-release.pl b/maintainers/upload-release.pl index 07b19c13f..2c6f8ad4f 100755 --- a/maintainers/upload-release.pl +++ b/maintainers/upload-release.pl @@ -179,6 +179,22 @@ if ($isLatest) { system("docker manifest push nixos/nix:latest") == 0 or die; } +# Upload nix-fallback-paths.nix. +sub getStorePath { + my ($jobName) = @_; + my $buildInfo = decode_json(fetch("$evalUrl/job/$jobName", 'application/json')); + return $buildInfo->{buildoutputs}->{out}->{path} or die "cannot get store path for '$jobName'"; +} + +write_file("$tmpDir/fallback-paths.nix", + "{\n" . + " x86_64-linux = \"" . getStorePath("build.x86_64-linux") . "\";\n" . + " i686-linux = \"" . getStorePath("build.i686-linux") . "\";\n" . + " aarch64-linux = \"" . getStorePath("build.aarch64-linux") . "\";\n" . + " x86_64-darwin = \"" . getStorePath("build.x86_64-darwin") . "\";\n" . + " aarch64-darwin = \"" . getStorePath("build.aarch64-darwin") . "\";\n" . + "}\n"); + # Upload release files to S3. for my $fn (glob "$tmpDir/*") { my $name = basename($fn); @@ -199,24 +215,6 @@ for my $fn (glob "$tmpDir/*") { } } -# Print new nix-fallback-paths.nix. -if ($isLatest) { - sub getStorePath { - my ($jobName) = @_; - my $buildInfo = decode_json(fetch("$evalUrl/job/$jobName", 'application/json')); - return $buildInfo->{buildoutputs}->{out}->{path} or die "cannot get store path for '$jobName'"; - } - - print STDERR "nixos/modules/installer/tools/nix-fallback-paths.nix:\n" . - "{\n" . - " x86_64-linux = \"" . getStorePath("build.x86_64-linux") . "\";\n" . - " i686-linux = \"" . getStorePath("build.i686-linux") . "\";\n" . - " aarch64-linux = \"" . getStorePath("build.aarch64-linux") . "\";\n" . - " x86_64-darwin = \"" . getStorePath("build.x86_64-darwin") . "\";\n" . - " aarch64-darwin = \"" . getStorePath("build.aarch64-darwin") . "\";\n" . - "}\n"; -} - # Update the "latest" symlink. $channelsBucket->add_key( "nix-latest/install", "", |