upload-release.pl: Fix nix-fallback-paths.nix generation

This commit is contained in:
Eelco Dolstra 2020-06-03 14:57:24 +02:00
parent 2853ba4ab2
commit 340d0b055a
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -142,8 +142,12 @@ $oldName =~ s/"//g;
sub getStorePath {
my ($jobName) = @_;
my $buildInfo = decode_json(fetch("$evalUrl/job/$jobName", 'application/json'));
die unless $buildInfo->{buildproducts}->{1}->{type} eq "nix-build";
return $buildInfo->{buildproducts}->{1}->{path};
for my $product (values %{$buildInfo->{buildproducts}}) {
next unless $product->{type} eq "nix-build";
next if $product->{path} =~ /[a-z]+$/;
return $product->{path};
}
die;
}
write_file("$nixpkgsDir/nixos/modules/installer/tools/nix-fallback-paths.nix",