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LBOX6INVDQGG56QC
IDT3SO3P52TCB4IWV3LYZJ5JLJACNQ26X65VXUTUD227PRE2UZUAC
AFNDUSGDI2LSRZICZNFXTCFNIVG6IZCKYR7V3KOTHXYUFUU6AYCAC
GEADFVZ5LXXFIE3VIP4UJ4AEI2VX57DXER47JA4IHH5BG3QNPAEAC
2GK5DOU7ODF4WBSN3QTD3WIO52VTL2LOAXKGCDEMMAQPTEO4A4HAC
VHV6GI4L2GEV2PV3AEV4C22O3JB4XUS6WPEBFINYD5CJOBMAESAAC
UOINKJ2JBCRTZPFTAXDPRJOEUWWPJ43IGVWLRIRLIGHLBMWDOGDQC
ON4DDIBZQI34VOYOCVK5EAHYIY6M6JANW7SK4CCJWGIFYK55J2BQC
HLYVEJX74DMSDR7VTGSLZCLUKQDZFDIK4FFDV4S27UPBN5JH4KDQC
WZ3AEJ67LOG5L335AAC2BDLIJPIU4VSCGBMATBHDZC26ECRS5A6AC
# Hack to get downloads to work on binary cache stores: if the
# store path is not available locally, then import it into the
# local store. FIXME: find a better way; this can require an
# unbounded amount of space.
if (!isValidPath($storePath)) {
my $storeMode = $c->config->{store_mode} // "direct";
notFound($c, "File " . $product->path . " has disappeared.")
if $storeMode eq "direct";
my $url =
$storeMode eq "local-binary-cache" ? "file://" . $c->config->{binary_cache_dir} :
$storeMode eq "s3-binary-cache" ? "https://" . $c->config->{binary_cache_s3_bucket} . ".s3.amazonaws.com/" :
die;
my $args = "";
if (defined $c->config->{binary_cache_public_key_file}
&& -r $c->config->{binary_cache_public_key_file})
{
$args = "--option binary-cache-public-keys " . read_file($c->config->{binary_cache_public_key_file});
}
system("nix-store --realise '$storePath' --option extra-binary-caches '$url' $args>/dev/null");
}
my $config = getHydraConfig();
my $storeUri = $config->{'store_uri'} // "";
return grab(cmd => ["nix", "cat-store", "$path"], env => { NIX_REMOTE => "$storeUri" });
return grab(cmd => ["nix", "cat-store", "--store", getStoreUri(), "$path"]);
}
sub isLocalStore {
my $uri = getStoreUri();
return $uri =~ "^(local|daemon|auto)";
my $storeMode = $c->config->{store_mode} // "direct";
my $channelUri =
$storeMode eq "direct" ? $c->uri_for('/')
: $storeMode eq "s3-binary-cache" ?
($c->config->{binary_cache_public_uri} // ("https://" . $c->config->{binary_cache_s3_bucket} . ".s3.amazonaws.com/"))
: die "Not supported.\n";
requireLocalStore($c);
my $channelUri = $c->uri_for('/');