From 81dfa0d65ab00020ad517c3ec3a11359f8ed5abf Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Tue, 30 Apr 2019 18:24:33 -0400 Subject: [PATCH] mirror: sets hash format to base16 From the nix 2.2 changelog: > nix hash-file and nix hash-path now print hashes in SRI > format by default. They also use SHA-256 by default > instead of SHA-512 because that's what we use most of the > time in Nixpkgs. --- mirror-nixos-branch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mirror-nixos-branch.pl b/mirror-nixos-branch.pl index d1986f4..396b85d 100755 --- a/mirror-nixos-branch.pl +++ b/mirror-nixos-branch.pl @@ -115,7 +115,7 @@ if ($bucket->head_key("$releasePrefix")) { } if (-e "$dstFile.sha256") { - my $sha256_actual = `nix hash-file --type sha256 '$dstFile'`; + my $sha256_actual = `nix hash-file --base16 --type sha256 '$dstFile'`; chomp $sha256_actual; if ($sha256_expected ne $sha256_actual) { print STDERR "file $dstFile is corrupt $sha256_expected $sha256_actual\n";