about summary refs log tree commit diff
path: root/pkgs/applications/video
diff options
context:
space:
mode:
authorMatthieu Coudron <coudron@iij.ad.jp>2019-02-06 00:00:19 +0900
committerMichael Raskin <7c6f434c@mail.ru>2019-02-05 15:00:19 +0000
commitaaeaa6d1c6052938c302c07407e441e5b5794e48 (patch)
treeb886984d40101e65aa2321dedc50eee00bce31c6 /pkgs/applications/video
parentc15c4d76ce8f9d295a0ee297dec614ed6fcaa422 (diff)
downloadnixlib-aaeaa6d1c6052938c302c07407e441e5b5794e48.tar
nixlib-aaeaa6d1c6052938c302c07407e441e5b5794e48.tar.gz
nixlib-aaeaa6d1c6052938c302c07407e441e5b5794e48.tar.bz2
nixlib-aaeaa6d1c6052938c302c07407e441e5b5794e48.tar.lz
nixlib-aaeaa6d1c6052938c302c07407e441e5b5794e48.tar.xz
nixlib-aaeaa6d1c6052938c302c07407e441e5b5794e48.tar.zst
nixlib-aaeaa6d1c6052938c302c07407e441e5b5794e48.zip
Add checkPhase for neovim (disabled by default) (#55266)
* neovim-unwrapped: now use lua environments

* mpv: use lua environments

* luaPackages.inspect: init at 3.1.1-0

* luaPackages.lgi: mark as a lua module

* luaPackages.vicious: mark as a lua module
Diffstat (limited to 'pkgs/applications/video')
-rw-r--r--pkgs/applications/video/mpv/default.nix19
1 files changed, 7 insertions, 12 deletions
diff --git a/pkgs/applications/video/mpv/default.nix b/pkgs/applications/video/mpv/default.nix
index 4e4c623ca607..ffbaa9fffdf7 100644
--- a/pkgs/applications/video/mpv/default.nix
+++ b/pkgs/applications/video/mpv/default.nix
@@ -1,7 +1,7 @@
 { stdenv, fetchurl, fetchFromGitHub, makeWrapper
 , docutils, perl, pkgconfig, python3, which, ffmpeg_4
 , freefont_ttf, freetype, libass, libpthreadstubs, mujs
-, lua, luasocket, libuchardet, libiconv ? null, darwin
+, lua, libuchardet, libiconv ? null, darwin
 
 , waylandSupport ? false
   , wayland           ? null
@@ -92,6 +92,8 @@ let
              "http://www.freehackers.org/~tnagy/release/waf-${wafVersion}" ];
     sha256 = "0j7sbn3w6bgslvwwh5v9527w3gi2sd08kskrgxamx693y0b0i3ia";
   };
+  luaEnv = lua.withPackages(ps: with ps; [ luasocket]);
+
 in stdenv.mkDerivation rec {
   name = "mpv-${version}";
   version = "0.29.1";
@@ -139,7 +141,7 @@ in stdenv.mkDerivation rec {
 
   buildInputs = [
     ffmpeg_4 freetype libass libpthreadstubs
-    lua luasocket libuchardet mujs
+    luaEnv libuchardet mujs
   ] ++ optional alsaSupport        alsaLib
     ++ optional archiveSupport     libarchive
     ++ optional bluraySupport      libbluray
@@ -183,16 +185,9 @@ in stdenv.mkDerivation rec {
 
   # Ensure youtube-dl is available in $PATH for mpv
   wrapperFlags =
-  let
-    getPath  = type : "${luasocket}/lib/lua/${lua.luaversion}/?.${type};" +
-                      "${luasocket}/share/lua/${lua.luaversion}/?.${type}";
-    luaPath  = getPath "lua";
-    luaCPath = getPath "so";
-  in
-  ''
-      --prefix LUA_PATH : "${luaPath}" \
-      --prefix LUA_CPATH : "${luaCPath}" \
-  '' + optionalString youtubeSupport ''
+
+    ''--prefix PATH : "${luaEnv}/bin" \''
+  + optionalString youtubeSupport ''
       --prefix PATH : "${youtube-dl}/bin" \
   '' + optionalString vapoursynthSupport ''
       --prefix PYTHONPATH : "${vapoursynth}/lib/${python3.libPrefix}/site-packages:$PYTHONPATH"