nixpkgs/helpers/paths-from-graph.pl
Eelco Dolstra 903a64c87d * Some things are best done in Perl.
svn path=/nixos/trunk/; revision=7773
2007-01-23 14:34:44 +00:00

27 lines
484 B
Perl

use strict;
my %storePaths;
foreach my $graph (@ARGV) {
open GRAPH, "<$graph" or die;
while (<GRAPH>) {
chomp;
my $storePath = "$_";
$storePaths{$storePath} = 1;
my $deriver = <GRAPH>; chomp $deriver;
my $count = <GRAPH>; chomp $count;
for (my $i = 0; $i < $count; ++$i) {
my $ref = <GRAPH>;
}
}
close GRAPH;
}
foreach my $storePath (sort (keys %storePaths)) {
print "$storePath\n";
}