diff --git a/src/Hydra/lib/Hydra/Base/Controller/NixChannel.pm b/src/Hydra/lib/Hydra/Base/Controller/NixChannel.pm index 9eb8b99f..e36c4b3d 100644 --- a/src/Hydra/lib/Hydra/Base/Controller/NixChannel.pm +++ b/src/Hydra/lib/Hydra/Base/Controller/NixChannel.pm @@ -47,7 +47,7 @@ sub pkg : Chained('nix') PathPart Args(1) { notFound($c, "Unknown Nix package `$pkgName'.") unless defined $pkg; - $c->stash->{build} = $pkg; + $c->stash->{build} = $pkg->{build}; $c->stash->{manifestUri} = $c->uri_for($self->action_for("manifest"), $c->req->captures); @@ -63,4 +63,16 @@ sub nixexprs : Chained('nix') PathPart('nixexprs.tar.bz2') Args(0) { } +sub name { + my ($build) = @_; + return $build->resultInfo->releasename || $build->nixname; +} + +sub channel_contents : Chained('nix') PathPart('') Args(0) { + my ($self, $c) = @_; + $c->stash->{template} = 'channel-contents.tt'; + $c->stash->{nixPkgs} = [sort { lc(name($a->{build})) cmp lc(name($b->{build})) } (values %{$c->stash->{nixPkgs}})]; +} + + 1; diff --git a/src/Hydra/lib/Hydra/Controller/Build.pm b/src/Hydra/lib/Hydra/Controller/Build.pm index 87a50010..6e87d028 100644 --- a/src/Hydra/lib/Hydra/Controller/Build.pm +++ b/src/Hydra/lib/Hydra/Controller/Build.pm @@ -151,8 +151,8 @@ sub nix : Chained('build') PathPart('nix') CaptureArgs(0) { $c->stash->{storePaths} = [$build->outpath]; - my $pkgName = $build->nixname . "-" . $build->system . ".nixpkg"; - $c->stash->{nixPkgs} = {$pkgName => $build}; + my $pkgName = $build->nixname . "-" . $build->system; + $c->stash->{nixPkgs} = {"${pkgName}.nixpkg" => {build => $build, name => $pkgName}}; } diff --git a/src/Hydra/lib/Hydra/Helper/CatalystUtils.pm b/src/Hydra/lib/Hydra/Helper/CatalystUtils.pm index 7abfdee0..e08f93d8 100644 --- a/src/Hydra/lib/Hydra/Helper/CatalystUtils.pm +++ b/src/Hydra/lib/Hydra/Helper/CatalystUtils.pm @@ -78,8 +78,8 @@ sub getChannelData { next unless $build->buildproducts->find({type => "nix-build"}); next unless isValidPath($build->outpath); push @storePaths, $build->outpath; - my $pkgName = $build->nixname . "-" . $build->system . "-" . $build->id . ".nixpkg"; - $c->stash->{nixPkgs}->{$pkgName} = $build; + my $pkgName = $build->nixname . "-" . $build->system . "-" . $build->id; + $c->stash->{nixPkgs}->{"${pkgName}.nixpkg"} = {build => $build, name => $pkgName}; }; $c->stash->{storePaths} = [@storePaths]; diff --git a/src/Hydra/lib/Hydra/Schema.pm b/src/Hydra/lib/Hydra/Schema.pm index 3b268d66..3daf812b 100644 --- a/src/Hydra/lib/Hydra/Schema.pm +++ b/src/Hydra/lib/Hydra/Schema.pm @@ -8,8 +8,8 @@ use base 'DBIx::Class::Schema'; __PACKAGE__->load_classes; -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-02-11 23:16:48 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+EFA/I0SY8Jih++hjX1Ypg +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-04 14:50:30 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QcB8T/bY2/Pw34uuYXt2Cw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/BuildInputs.pm b/src/Hydra/lib/Hydra/Schema/BuildInputs.pm index 11221247..50ae8b63 100644 --- a/src/Hydra/lib/Hydra/Schema/BuildInputs.pm +++ b/src/Hydra/lib/Hydra/Schema/BuildInputs.pm @@ -36,8 +36,8 @@ __PACKAGE__->belongs_to("build", "Hydra::Schema::Builds", { id => "build" }); __PACKAGE__->belongs_to("dependency", "Hydra::Schema::Builds", { id => "dependency" }); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-02-11 23:16:48 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:sfGY0lHkOxmL8MUh9XRzcQ +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-04 14:50:30 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7Th7GxvR7m/DdodQqlmJXQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/BuildProducts.pm b/src/Hydra/lib/Hydra/Schema/BuildProducts.pm index a467e829..cecf6cb8 100644 --- a/src/Hydra/lib/Hydra/Schema/BuildProducts.pm +++ b/src/Hydra/lib/Hydra/Schema/BuildProducts.pm @@ -33,8 +33,8 @@ __PACKAGE__->set_primary_key("build", "productnr"); __PACKAGE__->belongs_to("build", "Hydra::Schema::Builds", { id => "build" }); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-02-11 23:16:48 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:0Q+SE9zoGRXIKLQbKgUEOg +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-04 14:50:30 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:FFVpdoV0vBLhF9yyKJSoTA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/BuildResultInfo.pm b/src/Hydra/lib/Hydra/Schema/BuildResultInfo.pm index 2ee8cc6d..a9979880 100644 --- a/src/Hydra/lib/Hydra/Schema/BuildResultInfo.pm +++ b/src/Hydra/lib/Hydra/Schema/BuildResultInfo.pm @@ -31,8 +31,8 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" }); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-02-11 23:16:48 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5fMxCc6sKchB4munRoQ3tg +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-04 14:50:30 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CkjyZptB79J32VhDbXhKEg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/BuildSchedulingInfo.pm b/src/Hydra/lib/Hydra/Schema/BuildSchedulingInfo.pm index 81426f4b..26539d7f 100644 --- a/src/Hydra/lib/Hydra/Schema/BuildSchedulingInfo.pm +++ b/src/Hydra/lib/Hydra/Schema/BuildSchedulingInfo.pm @@ -27,8 +27,8 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" }); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-02-11 23:16:48 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:b3e3/nNEkIL5NT0njXfmvQ +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-04 14:50:30 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:HeodRHEOs/do8RKwDJhaXg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/BuildSteps.pm b/src/Hydra/lib/Hydra/Schema/BuildSteps.pm index c0db5e0a..3e44efa4 100644 --- a/src/Hydra/lib/Hydra/Schema/BuildSteps.pm +++ b/src/Hydra/lib/Hydra/Schema/BuildSteps.pm @@ -35,8 +35,8 @@ __PACKAGE__->set_primary_key("id", "stepnr"); __PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" }); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-02-11 23:16:48 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+Uu75EKOIqmX2kDdoF4urw +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-04 14:50:30 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:kKpIuRMrqdh7m4M5XPIEgg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Builds.pm b/src/Hydra/lib/Hydra/Schema/Builds.pm index efb3b64c..829cbb91 100644 --- a/src/Hydra/lib/Hydra/Schema/Builds.pm +++ b/src/Hydra/lib/Hydra/Schema/Builds.pm @@ -34,6 +34,8 @@ __PACKAGE__->add_columns( { data_type => "text", is_nullable => 0, size => undef }, "license", { data_type => "text", is_nullable => 0, size => undef }, + "homepage", + { data_type => "text", is_nullable => 0, size => undef }, ); __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to("project", "Hydra::Schema::Projects", { name => "project" }); @@ -74,8 +76,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-02-11 23:16:48 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+5YWpNShfJeY0rZxT6NFXg +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-04 14:50:30 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:fGOOscNFEgDZpeVpA6HH0w __PACKAGE__->has_many(dependents => 'Hydra::Schema::BuildInputs', 'dependency'); diff --git a/src/Hydra/lib/Hydra/Schema/CachedPathInputs.pm b/src/Hydra/lib/Hydra/Schema/CachedPathInputs.pm index ad26ca81..c7c3f696 100644 --- a/src/Hydra/lib/Hydra/Schema/CachedPathInputs.pm +++ b/src/Hydra/lib/Hydra/Schema/CachedPathInputs.pm @@ -22,8 +22,8 @@ __PACKAGE__->add_columns( __PACKAGE__->set_primary_key("srcpath", "sha256hash"); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-02-11 23:16:48 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:fVED/6C0XGnrNGSazH7amg +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-04 14:50:30 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:0wY3JTSelPQSTbxpNQDJjg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/CachedSubversionInputs.pm b/src/Hydra/lib/Hydra/Schema/CachedSubversionInputs.pm index ccda2009..845ed3b4 100644 --- a/src/Hydra/lib/Hydra/Schema/CachedSubversionInputs.pm +++ b/src/Hydra/lib/Hydra/Schema/CachedSubversionInputs.pm @@ -20,8 +20,8 @@ __PACKAGE__->add_columns( __PACKAGE__->set_primary_key("uri", "revision"); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-02-11 23:16:48 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:kOLnExOz2rlFJQ3tcE+7Xg +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-04 14:50:30 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:eZPs3SB3XZW5BNQOQFrFBw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/JobsetInputAlts.pm b/src/Hydra/lib/Hydra/Schema/JobsetInputAlts.pm index 3fc5f6ff..6886b52f 100644 --- a/src/Hydra/lib/Hydra/Schema/JobsetInputAlts.pm +++ b/src/Hydra/lib/Hydra/Schema/JobsetInputAlts.pm @@ -31,8 +31,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-02-11 23:16:48 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:3QPU9ikr0SZn/S99qOMRAg +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-04 14:50:30 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:atlyxsSKg41KbDkbCfuvHQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/JobsetInputs.pm b/src/Hydra/lib/Hydra/Schema/JobsetInputs.pm index 040fdb3c..03b093da 100644 --- a/src/Hydra/lib/Hydra/Schema/JobsetInputs.pm +++ b/src/Hydra/lib/Hydra/Schema/JobsetInputs.pm @@ -43,8 +43,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-02-11 23:16:48 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dpuTqJIOcIuMe9xxR9NYdQ +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-04 14:50:30 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:85ro4sVmhc3HwAjgoA6p6w # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Jobsets.pm b/src/Hydra/lib/Hydra/Schema/Jobsets.pm index 3669b855..1ec36fe1 100644 --- a/src/Hydra/lib/Hydra/Schema/Jobsets.pm +++ b/src/Hydra/lib/Hydra/Schema/Jobsets.pm @@ -50,8 +50,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-02-11 23:16:48 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:r/PJAD9K8L3WHUncNFlnaw +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-04 14:50:30 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:c5PqrzN43jEGGrzKqI6WWQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Projects.pm b/src/Hydra/lib/Hydra/Schema/Projects.pm index 76541503..0798e4dd 100644 --- a/src/Hydra/lib/Hydra/Schema/Projects.pm +++ b/src/Hydra/lib/Hydra/Schema/Projects.pm @@ -45,8 +45,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-02-11 23:16:48 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9UhObD4jTQzVnYRWKPQOvg +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-04 14:50:30 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7iZYMDM+wn+Neud0Fm1ZMA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/ReleaseSetJobs.pm b/src/Hydra/lib/Hydra/Schema/ReleaseSetJobs.pm index e90509f6..7b326621 100644 --- a/src/Hydra/lib/Hydra/Schema/ReleaseSetJobs.pm +++ b/src/Hydra/lib/Hydra/Schema/ReleaseSetJobs.pm @@ -32,8 +32,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-02-11 23:16:48 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:aK/I+BIryTR1h/KGOxQ7mw +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-04 14:50:30 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Rs3CRPpzFi30sAeHVe1yQA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/ReleaseSets.pm b/src/Hydra/lib/Hydra/Schema/ReleaseSets.pm index e3bf4af3..db6ac6b6 100644 --- a/src/Hydra/lib/Hydra/Schema/ReleaseSets.pm +++ b/src/Hydra/lib/Hydra/Schema/ReleaseSets.pm @@ -29,8 +29,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-02-11 23:16:48 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:vQ4hwubK2w3czUD9ghGHBg +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-04 14:50:30 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:PA+dfXHaBsSx9kE1mEZZ9w # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/SystemTypes.pm b/src/Hydra/lib/Hydra/Schema/SystemTypes.pm index dfd64544..98f52125 100644 --- a/src/Hydra/lib/Hydra/Schema/SystemTypes.pm +++ b/src/Hydra/lib/Hydra/Schema/SystemTypes.pm @@ -16,8 +16,8 @@ __PACKAGE__->add_columns( __PACKAGE__->set_primary_key("system"); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-02-11 23:16:48 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:63NZCqYk/4E0ISCUaDqneA +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-04 14:50:30 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:olHboRdtxD6E7Ukr4aCLCA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/UserRoles.pm b/src/Hydra/lib/Hydra/Schema/UserRoles.pm index 13ce8c87..c8a05f16 100644 --- a/src/Hydra/lib/Hydra/Schema/UserRoles.pm +++ b/src/Hydra/lib/Hydra/Schema/UserRoles.pm @@ -17,8 +17,8 @@ __PACKAGE__->set_primary_key("username", "role"); __PACKAGE__->belongs_to("username", "Hydra::Schema::Users", { username => "username" }); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-02-11 23:16:48 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Lck5v6SX1rzILTrkSdZBtg +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-04 14:50:30 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Q7Nd3wv7Y3184GhkE/pdFA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Users.pm b/src/Hydra/lib/Hydra/Schema/Users.pm index d8e40c12..63f9e828 100644 --- a/src/Hydra/lib/Hydra/Schema/Users.pm +++ b/src/Hydra/lib/Hydra/Schema/Users.pm @@ -30,8 +30,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-02-11 23:16:48 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:OQzF0LFe3iSh9KxLk1vL8w +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-04 14:50:30 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:z8fRKy//Mx8wqymMgOcrWA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/root/channel-contents.tt b/src/Hydra/root/channel-contents.tt new file mode 100644 index 00000000..2c1959e5 --- /dev/null +++ b/src/Hydra/root/channel-contents.tt @@ -0,0 +1,57 @@ +[% WRAPPER layout.tt title="Channel ${channelName}" %] +[% PROCESS common.tt %] +[% USE HTML %] + +
You can subscribe to this channel by doing + +
$ nix-channel --add [% curUri %]+ + + + +
This channel contains the following packages.
+ +# | +Name | +System | +Description | +
---|---|---|---|
[% build.id %] | +[% build.resultInfo.releasename || build.nixname %] | +[% build.system %] | ++ [% IF build.homepage -%] + build.homepage) %]>[% HTML.escape(build.description) %] + [% ELSE -%] + [% HTML.escape(build.description) -%] + [% END -%] + | +