diff options
author | oxalica <oxalicc@pm.me> | 2021-07-29 01:44:52 +0800 |
---|---|---|
committer | oxalica <oxalicc@pm.me> | 2021-07-29 17:06:14 +0800 |
commit | bf0a098d5b947ffa4987d2c54424b96dc426e7d1 (patch) | |
tree | f727c2031d197dc7c2d69a1e9234dbf6c3a726b5 | |
parent | 8dcfe523f716282c48311989fe028a4baa9ce7e2 (diff) |
vlc: add srt support
This enables the protocol `srt://` for vlc and downstream packages.
-rw-r--r-- | pkgs/applications/video/vlc/default.nix | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/pkgs/applications/video/vlc/default.nix b/pkgs/applications/video/vlc/default.nix index 7aee50d5064cf..46669dff53062 100644 --- a/pkgs/applications/video/vlc/default.nix +++ b/pkgs/applications/video/vlc/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, autoreconfHook +{ lib, stdenv, fetchurl, autoreconfHook, fetchpatch , libarchive, perl, xorg, libdvdnav, libbluray , zlib, a52dec, libmad, faad2, ffmpeg, alsa-lib , pkg-config, dbus, fribidi, freefont_ttf, libebml, libmatroska @@ -8,7 +8,7 @@ , libmtp, unzip, taglib, libkate, libtiger, libv4l, samba, libssh2, liboggz , libass, libva, libdvbpsi, libdc1394, libraw1394, libopus , libvdpau, libsamplerate, live555, fluidsynth, wayland, wayland-protocols -, ncurses +, ncurses, srt , onlyLibVLC ? false , withQt5 ? true, qtbase, qtsvg, qtx11extras, wrapQtAppsHook , jackSupport ? false @@ -43,7 +43,7 @@ stdenv.mkDerivation rec { libkate libtiger libv4l samba libssh2 liboggz libass libdvbpsi libva xorg.xlibsWrapper xorg.libXv xorg.libXvMC xorg.libXpm xorg.xcbutilkeysyms libdc1394 libraw1394 libopus libebml libmatroska libvdpau libsamplerate - fluidsynth wayland wayland-protocols ncurses + fluidsynth wayland wayland-protocols ncurses srt ] ++ optional (!stdenv.hostPlatform.isAarch64) live555 ++ optionals withQt5 [ qtbase qtsvg qtx11extras ] ++ optionals skins2Support (with xorg; [ libXpm freetype libXext libXinerama ]) @@ -61,6 +61,13 @@ stdenv.mkDerivation rec { # set the path to the compiler BUILDCC = "${stdenv.cc}/bin/gcc"; + patches = [ + (fetchpatch { + url = "https://raw.githubusercontent.com/archlinux/svntogit-packages/4250fe8f28c220d883db454cec2b2c76a07473eb/trunk/vlc-3.0.11.1-srt_1.4.2.patch"; + sha256 = "53poWjZfwq/6l316sqiCp0AtcGweyXBntcLDFPSokHQ="; + }) + ]; + postPatch = '' substituteInPlace modules/text_renderer/freetype/platform_fonts.h --replace \ /usr/share/fonts/truetype/freefont ${freefont_ttf}/share/fonts/truetype @@ -80,6 +87,7 @@ stdenv.mkDerivation rec { # "--enable-foo" flags here configureFlags = [ "--with-kde-solid=$out/share/apps/solid/actions" + "--enable-srt" # Explicit enable srt to ensure the patch is applied. ] ++ optional onlyLibVLC "--disable-vlc" ++ optional skins2Support "--enable-skins2" ++ optionals chromecastSupport [ |