Subject: Re: bug#25425: cannot express search path

From: [email-masked] (Ludovic Courtès)
Date: Thu, 12 Jan 2017 15:38:04 +0100

Ricardo Wurmus <[email-masked]> skribis:

> It seems that the “search-path-specification” cannot be used to include
> placeholders such as “?” as required by LUA_PATH and LUA_CPATH.  The
> search paths in Lua are not directories and they are not actual file
> names.

Indeed.

> I suggest adding an optional “placeholder” field to
> “search-path-specification”, which would hold a string like “?/?.lua” in
> this case.

I think this should work:

       (search-path-specification
         (variable "LUA_PATH")
         (separator ";")
         (files '("share/lua/5.3"))
         (file-pattern "\\.lua$")
         (file-type 'regular))

See libxml2 for an example with similar requirements.

HTH!

Ludo’.