Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 3 additions & 18 deletions maintainers/upload-release.pl
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ sub downloadFile {
system("docker manifest push nixos/nix:latest") == 0 or die;
}

# Allows Nixpkgs to assemble nix-fallback-paths.nix from the Hydra release builds
write_file("$tmpDir/hydra-eval-id", "$evalId");

# Upload release files to S3.
for my $fn (glob "$tmpDir/*") {
my $name = basename($fn);
Expand All @@ -199,24 +202,6 @@ sub downloadFile {
}
}

# 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", "",
Expand Down