vlc: fix dependencies (#392101)

This commit is contained in:
K900 2025-05-13 22:47:54 +03:00 committed by GitHub
commit 01cb468424
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4,6 +4,7 @@
alsa-lib, alsa-lib,
autoreconfHook, autoreconfHook,
avahi, avahi,
cairo,
curl, curl,
dbus, dbus,
faad2, faad2,
@ -13,17 +14,18 @@
ffmpeg_6, ffmpeg_6,
flac, flac,
fluidsynth, fluidsynth,
fontconfig,
freefont_ttf, freefont_ttf,
freetype, freetype,
fribidi, fribidi,
genericUpdater, genericUpdater,
gnutls, gnutls,
harfbuzz,
libGL,
libSM, libSM,
libXext, libXext,
libXinerama, libXinerama,
libXpm, libXpm,
libXv,
libXvMC,
libarchive, libarchive,
libass, libass,
libbluray, libbluray,
@ -36,17 +38,19 @@
libgcrypt, libgcrypt,
libgpg-error, libgpg-error,
libjack2, libjack2,
libjpeg,
libkate, libkate,
libmad, libmad,
libmatroska, libmatroska,
libmicrodns, libmicrodns,
libmodplug, libmodplug,
libmpeg2,
libmtp, libmtp,
liboggz, libogg,
libopus, libopus,
libplacebo_5, libplacebo_5,
libpng,
libpulseaudio, libpulseaudio,
libraw1394,
librsvg, librsvg,
libsForQt5, libsForQt5,
libsamplerate, libsamplerate,
@ -57,12 +61,10 @@
libupnp, libupnp,
libv4l, libv4l,
libva, libva,
libvdpau,
libvorbis, libvorbis,
libxml2, libxml2,
live555, live555,
lua5, lua5,
mpeg2dec,
ncurses, ncurses,
perl, perl,
pkg-config, pkg-config,
@ -74,7 +76,7 @@
speex, speex,
srt, srt,
stdenv, stdenv,
systemd, systemdLibs,
taglib_1, taglib_1,
unzip, unzip,
wayland, wayland,
@ -109,6 +111,8 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-JNu+HX367qCZTV3vC73iABdzRxNtv+Vz9bakzuJa+7A="; hash = "sha256-JNu+HX367qCZTV3vC73iABdzRxNtv+Vz9bakzuJa+7A=";
}; };
depsBuildBuild = optionals waylandSupport [ pkg-config ];
nativeBuildInputs = nativeBuildInputs =
[ [
autoreconfHook autoreconfHook
@ -133,17 +137,19 @@ stdenv.mkDerivation (finalAttrs: {
a52dec a52dec
alsa-lib alsa-lib
avahi avahi
cairo
dbus dbus
faad2 faad2
ffmpeg_6 ffmpeg_6
flac flac
fluidsynth fluidsynth
fontconfig
freetype
fribidi fribidi
gnutls gnutls
harfbuzz
libGL
libSM libSM
libXpm
libXv
libXvMC
libarchive libarchive
libass libass
libbluray libbluray
@ -156,16 +162,18 @@ stdenv.mkDerivation (finalAttrs: {
libebml libebml
libgcrypt libgcrypt
libgpg-error libgpg-error
libjpeg
libkate libkate
libmad libmad
libmatroska libmatroska
libmodplug libmodplug
libmpeg2
libmtp libmtp
liboggz libogg
libopus libopus
libplacebo_5 libplacebo_5
libpng
libpulseaudio libpulseaudio
libraw1394
librsvg librsvg
libsamplerate libsamplerate
libspatialaudio libspatialaudio
@ -175,30 +183,26 @@ stdenv.mkDerivation (finalAttrs: {
libupnp libupnp
libv4l libv4l
libva libva
libvdpau
libvorbis libvorbis
libxml2 libxml2
lua5 lua5
mpeg2dec
ncurses ncurses
samba samba
schroedinger schroedinger
speex speex
srt srt
systemd systemdLibs
taglib_1 taglib_1
xcbutilkeysyms xcbutilkeysyms
wayland-scanner # only required for configure script
zlib zlib
] ]
++ optionals (!stdenv.hostPlatform.isAarch && !onlyLibVLC) [ live555 ] ++ optionals (!onlyLibVLC) [ live555 ]
++ optionals jackSupport [ libjack2 ] ++ optionals jackSupport [ libjack2 ]
++ optionals chromecastSupport [ ++ optionals chromecastSupport [
libmicrodns libmicrodns
protobuf protobuf
] ]
++ optionals skins2Support [ ++ optionals skins2Support [
freetype
libXext libXext
libXinerama libXinerama
libXpm libXpm
@ -220,16 +224,12 @@ stdenv.mkDerivation (finalAttrs: {
env = env =
{ {
# vlc depends on a c11-gcc wrapper script which we don't have so we need to # vlc searches for c11-gcc, c11, c99-gcc, c99, which don't exist and would be wrong for cross compilation anyway.
# set the path to the compiler
BUILDCC = "${pkgsBuildBuild.stdenv.cc}/bin/gcc"; BUILDCC = "${pkgsBuildBuild.stdenv.cc}/bin/gcc";
PKG_CONFIG_WAYLAND_SCANNER_WAYLAND_SCANNER = "wayland-scanner"; LIVE555_PREFIX = live555;
} }
// lib.optionalAttrs stdenv.cc.isGNU { // lib.optionalAttrs stdenv.cc.isGNU {
NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types"; NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";
}
// lib.optionalAttrs (!stdenv.hostPlatform.isAarch) {
LIVE555_PREFIX = live555;
}; };
patches = [ patches = [
@ -272,10 +272,7 @@ stdenv.mkDerivation (finalAttrs: {
# Most of the libraries are auto-detected so we don't need to set a bunch of # Most of the libraries are auto-detected so we don't need to set a bunch of
# "--enable-foo" flags here # "--enable-foo" flags here
configureFlags = configureFlags =
[ [ "--with-kde-solid=$out/share/apps/solid/actions" ]
"--enable-srt" # Explicit enable srt to ensure the patch is applied.
"--with-kde-solid=$out/share/apps/solid/actions"
]
++ optionals onlyLibVLC [ "--disable-vlc" ] ++ optionals onlyLibVLC [ "--disable-vlc" ]
++ optionals skins2Support [ "--enable-skins2" ] ++ optionals skins2Support [ "--enable-skins2" ]
++ optionals waylandSupport [ "--enable-wayland" ] ++ optionals waylandSupport [ "--enable-wayland" ]
@ -290,11 +287,6 @@ stdenv.mkDerivation (finalAttrs: {
sed -i 's|^#define CONFIGURE_LINE.*$|#define CONFIGURE_LINE "<removed>"|g' config.h sed -i 's|^#define CONFIGURE_LINE.*$|#define CONFIGURE_LINE "<removed>"|g' config.h
''; '';
# fails on high core machines
# ld: cannot find -lvlc_vdpau: No such file or directory
# https://code.videolan.org/videolan/vlc/-/issues/27338
enableParallelInstalling = false;
# Add missing SOFA files # Add missing SOFA files
# Given in EXTRA_DIST, but not in install-data target # Given in EXTRA_DIST, but not in install-data target
postInstall = '' postInstall = ''
@ -314,6 +306,7 @@ stdenv.mkDerivation (finalAttrs: {
# should be the same as pkgsBuildBuild.qt5.qttranslations. # should be the same as pkgsBuildBuild.qt5.qttranslations.
postFixup = postFixup =
'' ''
patchelf --add-rpath ${libv4l}/lib "$out/lib/vlc/plugins/access/libv4l2_plugin.so"
find $out/lib/vlc/plugins -exec touch -d @1 '{}' ';' find $out/lib/vlc/plugins -exec touch -d @1 '{}' ';'
${ ${
if stdenv.buildPlatform.canExecute stdenv.hostPlatform then "$out" else pkgsBuildBuild.libvlc if stdenv.buildPlatform.canExecute stdenv.hostPlatform then "$out" else pkgsBuildBuild.libvlc