diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2020-06-09 01:37:10 -0500 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2020-06-09 01:37:10 -0500 |
commit | f2e9046de511473744c394d5dbfb54ec678e0ce4 (patch) | |
tree | 2368684e66b414ed24cf1e7fda3885f2b9a2418f /pkgs/build-support/fetchurl/default.nix | |
parent | 944a86ed1a5412fcab302d2a35a79831d16ce9e2 (diff) | |
download | nixpkgs-f2e9046de511473744c394d5dbfb54ec678e0ce4.tar nixpkgs-f2e9046de511473744c394d5dbfb54ec678e0ce4.tar.gz nixpkgs-f2e9046de511473744c394d5dbfb54ec678e0ce4.tar.bz2 nixpkgs-f2e9046de511473744c394d5dbfb54ec678e0ce4.tar.lz nixpkgs-f2e9046de511473744c394d5dbfb54ec678e0ce4.tar.xz nixpkgs-f2e9046de511473744c394d5dbfb54ec678e0ce4.tar.zst nixpkgs-f2e9046de511473744c394d5dbfb54ec678e0ce4.zip |
fetchurl: allow empty hash
Meant as a companion to https://github.com/NixOS/nix/pull/3674 This just resets outputHash if nothing is passed in.
Diffstat (limited to 'pkgs/build-support/fetchurl/default.nix')
-rw-r--r-- | pkgs/build-support/fetchurl/default.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/build-support/fetchurl/default.nix b/pkgs/build-support/fetchurl/default.nix index a0c48468dfa..39ec5bf5f2c 100644 --- a/pkgs/build-support/fetchurl/default.nix +++ b/pkgs/build-support/fetchurl/default.nix @@ -112,7 +112,7 @@ let else if sha512 != "" then { outputHashAlgo = "sha512"; outputHash = sha512; } else if sha256 != "" then { outputHashAlgo = "sha256"; outputHash = sha256; } else if sha1 != "" then { outputHashAlgo = "sha1"; outputHash = sha1; } - else throw "fetchurl requires a hash for fixed-output derivation: ${lib.concatStringsSep ", " urls_}"; + else { outputHashAlgo = "sha256"; outputHash = ""; }; in stdenvNoCC.mkDerivation { |