luaPackages.luarocks_bootstrap: Fix build

I don't know what conditions are necessary to have the files in
`/etc/luarocks` populated so using `replace-quiet`.

At least on cross there is a file which contains configuration.
This commit is contained in:
Artturin 2024-08-27 20:43:16 +03:00
parent 56fab16fa9
commit 0c8ccd6b96

View File

@ -66,7 +66,7 @@ stdenv.mkDerivation (finalAttrs: {
postInstall = ''
sed -e "1s@.*@#! ${lua}/bin/lua$LUA_SUFFIX@" -i "$out"/bin/*
substituteInPlace $out/etc/luarocks/* \
--replace-fail '${lua.luaOnBuild}' '${lua}'
--replace-quiet '${lua.luaOnBuild}' '${lua}'
''
+ lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd luarocks \