From 039f6c197364a20dd6a25e03c6725cfa74589de7 Mon Sep 17 00:00:00 2001 From: Matt Sturgeon Date: Wed, 26 Jun 2024 17:39:15 +0100 Subject: [PATCH] lib/lua: workaround `builtins.match` alias issue It seems that `with lib` isn't (always) bringing `match` into scope Odd, but we can fix by explicitly using `builtins.match`. --- lib/to-lua.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/to-lua.nix b/lib/to-lua.nix index 3f789dfa..52681879 100644 --- a/lib/to-lua.nix +++ b/lib/to-lua.nix @@ -30,7 +30,7 @@ rec { # Valid lua identifiers are not reserved keywords, do not start with a digit, # and contain only letters, digits, and underscores. - isIdentifier = s: !(isKeyword s) && (match "[A-Za-z_][0-9A-Za-z_]*" s) == [ ]; + isIdentifier = s: !(isKeyword s) && (builtins.match "[A-Za-z_][0-9A-Za-z_]*" s) == [ ]; # toLua' with default options, aliased as toLuaObject at the top-level toLua = toLua' { };