summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2020-02-14 12:56:51 +0100
committerJan Tojnar <jtojnar@gmail.com>2021-02-08 19:47:07 +0100
commit1eef9f46e2d1033c5301483ec8f0f543283cf847 (patch)
tree481f20c2c9958943122b8c30d5cceba6767c2a4c
parentfetchgit: Sync hash support with fetchurl (diff)
downloadnixpkgs-1eef9f46e2d1033c5301483ec8f0f543283cf847.tar.gz
fetchpatch: Allow using SRI hash instead of sha256
-rw-r--r--pkgs/build-support/fetchpatch/default.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/build-support/fetchpatch/default.nix b/pkgs/build-support/fetchpatch/default.nix
index 71c0d4664983..92d049cce47c 100644
--- a/pkgs/build-support/fetchpatch/default.nix
+++ b/pkgs/build-support/fetchpatch/default.nix
@@ -13,7 +13,7 @@ in
let
# Make base-64 encoded SRI hash filename-safe using RFC 4648 ยง5
- tmpname = lib.replaceStrings [ "+" "/" "=" ] [ "-" "_" "" ] args.sha256;
+ tmpname = lib.replaceStrings [ "+" "/" "=" ] [ "-" "_" "" ] (args.hash or args.sha256);
in
fetchurl ({
postFetch = ''