From e888c2133fb703d0161a6d7fb45f899289cb9729 Mon Sep 17 00:00:00 2001 From: Daniel Thwaites Date: Sun, 24 Apr 2022 14:17:43 +0100 Subject: [PATCH] lib/strings: convert to string within hasInfix This should fix the issue mentioned here: https://github.com/NixOS/nixpkgs/pull/168175#issuecomment-1107830574 --- lib/strings.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/strings.nix b/lib/strings.nix index d3ef748fb71e..328f64cf1b61 100644 --- a/lib/strings.nix +++ b/lib/strings.nix @@ -254,7 +254,7 @@ rec { => false */ hasInfix = infix: content: - builtins.match ".*${escapeRegex infix}.*" content != null; + builtins.match ".*${escapeRegex infix}.*" "${content}" != null; /* Convert a string to a list of characters (i.e. singleton strings). This allows you to, e.g., map a function over each character. However,