copy-tarballs.pl: Revive extracting all tarballs from release.nix

This commit is contained in:
Eelco Dolstra
2015-12-16 15:38:59 +01:00
parent 493f633002
commit 7cd3d502bb
6 changed files with 47 additions and 9 deletions
+6 -1
View File
@@ -93,7 +93,7 @@ elsif ($op eq "--expr") {
# Evaluate find-tarballs.nix.
my $expr = $ARGV[0] // die "$0: --expr requires a Nix expression\n";
my $pid = open(JSON, "-|", "nix-instantiate", "--eval-only", "--json", "--strict",
my $pid = open(JSON, "-|", "nix-instantiate", "--eval", "--json", "--strict",
"<nixpkgs/maintainers/scripts/find-tarballs.nix>",
"--arg", "expr", $expr);
my $stdout = <JSON>;
@@ -113,6 +113,11 @@ elsif ($op eq "--expr") {
my $algo = $fetch->{type};
my $hash = $fetch->{hash};
if (defined $ENV{DEBUG}) {
print "$url $algo $hash\n";
next;
}
if ($url !~ /^http:/ && $url !~ /^https:/ && $url !~ /^ftp:/ && $url !~ /^mirror:/) {
print STDERR "skipping $url (unsupported scheme)\n";
next;