Merge pull request #188626 from rapenne-s/include_patches_tarballs

find-tarballs.nix: Include patches
This commit is contained in:
Anderson Torres 2022-11-01 14:24:04 -03:00 committed by GitHub
commit 2e92b7cf57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -164,6 +164,7 @@ elsif (defined $expr) {
my $algo = $fetch->{type};
my $hash = $fetch->{hash};
my $name = $fetch->{name};
my $isPatch = $fetch->{isPatch};
if ($hash =~ /^([a-z0-9]+)-([A-Za-z0-9+\/=]+)$/) {
$algo = $1;
@ -189,6 +190,11 @@ elsif (defined $expr) {
next;
}
if ($isPatch) {
print STDERR "skipping $url (support for patches is missing)\n";
next;
}
next if defined $exclude && $url =~ /$exclude/;
if (alreadyMirrored($algo, $hash)) {

View File

@ -14,12 +14,12 @@ let
operator = const [ ];
});
urls = map (drv: { url = head (drv.urls or [ drv.url ]); hash = drv.outputHash; type = drv.outputHashAlgo; name = drv.name; }) fetchurlDependencies;
urls = map (drv: { url = head (drv.urls or [ drv.url ]); hash = drv.outputHash; isPatch = (drv?postFetch && drv.postFetch != ""); type = drv.outputHashAlgo; name = drv.name; }) fetchurlDependencies;
fetchurlDependencies =
filter
(drv: drv.outputHash or "" != "" && drv.outputHashMode or "flat" == "flat"
&& drv.postFetch or "" == "" && (drv ? url || drv ? urls))
&& (drv ? url || drv ? urls))
dependencies;
dependencies = map (x: x.value) (genericClosure {