lol

Merge pull request #247111 from K900/requirefile-fix-error-message

requireFile: fix error message with SRI hashes

authored by

K900 and committed by
GitHub
fe0f28c0 abb697a0

+3 -2
+3 -2
pkgs/build-support/trivial-builders/default.nix
··· 824 824 or 825 825 nix-prefetch-url --type ${hashAlgo} file:///path/to/${name_} 826 826 ''; 827 - hashAlgo = if hash != null then "" 827 + hashAlgo = if hash != null then (builtins.head (lib.strings.splitString "-" hash)) 828 828 else if sha256 != null then "sha256" 829 829 else "sha1"; 830 + hashAlgo_ = if hash != null then "" else hashAlgo; 830 831 hash_ = if hash != null then hash 831 832 else if sha256 != null then sha256 832 833 else sha1; ··· 835 836 stdenvNoCC.mkDerivation { 836 837 name = name_; 837 838 outputHashMode = hashMode; 838 - outputHashAlgo = hashAlgo; 839 + outputHashAlgo = hashAlgo_; 839 840 outputHash = hash_; 840 841 preferLocalBuild = true; 841 842 allowSubstitutes = false;