From b4a2e8626bad82a8d519328c8f6af811386f96ca Mon Sep 17 00:00:00 2001 From: Eman Resu <78693624+quatquatt@users.noreply.github.com> Date: Thu, 21 May 2026 23:13:40 -0400 Subject: [PATCH] fetchurl: avoid escaping hash --- pkgs/build-support/fetchurl/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/build-support/fetchurl/default.nix b/pkgs/build-support/fetchurl/default.nix index 0d626d5783f9..043609c2c7bb 100644 --- a/pkgs/build-support/fetchurl/default.nix +++ b/pkgs/build-support/fetchurl/default.nix @@ -260,7 +260,7 @@ lib.extendMkDerivation { else throw "fetchurl requires a hash for fixed-output derivation: ${lib.generators.toPretty { } urls_}"; - finalHashHasColon = lib.hasInfix ":" finalAttrs.hash; + finalHashHasColon = lib.match ".*:.*" finalAttrs.hash != null; finalHashColonMatch = lib.match "([^:]+)[:](.*)" finalAttrs.hash; resolvedUrl = lib.head (resolveUrl url);