YS3AVMLCJMPAF4KQ3R7SFF5543DCZOP6NC4CRXP523TK5W6PLL2AC SUU3PSXUDJCFLJDYUFSEFHKTMZGWUQZXDWP73FRAF4BS36WTRIKAC MVB7RRLTOLZALMUVUNSCMXDB76QLICJAV2GYQQZO7E6S327LHMSQC G5ZR3ZVZ2A4WEXI377W5KWOKJOOR7A2RN77L7FRJI2UPVIJYYPBAC HSVVEKTY2U5XJ4ZDHF43YEQXRPRWNZLZDDD4W7JFJ55UWD7CEFBQC 5NO7NCKTMM5ZW7JYOETUFOSWK2ACTXWDZGJAFXZN6L3OF6BFTNOQC LBNVQXUBEZ45SOTGVXK5UEZXIAIZTJLWZNUYFI4JZ6J65N3KPDVQC NUIKDEHLDR4ANFZFRCWBAWZGFVMHCZ7PSMPPFVQJ3AAAAWAQQD4AC OD5FSS5AJ3XRTV5Q4UQQF6JMBT6UUL7UUOMPPUBNOM6ZMVIHW35QC FPK5LF53CFUEKFYJ3IYXT4UTVC6IITWJOCFATMC4PLHEUP5SIEAAC D5QIOJGPKQJIYBUCSC3MFJ3TXLPNZ2XMI37GXMFRVRFWWR2VMTFAC PKPWUHUXLGPQFQUTNHLVGWNT6AB3H2VMDCBKT6IPZDC53CEL4W7QC ALIOF64IHNB3EZMOSLD5KNDZACXNN65JA6FN6YTB5R2ENSXBDMMQC ZI535LI6PJMKSOBJE33B3RRZ5S2JVTR3XPUDTSXJW6BZNTAHS3GQC J5UVLXOK6EDIL5I7VKWH4V2QDS4DPD7FHRK6XBWSXFRQS4JKXFZQC }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'); # !!!}
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;
(build-time dependencies: <a href="[% c.uri_for('/build' build.id 'buildtime-deps') %]">graph</a> | <a href="[% c.uri_for('/build' build.id 'deps') %]#buildtime">list</a>)
(<a href="[% c.uri_for('/build' build.id 'deps') %]#buildtime">build-time dependencies</a>)
(runtime dependencies: <a href="[% c.uri_for('/build' build.id 'runtime-deps') %]">graph</a> | <a href="[% c.uri_for('/build' build.id 'deps') %]#runtime">list</a>)
(<a href="[% c.uri_for('/build' build.id 'deps') %]#runtime">runtime dependencies</a>)