From 7b24b57c14b954ff15a0b49b8a0404a222e3f258 Mon Sep 17 00:00:00 2001 From: Artturin Date: Fri, 26 Aug 2022 20:00:31 +0300 Subject: [PATCH] luaPackages.luarocks: don't refer to luaOnBuild --- pkgs/development/tools/misc/luarocks/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/tools/misc/luarocks/default.nix b/pkgs/development/tools/misc/luarocks/default.nix index 533648c217d6..18285481514b 100644 --- a/pkgs/development/tools/misc/luarocks/default.nix +++ b/pkgs/development/tools/misc/luarocks/default.nix @@ -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;