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`.
This commit is contained in:
Matt Sturgeon 2024-06-26 17:39:15 +01:00
parent 7dcdd6e989
commit 039f6c1973
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299

View file

@ -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' { };