* Move NARs from the NixChannel controller to the Root controller and

drop the "/nix/store".  I.e. instead of

    http://hydra.nixos.org/jobset/nixpkgs/trunk/channel/latest/nar/nix/store/99djmii6l4yw9gn07zxqabh8z58pp84c-libmspack-0.0.20040308alpha.drv 

  we now have

    http://hydra.nixos.org/nar/99djmii6l4yw9gn07zxqabh8z58pp84c-libmspack-0.0.20040308alpha.drv 

  The main reason is that this is much faster, since we don't need to
  get all the channel data (which isn't used anyway for NAR
  generation).  This speeds up downloading a NAR from the Nixpkgs
  channel by > 2 seconds.

* Drop "Hydra::View::" from view names to get rid of an ugly warning.
This commit is contained in:
Eelco Dolstra
2010-06-22 12:00:19 +00:00
parent dfd8b4406d
commit e35f0005e6
4 changed files with 24 additions and 25 deletions

View File

@ -266,7 +266,7 @@ sub runtimedeps : Chained('build') PathPart('runtime-deps') {
notFound($c, "Path " . $build->outpath . " is no longer available.")
unless isValidPath($build->outpath);
$c->stash->{current_view} = 'Hydra::View::NixDepGraph';
$c->stash->{current_view} = 'NixDepGraph';
$c->stash->{storePaths} = [$build->outpath];
$c->res->content_type('image/png'); # !!!
@ -281,7 +281,7 @@ sub buildtimedeps : Chained('build') PathPart('buildtime-deps') {
notFound($c, "Path " . $build->drvpath . " is no longer available.")
unless isValidPath($build->drvpath);
$c->stash->{current_view} = 'Hydra::View::NixDepGraph';
$c->stash->{current_view} = 'NixDepGraph';
$c->stash->{storePaths} = [$build->drvpath];
$c->res->content_type('image/png'); # !!!

View File

@ -158,4 +158,19 @@ sub end : ActionClass('RenderView') {
}
sub nar :Local :Args(1) {
my ($self, $c, $path) = @_;
$path = "/nix/store/$path";
if (!isValidPath($path)) {
$c->response->status(410); # "Gone"
error($c, "Path " . $path . " is no longer available.");
}
$c->stash->{current_view} = 'NixNAR';
$c->stash->{storePath} = $path;
}
1;