diff --git a/pkgs/build-support/vm/rpm/rpm-closure.pl b/pkgs/build-support/vm/rpm/rpm-closure.pl index c3e8d52a4c67..5f333fdfe80b 100644 --- a/pkgs/build-support/vm/rpm/rpm-closure.pl +++ b/pkgs/build-support/vm/rpm/rpm-closure.pl @@ -103,10 +103,15 @@ print "[\n\n"; foreach my $pkgName (@needed) { my $pkg = $pkgs{$pkgName}; - die if $pkg->{checksum}->{type} ne "sha"; print " (fetchurl {\n"; print " url = $urlPrefix/$pkg->{location}->{href};\n"; - print " sha1 = \"$pkg->{checksum}->{content}\";\n"; + if ($pkg->{checksum}->{type} eq "sha") { + print " sha1 = \"$pkg->{checksum}->{content}\";\n"; + } elsif ($pkg->{checksum}->{type} eq "sha256") { + print " sha256 = \"$pkg->{checksum}->{content}\";\n"; + } else { + die "unsupported hash type"; + } print " })\n"; print "\n"; }