@@ -1,28 +1,87 @@
1−{ lib, stdenv, fetchurl, autoreconfHook, fetchpatch
2−, libarchive, perl, xorg, libdvdnav, libbluray
3−, zlib, a52dec, libmad, faad2, ffmpeg, alsa-lib
4−, pkg-config, dbus, fribidi, freefont_ttf, libebml, libmatroska
5−, libvorbis, libtheora, speex, lua5, libgcrypt, libgpg-error, libupnp
6−, libcaca, libpulseaudio, flac, schroedinger, libxml2, librsvg
7−, mpeg2dec, systemd, gnutls, avahi, libcddb, libjack2, SDL, SDL_image
8−, libmtp, unzip, taglib, libkate, libtiger, libv4l, samba, libssh2, liboggz
9−, libass, libva, libdvbpsi, libdc1394, libraw1394, libopus
10−, libvdpau, libsamplerate, libspatialaudio, live555, fluidsynth
11−, wayland, wayland-protocols, ncurses, srt
12−, onlyLibVLC ? false
13−, withQt5 ? true, qtbase, qtsvg, qtx11extras, wrapQtAppsHook
1+{ lib
2+, stdenv
3+, fetchurl
4+, fetchpatch
5+, SDL
6+, SDL_image
7+, a52dec
8+, alsa-lib
9+, autoreconfHook
10+, avahi
11+, dbus
12+, faad2
13+, ffmpeg
14+, flac
15+, fluidsynth
16+, freefont_ttf
17+, fribidi
18+, gnutls
19+, libarchive
20+, libass
21+, libbluray
22+, libcaca
23+, libcddb
24+, libdc1394
25+, libdvbpsi
26+, libdvdnav
27+, libebml
28+, libgcrypt
29+, libgpg-error
30+, libjack2
31+, libkate
32+, libmad
33+, libmatroska
34+, libmtp
35+, liboggz
36+, libopus
37+, libpulseaudio
38+, libraw1394
39+, librsvg
40+, libsamplerate
41+, libspatialaudio
42+, libssh2
43+, libtheora
44+, libtiger
45+, libupnp
46+, libv4l
47+, libva
48+, libvdpau
49+, libvorbis
50+, libxml2
51+, live555
52+, lua5
53+, mpeg2dec
54+, ncurses
55+, perl
56+, pkg-config
57+, removeReferencesTo
58+, samba
59+, schroedinger
60+, speex
61+, srt
62+, systemd
63+, taglib
64+, unzip
65+, wayland
66+, wayland-protocols
67+, xorg
68+, zlib
69+
70+, chromecastSupport ? true, libmicrodns, protobuf
1471, jackSupport ? false
72+, onlyLibVLC ? false
1573, skins2Support ? !onlyLibVLC, freetype
16−, removeReferencesTo
17−, chromecastSupport ? true, protobuf, libmicrodns
74+, withQt5 ? true, qtbase, qtsvg, qtx11extras, wrapQtAppsHook
1875}:
1976
2077# chromecastSupport requires TCP port 8010 to be open for it to work.
2178# If your firewall is enabled, make sure to have something like:
2279# networking.firewall.allowedTCPPorts = [ 8010 ];
2380
24−with lib;
25−
81+let
82+ inherit (lib) optionalString optional optionals;
83+ hostIsAarch = stdenv.hostPlatform.isAarch32 || stdenv.hostPlatform.isAarch64;
84+in
2685stdenv.mkDerivation rec {
2786 pname = "${optionalString onlyLibVLC "lib"}vlc";
2887 version = "3.0.16";
@@ -36,32 +95,95 @@ stdenv.mkDerivation rec {
3695 # which are not included here for no other reason that nobody has mentioned
3796 # needing them
3897 buildInputs = [
39− zlib a52dec libmad faad2 ffmpeg alsa-lib libdvdnav libdvdnav.libdvdread
40− libbluray dbus fribidi libvorbis libtheora speex lua5 libgcrypt libgpg-error
41− libupnp libcaca libpulseaudio flac schroedinger libxml2 librsvg mpeg2dec
42− systemd gnutls avahi libcddb SDL SDL_image libmtp taglib libarchive
43− libkate libtiger libv4l samba libssh2 liboggz libass libdvbpsi libva
44− xorg.xlibsWrapper xorg.libXv xorg.libXvMC xorg.libXpm xorg.xcbutilkeysyms
45− libdc1394 libraw1394 libopus libebml libmatroska libvdpau libsamplerate
46− libspatialaudio fluidsynth wayland wayland-protocols ncurses srt
47− ] ++ optional (!stdenv.hostPlatform.isAarch64 && !stdenv.hostPlatform.isAarch32) live555
48− ++ optionals withQt5 [ qtbase qtsvg qtx11extras ]
49− ++ optionals skins2Support (with xorg; [ libXpm freetype libXext libXinerama ])
50− ++ optional jackSupport libjack2
51− ++ optionals chromecastSupport [ protobuf libmicrodns ];
52−
53− nativeBuildInputs = [ autoreconfHook perl pkg-config removeReferencesTo unzip ]
54− ++ optionals withQt5 [ wrapQtAppsHook ];
98+ SDL
99+ SDL_image
100+ a52dec
101+ alsa-lib
102+ avahi
103+ dbus
104+ faad2
105+ ffmpeg
106+ flac
107+ fluidsynth
108+ fribidi
109+ gnutls
110+ libarchive
111+ libass
112+ libbluray
113+ libcaca
114+ libcddb
115+ libdc1394
116+ libdvbpsi
117+ libdvdnav
118+ libdvdnav.libdvdread
119+ libebml
120+ libgcrypt
121+ libgpg-error
122+ libkate
123+ libmad
124+ libmatroska
125+ libmtp
126+ liboggz
127+ libopus
128+ libpulseaudio
129+ libraw1394
130+ librsvg
131+ libsamplerate
132+ libspatialaudio
133+ libssh2
134+ libtheora
135+ libtiger
136+ libupnp
137+ libv4l
138+ libva
139+ libvdpau
140+ libvorbis
141+ libxml2
142+ lua5
143+ mpeg2dec
144+ ncurses
145+ samba
146+ schroedinger
147+ speex
148+ srt
149+ systemd
150+ taglib
151+ wayland
152+ wayland-protocols
153+ zlib
154+ ]
155+ ++ (with xorg; [
156+ libXpm
157+ libXv
158+ libXvMC
159+ xcbutilkeysyms
160+ xlibsWrapper
161+ ])
162+ ++ optional (!hostIsAarch) live555
163+ ++ optional jackSupport libjack2
164+ ++ optionals chromecastSupport [ libmicrodns protobuf ]
165+ ++ optionals skins2Support (with xorg; [ freetype libXext libXinerama libXpm ])
166+ ++ optionals withQt5 [ qtbase qtsvg qtx11extras ];
167+
168+ nativeBuildInputs = [
169+ autoreconfHook
170+ perl
171+ pkg-config
172+ removeReferencesTo
173+ unzip
174+ ]
175+ ++ optionals withQt5 [ wrapQtAppsHook ];
55176
56177 enableParallelBuilding = true;
57178
58− LIVE555_PREFIX = if (!stdenv.hostPlatform.isAarch64 && !stdenv.hostPlatform.isAarch32) then live555 else null;
179+ LIVE555_PREFIX = if hostIsAarch then null else live555;
59180
60181 # vlc depends on a c11-gcc wrapper script which we don't have so we need to
61182 # set the path to the compiler
62183 BUILDCC = "${stdenv.cc}/bin/gcc";
63184
64185 patches = [
186+ # Required in order to run newer srt plugin. Remove it when next release arrives
65187 (fetchpatch {
66188 url = "https://raw.githubusercontent.com/archlinux/svntogit-packages/4250fe8f28c220d883db454cec2b2c76a07473eb/trunk/vlc-3.0.11.1-srt_1.4.2.patch";
67189 sha256 = "53poWjZfwq/6l316sqiCp0AtcGweyXBntcLDFPSokHQ=";
@@ -86,8 +208,8 @@ stdenv.mkDerivation rec {
86208 # Most of the libraries are auto-detected so we don't need to set a bunch of
87209 # "--enable-foo" flags here
88210 configureFlags = [
89− "--with-kde-solid=$out/share/apps/solid/actions"
90211 "--enable-srt" # Explicit enable srt to ensure the patch is applied.
212+ "--with-kde-solid=$out/share/apps/solid/actions"
91213 ] ++ optional onlyLibVLC "--disable-vlc"
92214 ++ optional skins2Support "--enable-skins2"
93215 ++ optionals chromecastSupport [
@@ -111,6 +233,7 @@ stdenv.mkDerivation rec {
111233 description = "Cross-platform media player and streaming server";
112234 homepage = "http://www.videolan.org/vlc/";
113235 license = licenses.lgpl21Plus;
236+ maintainers = with maintainers; [ AndersonTorres ];
114237 platforms = platforms.linux;
115238 };
116239}