Make one-click installs work for binary cache stores

This requires setting binary_cache_public_uri in hydra.conf.
This commit is contained in:
Eelco Dolstra
2017-10-18 14:09:28 +02:00
parent 44ef743d84
commit 62c6cca937
3 changed files with 8 additions and 10 deletions

View File

@ -432,9 +432,11 @@ sub nix : Chained('buildChain') PathPart('nix') CaptureArgs(0) {
notFound($c, "Build cannot be downloaded as a closure or Nix package.")
if $build->buildproducts->search({type => "nix-build"})->count == 0;
foreach my $out ($build->buildoutputs) {
notFound($c, "Path " . $out->path . " is no longer available.")
unless isValidPath($out->path);
if (isLocalStore) {
foreach my $out ($build->buildoutputs) {
notFound($c, "Path " . $out->path . " is no longer available.")
unless isValidPath($out->path);
}
}
$c->stash->{channelBuilds} = $c->model('DB::Builds')->search(