mpv: fix lua path

mpv uses lua without directly executing the "lua" binary, so prefixing
$PATH wasn't enough. Without this change, lua scripts were unable to
import luasocket.
This commit is contained in:
Matías Lang 2020-05-19 00:50:24 -03:00
parent 7f39cf6893
commit a6dfaad922

View File

@ -184,6 +184,8 @@ in stdenv.mkDerivation rec {
# Ensure youtube-dl is available in $PATH for mpv
wrapperFlags =
''--prefix LUA_CPATH ';' "${luaEnv}/lib/lua/${lua.luaversion}/?.so" \'' +
''--prefix LUA_PATH ';' "${luaEnv}/share/lua/${lua.luaversion}/?.lua" \'' +
''--prefix PATH : "${luaEnv}/bin" \''
+ optionalString youtubeSupport ''
--prefix PATH : "${youtube-dl}/bin" \