about summary refs log tree commit diff
path: root/pkgs/applications/video/mpv
diff options
context:
space:
mode:
authorMatías Lang <matiasl@infobytesec.com>2020-05-19 00:50:24 -0300
committerMatías Lang <matiasl@infobytesec.com>2020-05-19 00:50:24 -0300
commita6dfaad92241ff299131d49d71c53ca4e6661e12 (patch)
treee96a1537882c95ed9bd74df1912cb329a6a92ee5 /pkgs/applications/video/mpv
parent7f39cf6893a5e1ca015322e0c40817fece68d08c (diff)
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.
Diffstat (limited to 'pkgs/applications/video/mpv')
-rw-r--r--pkgs/applications/video/mpv/default.nix2
1 files changed, 2 insertions, 0 deletions
diff --git a/pkgs/applications/video/mpv/default.nix b/pkgs/applications/video/mpv/default.nix
index 50b67f455581a..8bb5d5aca1f4e 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" \