luaPackages.luarocks: don't refer to luaOnBuild

This commit is contained in:
Artturin 2022-08-26 20:00:31 +03:00
parent 39571bd6fa
commit 7b24b57c14

View file

@ -58,6 +58,8 @@ stdenv.mkDerivation rec {
postInstall = ''
sed -e "1s@.*@#! ${lua}/bin/lua$LUA_SUFFIX@" -i "$out"/bin/*
substituteInPlace $out/etc/luarocks/* \
--replace '${lua.luaOnBuild}' '${lua}'
for i in "$out"/bin/*; do
test -L "$i" || {
@ -86,6 +88,10 @@ stdenv.mkDerivation rec {
export LUA_PATH="src/?.lua;''${LUA_PATH:-}"
'';
disallowedReferences = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
lua.luaOnBuild
];
passthru = {
updateScript = nix-update-script {
attrPath = pname;