2009-02-25 14:33:33 +00:00
|
|
|
package Hydra::View::NixPkg;
|
|
|
|
|
|
|
|
use strict;
|
|
|
|
use base qw/Catalyst::View/;
|
|
|
|
|
|
|
|
sub process {
|
|
|
|
my ($self, $c) = @_;
|
|
|
|
|
|
|
|
$c->response->content_type('application/nix-package');
|
|
|
|
|
|
|
|
my $build = $c->stash->{build};
|
|
|
|
|
2013-02-13 16:49:28 +00:00
|
|
|
# FIXME: add multiple output support
|
2009-02-26 21:33:29 +00:00
|
|
|
my $s = "NIXPKG1 " . $c->stash->{manifestUri}
|
2009-02-25 14:33:33 +00:00
|
|
|
. " " . $build->nixname . " " . $build->system
|
2013-02-13 16:49:28 +00:00
|
|
|
. " " . $build->drvpath . " " . $build->buildoutputs->find({name => "out"})->path
|
2013-01-22 14:09:37 +01:00
|
|
|
. " " . $c->uri_for('/');
|
2013-01-22 14:41:02 +01:00
|
|
|
|
2009-02-25 14:33:33 +00:00
|
|
|
$c->response->body($s);
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
1;
|