hydra/src/lib/Hydra/View/NixPkg.pm

25 lines
521 B
Perl
Raw Normal View History

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};
# FIXME: add multiple output support
2016-03-02 15:24:23 +01:00
my $s = "NIXPKG1 http://invalid.org/"
2009-02-25 14:33:33 +00:00
. " " . $build->nixname . " " . $build->system
. " " . $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;