depot/third_party/nixpkgs/pkgs/development/interpreters/lua-5/hooks/luarocks-move-data.sh
Default email 410b979fe2 Project import generated by Copybara.
GitOrigin-RevId: a64e169e396460d6b5763a1de1dd197df8421688
2023-03-24 01:07:29 +01:00

15 lines
479 B
Bash

# luarocks installs data in a non-overridable location. Until a proper luarocks patch,
# we move the files around ourselves
echo "Sourcing luarocks-move-data-hook.sh"
luarocksMoveDataHook () {
echo "Executing luarocksMoveDataHook"
if [ -d "$out/$rocksSubdir" ]; then
cp -rfv "$out/$rocksSubdir/$pname/$rockspecVersion/." "$out"
fi
echo "Finished executing luarocksMoveDataHook"
}
echo "Using luarocksMoveDataHook"
preFixupHooks+=(luarocksMoveDataHook)