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.
This commit is contained in:
parent
c4e89ef905
commit
ddefcf284c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user