about summary refs log tree commit diff
path: root/corepkgs/fetchurl.nix
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-07-04T12·45+0200
committerEelco Dolstra <edolstra@gmail.com>2017-07-04T12·45+0200
commitfe97c6989841460efca37f0f3b9b470c98229283 (patch)
tree6189de454f8dce91d93f55f031b433c60b9a2e26 /corepkgs/fetchurl.nix
parent0a5a867758285ee07334a44ede336ae75fd51c50 (diff)
<nix/fetchurl.nix>: Support sha512 argument
Diffstat (limited to 'corepkgs/fetchurl.nix')
-rw-r--r--corepkgs/fetchurl.nix6
1 files changed, 3 insertions, 3 deletions
diff --git a/corepkgs/fetchurl.nix b/corepkgs/fetchurl.nix
index 6235943397..e135b947fd 100644
--- a/corepkgs/fetchurl.nix
+++ b/corepkgs/fetchurl.nix
@@ -1,10 +1,10 @@
 { system ? builtins.currentSystem
 , url
-, md5 ? "", sha1 ? "", sha256 ? ""
+, md5 ? "", sha1 ? "", sha256 ? "", sha512 ? ""
 , outputHash ?
-    if sha1 != "" then sha1 else if md5 != "" then md5 else sha256
+    if sha512 != "" then sha512 else if sha1 != "" then sha1 else if md5 != "" then md5 else sha256
 , outputHashAlgo ?
-    if sha1 != "" then "sha1" else if md5 != "" then "md5" else "sha256"
+    if sha512 != "" then "sha512" else if sha1 != "" then "sha1" else if md5 != "" then "md5" else "sha256"
 , executable ? false
 , unpack ? false
 , name ? baseNameOf (toString url)