summary refs log tree commit diff
path: root/pkgs/applications/video
diff options
context:
space:
mode:
authorrnhmjoj <rnhmjoj@inventati.org>2018-02-27 17:29:05 +0100
committerrnhmjoj <rnhmjoj@inventati.org>2018-02-27 17:29:05 +0100
commitab59f0df8d6f10a6f00dbde641a921bf562398d8 (patch)
tree79232285401dd16f02ab7a5aeb1149bb616c9942 /pkgs/applications/video
parent41c1a621136fb17a17fb033be3c55e92ff56b6ce (diff)
downloadnixlib-ab59f0df8d6f10a6f00dbde641a921bf562398d8.tar
nixlib-ab59f0df8d6f10a6f00dbde641a921bf562398d8.tar.gz
nixlib-ab59f0df8d6f10a6f00dbde641a921bf562398d8.tar.bz2
nixlib-ab59f0df8d6f10a6f00dbde641a921bf562398d8.tar.lz
nixlib-ab59f0df8d6f10a6f00dbde641a921bf562398d8.tar.xz
nixlib-ab59f0df8d6f10a6f00dbde641a921bf562398d8.tar.zst
nixlib-ab59f0df8d6f10a6f00dbde641a921bf562398d8.zip
mpv: add luasocket path
Diffstat (limited to 'pkgs/applications/video')
-rw-r--r--pkgs/applications/video/mpv/default.nix14
1 files changed, 11 insertions, 3 deletions
diff --git a/pkgs/applications/video/mpv/default.nix b/pkgs/applications/video/mpv/default.nix
index 8bd9f9856595..1616665b75d5 100644
--- a/pkgs/applications/video/mpv/default.nix
+++ b/pkgs/applications/video/mpv/default.nix
@@ -1,7 +1,7 @@
 { stdenv, fetchurl, fetchFromGitHub, fetchpatch, makeWrapper
 , docutils, perl, pkgconfig, python3, which, ffmpeg
 , freefont_ttf, freetype, libass, libpthreadstubs
-, lua, lua5_sockets, libuchardet, libiconv ? null, darwin
+, lua, luasocket, libuchardet, libiconv ? null, darwin
 
 , x11Support ? true,
     mesa       ? null,
@@ -169,7 +169,14 @@ in stdenv.mkDerivation rec {
     python3 ${waf} build
   '';
 
-  installPhase = ''
+  installPhase =
+  let
+    getPath  = type : "${luasocket}/lib/lua/${lua.luaversion}/?.${type};" +
+                      "${luasocket}/share/lua/${lua.luaversion}/?.${type}";
+    luaPath  = getPath "lua";
+    luaCPath = getPath "so";
+  in
+  ''
     python3 ${waf} install
 
     # Use a standard font
@@ -178,6 +185,8 @@ in stdenv.mkDerivation rec {
     # Ensure youtube-dl is available in $PATH for MPV
     wrapProgram $out/bin/mpv \
       --add-flags "--scripts=${concatStringsSep "," scripts}" \
+      --prefix LUA_PATH : "${luaPath}" \
+      --prefix LUA_CPATH : "${luaCPath}" \
   '' + optionalString youtubeSupport ''
       --prefix PATH : "${youtube-dl}/bin" \
   '' + optionalString vapoursynthSupport ''
@@ -203,4 +212,3 @@ in stdenv.mkDerivation rec {
     '';
   };
 }
-# TODO: investigate lua5_sockets bug