lib/strings: convert to string within hasInfix

This should fix the issue mentioned here:
https://github.com/NixOS/nixpkgs/pull/168175#issuecomment-1107830574
main
Daniel Thwaites 2 years ago
parent 6d21b873f3
commit e888c2133f
No known key found for this signature in database
GPG Key ID: D8AFC4BF05670F9D
  1. 2
      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,

Loading…
Cancel
Save