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.

Changed files
+7 -3
pkgs
development
interpreters
+7 -3
pkgs/development/interpreters/lua-5/build-luarocks-package.nix
···
];
inherit doCheck extraConfig rockspecFilename knownRockspec externalDeps nativeCheckInputs;
+
inherit dontWrapLuaPrograms;
buildInputs = let
# example externalDeps': [ { name = "CRYPTO"; dep = pkgs.openssl; } ]
···
runHook postBuild
'';
-
postFixup = lib.optionalString (!dontWrapLuaPrograms) ''
-
wrapLuaPrograms
-
'' + attrs.postFixup or "";
+
fixupPhase = ''
+
runHook preFixup
+
${lib.optionalString (!self.dontWrapLuaPrograms) "wrapLuaPrograms"}
+
runHook postFixup
+
'';
installPhase = ''
runHook preInstall
···
# 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