From 334135448ebafdf28182d7c8676cf3579f0fec33 Mon Sep 17 00:00:00 2001 From: Rob Vermaas Date: Mon, 16 Apr 2012 15:23:07 +0200 Subject: [PATCH] Remove buildtime and runtime dependency graph. It is useless on normal derivations. --- src/lib/Hydra/Controller/Build.pm | 30 ------------------------------ src/lib/Hydra/View/NixDepGraph.pm | 23 ----------------------- src/root/build.tt | 4 ++-- 3 files changed, 2 insertions(+), 55 deletions(-) delete mode 100644 src/lib/Hydra/View/NixDepGraph.pm diff --git a/src/lib/Hydra/Controller/Build.pm b/src/lib/Hydra/Controller/Build.pm index 4df80ddf..f9f1825a 100644 --- a/src/lib/Hydra/Controller/Build.pm +++ b/src/lib/Hydra/Controller/Build.pm @@ -289,36 +289,6 @@ sub contents : Chained('build') PathPart Args(1) { } -sub runtimedeps : Chained('build') PathPart('runtime-deps') { - my ($self, $c) = @_; - - my $build = $c->stash->{build}; - - notFound($c, "Path " . $build->outpath . " is no longer available.") - unless isValidPath($build->outpath); - - $c->stash->{current_view} = 'NixDepGraph'; - $c->stash->{storePaths} = [$build->outpath]; - - $c->res->content_type('image/png'); # !!! -} - - -sub buildtimedeps : Chained('build') PathPart('buildtime-deps') { - my ($self, $c) = @_; - - my $build = $c->stash->{build}; - - notFound($c, "Path " . $build->drvpath . " is no longer available.") - unless isValidPath($build->drvpath); - - $c->stash->{current_view} = 'NixDepGraph'; - $c->stash->{storePaths} = [$build->drvpath]; - - $c->res->content_type('image/png'); # !!! -} - - sub deps : Chained('build') PathPart('deps') { my ($self, $c) = @_; diff --git a/src/lib/Hydra/View/NixDepGraph.pm b/src/lib/Hydra/View/NixDepGraph.pm deleted file mode 100644 index f4315959..00000000 --- a/src/lib/Hydra/View/NixDepGraph.pm +++ /dev/null @@ -1,23 +0,0 @@ -package Hydra::View::NixDepGraph; - -use strict; -use base qw/Catalyst::View/; -use IO::Pipe; - -sub process { - my ($self, $c) = @_; - - $c->response->content_type('image/svg+xml'); - - my @storePaths = @{$c->stash->{storePaths}}; - - my $fh = new IO::Handle; - - open $fh, "nix-store --query --graph @storePaths | dot -Tsvg:cairo -Gdpi=100 -Gsize=20,20 -Gbgcolor=transparent |"; - - $c->response->body($fh); - - return 1; -} - -1; diff --git a/src/root/build.tt b/src/root/build.tt index 50df3fdd..47d3d193 100644 --- a/src/root/build.tt +++ b/src/root/build.tt @@ -285,7 +285,7 @@ [% build.drvpath %] [% IF drvAvailable %] - (build-time dependencies: graph | list) + (build-time dependencies) [% END %] @@ -294,7 +294,7 @@ [% build.outpath %] [% IF available %] - (runtime dependencies: graph | list) + (runtime dependencies) [% END %]