git.iko.soy/typeable/nixpkgs
on master help sign in
jetbrains: update.pl, make sure hashes are in base32
commitadd7faf539a4bff2e8071000831b02bbb8742c11 authorEdward Tjörnhammar <ed@cflags.cc> dateTue 19 Sep 2017, 10:25 (9 years ago) parentd623220
1 file changed+5−2
pkgs/applications/editors/jetbrains/update.pl+5−2
pkgs/applications/editors/jetbrains/update.pl+5−2
@@ -60,10 +60,13 @@ sub update_nix_block {
6060 die "$url still has some interpolation" if $url =~ /\$/;
6161
6262 my ($sha256) = get("$url.sha256") =~ /^([0-9a-f]{64})/;
63− die "invalid sha256 in $url.sha256" unless $sha256;
63+ my ($sha256Base32) = readpipe("nix-hash --type sha256 --to-base32 $sha256");
64+ chomp $sha256Base32;
65+ print "Jetbrains published SHA256: $sha256\n";
66+ print "Conversion into base32 yeilds: $sha256Base32\n";
6467
6568 $block =~ s#version\s*=\s*"([^"]+)".+$#version = "$latest_versions{$channel}"; /* updated by script */#m;
66− $block =~ s#sha256\s*=\s*"([^"]+)".+$#sha256 = "$sha256"; /* updated by script */#m;
69+ $block =~ s#sha256\s*=\s*"([^"]+)".+$#sha256 = "$sha256Base32"; /* updated by script */#m;
6770 }
6871 }
6972 return $block;