From a6dfaad92241ff299131d49d71c53ca4e6661e12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=ADas=20Lang?= Date: Tue, 19 May 2020 00:50:24 -0300 Subject: [PATCH] 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. --- pkgs/applications/video/mpv/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/applications/video/mpv/default.nix b/pkgs/applications/video/mpv/default.nix index 50b67f455581..8bb5d5aca1f4 100644 --- a/pkgs/applications/video/mpv/default.nix +++ b/pkgs/applications/video/mpv/default.nix @@ -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" \