From f3fdb4e041cb5740ba0b38b9ad017571f8414d33 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Thu, 18 Jan 2024 20:30:57 -0500
Subject: [PATCH] gnu: mpv: Propagate most libraries.

This is needed when packages lookup the mpv library via pkg-config, such as
done by plasmatube.

Prior to this change, the following would fail (this is what CMake's
'pkg_check_modules' does):

  $ guix shell --pure pkg-config mpv \
    -- pkg-config --print-errors --short-errors --exists mpv
  Package 'wayland-client', required by 'mpv', not found

* gnu/packages/video.scm (mpv)
[inputs]: Move alsa-lib, ffmpeg, jack-1, libass, libbluray, libcaca,
libcdio-paranoia, libdvdnav, libjpeg-turbo, libplacebo, libva, libvdpau,
libx11, libxext, libxinerama, libxpresent, libxrandr, libxscrnsaver, lua-5.2,
mesa, pulseaudio, shaderc, wayland, wayland-protocols, zimg and zlib to...
[propagated-inputs]: ... here.

Change-Id: Ia0cd4e33a8b4df4b060546c979d00be0b2b3977e
---
 gnu/packages/video.scm | 35 +++++++++++++++++++++--------------
 1 file changed, 21 insertions(+), 14 deletions(-)

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 88b6636a7b..90b3bdb585 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -2639,31 +2639,43 @@ SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
               "-Ddvdnav=enabled"
               "-Dbuild-date=false")))
     (native-inputs
-     (list perl ; for zsh completion file
-           pkg-config python-docutils python-wrapper))
+     (list perl                         ;for zsh completion file
+           pkg-config
+           python-docutils
+           python-wrapper))
     ;; Missing features: libguess, V4L2.
     (inputs
-     (list alsa-lib
-           enca
-           ffmpeg
-           jack-1
+     (list enca
            ladspa
            lcms
+           libbs2b
+           mpg123
+           rsound
+           vulkan-headers
+           vulkan-loader
+           yt-dlp))
+    ;; XXX: These are propagated for the mpv pkg-config package, as they are
+    ;; listed in Requires.private and would break 'pkg-config --exists mpv' if
+    ;; unavailable.
+    (propagated-inputs
+     (list alsa-lib
+           ffmpeg
+           jack-1
            libass
            libbluray
            libcaca
-           libbs2b
            libcdio-paranoia
-           libdvdread
+           libdrm
            libdvdnav
+           libdvdread
            libjpeg-turbo
            libplacebo
            libva
            libvdpau
            libx11
            libxext
-           libxkbcommon
            libxinerama
+           libxkbcommon
            libxpresent
            libxrandr
            libxscrnsaver
@@ -2671,15 +2683,10 @@ SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
            ;; XXX: lua > 5.2 is not currently supported; see meson.build
            lua-5.2
            mesa
-           mpg123
            pulseaudio
-           rsound
            shaderc
-           vulkan-headers
-           vulkan-loader
            wayland
            wayland-protocols
-           yt-dlp
            zimg
            zlib))
     (home-page "https://mpv.io/")