lua: run postConfigure hook for rock and rockspec

it was previously run only for src.rock
This commit is contained in:
Matthieu Coudron 2019-02-17 21:18:49 +09:00 committed by Jörg Thalheim
parent b93ccb7136
commit ed7818219a
No known key found for this signature in database
GPG Key ID: B3F5D81B0C6967C4
2 changed files with 5 additions and 5 deletions

View File

@ -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
'';

View File

@ -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; {