about summary refs log tree commit diff
path: root/pkgs/development/interpreters/lua-5
diff options
context:
space:
mode:
authorMatthieu Coudron <886074+teto@users.noreply.github.com>2024-04-02 10:48:33 +0200
committerMatthieu Coudron <886074+teto@users.noreply.github.com>2024-04-02 11:20:36 +0200
commitc55b4dbcd2af7ff8065ee4fece2c8793427ec88b (patch)
tree30dfd5fbf97dd494e1e2d3e7267cf08e353e7925 /pkgs/development/interpreters/lua-5
parentb8be0164260e61c1859d12b5d973c0f3f67d379c (diff)
lua: fix setup-hook *.lua matching
the setup-hook checks if a derivation contains lua files matching
lua_path patterns. We use bash's globstar extension for that but
`**.lua` doesn't return files in subfolders, it has to be `**/*.lua`.
Adjust the pattern accordingly.
Diffstat (limited to 'pkgs/development/interpreters/lua-5')
-rw-r--r--pkgs/development/interpreters/lua-5/hooks/setup-hook.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/development/interpreters/lua-5/hooks/setup-hook.sh b/pkgs/development/interpreters/lua-5/hooks/setup-hook.sh
index cbc7b7b53e9b1..3027021661393 100644
--- a/pkgs/development/interpreters/lua-5/hooks/setup-hook.sh
+++ b/pkgs/development/interpreters/lua-5/hooks/setup-hook.sh
@@ -25,8 +25,8 @@ addToLuaSearchPathWithCustomDelimiter() {
   # export only if the folder contains lua files
   shopt -s globstar
 
-
-  for _file in ${absPattern/\?/\*\*}; do
+  local adjustedPattern="${absPattern/\?/\*\*\/\*}"
+  for _file in $adjustedPattern; do
     export "${varName}=${!varName:+${!varName};}${absPattern}"
     shopt -u globstar
     return;