mpv: add luasocket path
This commit is contained in:
parent
41c1a62113
commit
ab59f0df8d
@ -1,7 +1,7 @@
|
|||||||
{ stdenv, fetchurl, fetchFromGitHub, fetchpatch, makeWrapper
|
{ stdenv, fetchurl, fetchFromGitHub, fetchpatch, makeWrapper
|
||||||
, docutils, perl, pkgconfig, python3, which, ffmpeg
|
, docutils, perl, pkgconfig, python3, which, ffmpeg
|
||||||
, freefont_ttf, freetype, libass, libpthreadstubs
|
, freefont_ttf, freetype, libass, libpthreadstubs
|
||||||
, lua, lua5_sockets, libuchardet, libiconv ? null, darwin
|
, lua, luasocket, libuchardet, libiconv ? null, darwin
|
||||||
|
|
||||||
, x11Support ? true,
|
, x11Support ? true,
|
||||||
mesa ? null,
|
mesa ? null,
|
||||||
@ -169,7 +169,14 @@ in stdenv.mkDerivation rec {
|
|||||||
python3 ${waf} build
|
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
|
python3 ${waf} install
|
||||||
|
|
||||||
# Use a standard font
|
# Use a standard font
|
||||||
@ -178,6 +185,8 @@ in stdenv.mkDerivation rec {
|
|||||||
# Ensure youtube-dl is available in $PATH for MPV
|
# Ensure youtube-dl is available in $PATH for MPV
|
||||||
wrapProgram $out/bin/mpv \
|
wrapProgram $out/bin/mpv \
|
||||||
--add-flags "--scripts=${concatStringsSep "," scripts}" \
|
--add-flags "--scripts=${concatStringsSep "," scripts}" \
|
||||||
|
--prefix LUA_PATH : "${luaPath}" \
|
||||||
|
--prefix LUA_CPATH : "${luaCPath}" \
|
||||||
'' + optionalString youtubeSupport ''
|
'' + optionalString youtubeSupport ''
|
||||||
--prefix PATH : "${youtube-dl}/bin" \
|
--prefix PATH : "${youtube-dl}/bin" \
|
||||||
'' + optionalString vapoursynthSupport ''
|
'' + optionalString vapoursynthSupport ''
|
||||||
@ -203,4 +212,3 @@ in stdenv.mkDerivation rec {
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
# TODO: investigate lua5_sockets bug
|
|
||||||
|
@ -16541,10 +16541,9 @@ with pkgs;
|
|||||||
};
|
};
|
||||||
|
|
||||||
mpv = callPackage ../applications/video/mpv rec {
|
mpv = callPackage ../applications/video/mpv rec {
|
||||||
lua = lua5_1;
|
inherit (luaPackages) luasocket;
|
||||||
lua5_sockets = lua5_1_sockets;
|
youtube-dl = pythonPackages.youtube-dl;
|
||||||
youtube-dl = pythonPackages.youtube-dl;
|
libva = libva-full;
|
||||||
libva = libva-full;
|
|
||||||
waylandSupport = stdenv.isLinux;
|
waylandSupport = stdenv.isLinux;
|
||||||
alsaSupport = !stdenv.isDarwin;
|
alsaSupport = !stdenv.isDarwin;
|
||||||
pulseSupport = !stdenv.isDarwin;
|
pulseSupport = !stdenv.isDarwin;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user