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-10 20:32:14 +0200
committerMatthieu Coudron <886074+teto@users.noreply.github.com>2024-04-11 00:30:31 +0200
commitddefcf284ce57b2ebe042eba75feec70cfb19268 (patch)
treea3023cc04381b79f3d390fd436127b5cd422078b /pkgs/development/interpreters/lua-5
parentc4e89ef9057f772309ff6f3c463bb82920c2ead8 (diff)
buildLuarocksPackage: rework fixup phase
I was working on lua tests, enabling nlua and I started overriding
postFixup, which removed the default phase for build-luarocks-package so
instead let's make it a proper phase.
Diffstat (limited to 'pkgs/development/interpreters/lua-5')
-rw-r--r--pkgs/development/interpreters/lua-5/build-luarocks-package.nix10
1 files changed, 7 insertions, 3 deletions
diff --git a/pkgs/development/interpreters/lua-5/build-luarocks-package.nix b/pkgs/development/interpreters/lua-5/build-luarocks-package.nix
index 97ac535c93036..0040fca0ba2c7 100644
--- a/pkgs/development/interpreters/lua-5/build-luarocks-package.nix
+++ b/pkgs/development/interpreters/lua-5/build-luarocks-package.nix
@@ -94,6 +94,7 @@ let
   ];
 
   inherit doCheck extraConfig rockspecFilename knownRockspec externalDeps nativeCheckInputs;
+  inherit dontWrapLuaPrograms;
 
   buildInputs = let
     # example externalDeps': [ { name = "CRYPTO"; dep = pkgs.openssl; } ]
@@ -177,9 +178,11 @@ let
     runHook postBuild
   '';
 
-  postFixup = lib.optionalString (!dontWrapLuaPrograms) ''
-    wrapLuaPrograms
-  '' + attrs.postFixup or "";
+  fixupPhase = ''
+    runHook preFixup
+    ${lib.optionalString (!self.dontWrapLuaPrograms) "wrapLuaPrograms"}
+    runHook postFixup
+    '';
 
   installPhase = ''
     runHook preInstall
@@ -196,6 +199,7 @@ let
     # maybe we could reestablish dependency checking via passing --rock-trees
 
     nix_debug "ROCKSPEC $rockspecFilename"
+    # deps-mode=all tells luarocks to use every configured rocks_trees
     luarocks $LUAROCKS_EXTRA_ARGS make --deps-mode=all --tree=$out ''${rockspecFilename}
 
     runHook postInstall