* Generate NAR archives on the fly. Necessary for producing channels
[?]
Feb 19, 2009, 11:43 PM
NYC3LZKHWRIP2VJDCO3UVPR6TR7JURVX5NBS4H2AOOOG3ZG5G6FACDependencies
- [2]
IWVA2P2Y* Generate manifests on demand. Next step: generate NAR archives on - [3]
L5VIEXSC* Allow downloading of build products. - [4]
2GK5DOU7* Downloading closures. - [5]
BA46C5LN* Pretty-print the logs. - [6]
J5UVLXOK* Start of a basic Catalyst web interface. - [7]
SHBLLAVH* More global substitution. - [*]
PKPWUHUX* Idem.
Change contents
- replacement in src/Hydra/lib/Hydra/Controller/Root.pm at line 715
return error($c, "Path " . $build->outpath . " is no longer available.") unless isValidPath($build->outpath); - edit in src/Hydra/lib/Hydra/Controller/Root.pm at line 720
sub nar :Local {my ($self, $c, @rest) = @_; - edit in src/Hydra/lib/Hydra/Controller/Root.pm at line 725
my $path .= "/" . join("/", @rest); - edit in src/Hydra/lib/Hydra/Controller/Root.pm at line 727
return error($c, "Path " . $path . " is no longer available.") unless isValidPath($path);$c->stash->{current_view} = 'Hydra::View::NixNAR';$c->stash->{storePath} = $path;} - edit in src/Hydra/lib/Hydra/View/NixClosure.pm at line 6
use POSIX qw(dup2); - replacement in src/Hydra/lib/Hydra/View/NixManifest.pm at line 15
- replacement in src/Hydra/lib/Hydra/View/NixManifest.pm at line 44
" StorePath: $path\n" ." StorePath: ${path}y\n" . - replacement in src/Hydra/lib/Hydra/View/NixManifest.pm at line 47
" Hash: $hash\n" ." NarHash: $hash\n" . - file addition: NixNAR.pm[9.646]
package Hydra::View::NixNAR;use strict;use base qw/Catalyst::View/;sub process {my ($self, $c) = @_;my $storePath = $c->stash->{storePath};$c->response->content_type('application/x-nix-archive'); # !!! check MIME typeopen(OUTPUT, "nix-store --dump '$storePath' | bzip2 |");my $fh = new IO::Handle;$fh->fdopen(fileno(OUTPUT), "r") or die;$c->response->body($fh);undef $fh;return 1;}1;