Add a binary-cache-url file to channels to advertise the binary cache URL

This commit is contained in:
Eelco Dolstra
2012-08-01 16:31:25 +00:00
parent fad2a084fa
commit 13688e364f
2 changed files with 9 additions and 0 deletions

View File

@ -86,6 +86,14 @@ sub nixexprs : Chained('nix') PathPart('nixexprs.tar.bz2') Args(0) {
}
sub binary_cache_url : Chained('nix') PathPart('binary-cache-url') Args(0) {
my ($self, $c) = @_;
$c->stash->{'plain'} = { data => $c->uri_for('/') };
$c->header('Content-Type' => 'text/plain');
$c->forward('Hydra::View::Plain');
}
sub name {
my ($build) = @_;
return $build->releasename || $build->nixname;