lua: run postConfigure hook for rock and rockspec
it was previously run only for src.rock
This commit is contained in:
parent
b93ccb7136
commit
ed7818219a
|
@ -3,8 +3,6 @@
|
|||
, lua
|
||||
, stdenv
|
||||
, wrapLua
|
||||
, unzip
|
||||
, writeText
|
||||
# Whether the derivation provides a lua module or not.
|
||||
, toLuaModule
|
||||
}:
|
||||
|
@ -117,14 +115,16 @@ builtins.removeAttrs attrs ["disabled" "checkInputs"] // {
|
|||
cat > ${luarocks_config} <<EOF
|
||||
${luarocks_content}
|
||||
EOF
|
||||
export LUAROCKS_CONFIG=$PWD/${luarocks_config};
|
||||
export LUAROCKS_CONFIG="$PWD/${luarocks_config}";
|
||||
''
|
||||
+ lib.optionalString (knownRockspec != null) ''
|
||||
|
||||
# prevents the following type of error:
|
||||
# Inconsistency between rockspec filename (42fm1b3d7iv6fcbhgm9674as3jh6y2sh-luv-1.22.0-1.rockspec) and its contents (luv-1.22.0-1.rockspec)
|
||||
rockspecFilename="$TMP/$(stripHash ''${knownRockspec})"
|
||||
cp ''${knownRockspec} $rockspecFilename
|
||||
cp ''${knownRockspec} "$rockspecFilename"
|
||||
''
|
||||
+ ''
|
||||
runHook postConfigure
|
||||
'';
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ let
|
|||
|
||||
buildLuarocksPackage = with pkgs.lib; makeOverridable( callPackage ../development/interpreters/lua-5/build-lua-package.nix {
|
||||
inherit toLuaModule;
|
||||
inherit lua writeText;
|
||||
inherit lua;
|
||||
});
|
||||
in
|
||||
with self; {
|
||||
|
|
Loading…
Reference in a new issue