about summary refs log tree commit diff
path: root/pkgs/development/interpreters/lua-5/hooks/luarocks-check-hook.sh
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/interpreters/lua-5/hooks/luarocks-check-hook.sh')
-rw-r--r--pkgs/development/interpreters/lua-5/hooks/luarocks-check-hook.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/pkgs/development/interpreters/lua-5/hooks/luarocks-check-hook.sh b/pkgs/development/interpreters/lua-5/hooks/luarocks-check-hook.sh
new file mode 100644
index 0000000000000..bc6c6255d5601
--- /dev/null
+++ b/pkgs/development/interpreters/lua-5/hooks/luarocks-check-hook.sh
@@ -0,0 +1,18 @@
+# Setup hook for checking whether Python imports succeed
+echo "Sourcing luarocks-check-hook.sh"
+
+luarocksCheckPhase () {
+    echo "Executing luarocksCheckPhase"
+    runHook preCheck
+
+    luarocks test
+
+    runHook postCheck
+    echo "Finished executing luarocksCheckPhase"
+}
+
+if [ -z "${dontLuarocksCheck-}" ] && [ -z "${checkPhase-}" ]; then
+    echo "Using luarocksCheckPhase"
+    checkPhase+=" luarocksCheckPhase"
+fi
+