diff mbox series

[bug#38686] gnu: Add mpv-mpris.

Message ID 20191220090404.12287-1-efraim@flashner.co.il
State Accepted
Headers show
Series [bug#38686] gnu: Add mpv-mpris. | expand

Commit Message

Efraim Flashner Dec. 20, 2019, 9:04 a.m. UTC
* gnu/packages/video.scm (mpv-mpris): New variable.
---
 gnu/packages/video.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

Comments

Ludovic Courtès Dec. 23, 2019, 6:31 p.m. UTC | #1
Hello!

Efraim Flashner <efraim@flashner.co.il> skribis:

> * gnu/packages/video.scm (mpv-mpris): New variable.

[...]

> +    (home-page "https://github.com/hoyon/mpv-mpris")
> +    (synopsis "MPRIS plugin for mpv")
> +    (description "MPRIS plugin for mpv written in C.  Implements
> +@code{org.mpris.MediaPlayer2} and @code{org.mpris.MediaPlayer2.Player} D-Bus
> +interfaces.

Please write full sentences and provide some context, like:

  This package provides a plugin for the mpv media player, adding
  support for the Mblah… System (MPRIS).  It implements the …

> +To load this plugin, specify the following option when starting mpv:
> +@code{--script $GUIX_PROFILE/lib/mpris.so} or link it into
> +$HOME/.config/mpv/scripts")
  ^
@file

Otherwise LGTM!  :-)

Ludo’, who doesn’t know what MPRIS is.
Efraim Flashner Dec. 23, 2019, 8:33 p.m. UTC | #2
On Mon, Dec 23, 2019 at 07:31:02PM +0100, Ludovic Courtès wrote:
> Hello!
> 
> Efraim Flashner <efraim@flashner.co.il> skribis:
> 
> > * gnu/packages/video.scm (mpv-mpris): New variable.
> 
> [...]
> 
> > +    (home-page "https://github.com/hoyon/mpv-mpris")
> > +    (synopsis "MPRIS plugin for mpv")
> > +    (description "MPRIS plugin for mpv written in C.  Implements
> > +@code{org.mpris.MediaPlayer2} and @code{org.mpris.MediaPlayer2.Player} D-Bus
> > +interfaces.
> 
> Please write full sentences and provide some context, like:
> 
>   This package provides a plugin for the mpv media player, adding
>   support for the Mblah… System (MPRIS).  It implements the …

Sounds good

> 
> > +To load this plugin, specify the following option when starting mpv:
> > +@code{--script $GUIX_PROFILE/lib/mpris.so} or link it into
> > +$HOME/.config/mpv/scripts")
>   ^
> @file

Ok

> 
> Otherwise LGTM!  :-)
> 
> Ludo’, who doesn’t know what MPRIS is.

It's the magic that lets you control media playback from your phone
after connecting with kdeconnect. I'm sure it also has other things it
can do.
diff mbox series

Patch

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index ef60767236..fb62fc62a2 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -1436,6 +1436,48 @@  projects while introducing many more.")
 (define-public gnome-mpv
   (deprecated-package "gnome-mpv" celluloid))
 
+(define-public mpv-mpris
+  (package
+    (name "mpv-mpris")
+    (version "0.2")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://github.com/hoyon/mpv-mpris")
+               (commit version)))
+        (file-name (git-file-name name version))
+        (sha256
+         (base32
+          "06hq3j1jjlaaz9ss5l7illxz8vm5bng86jl24kawglwkqayhdnjx"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:tests? #f ; no tests
+       #:make-flags '("CC=gcc")
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure) ; no configure script
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (install-file "mpris.so" (string-append out "/lib")))
+             #t)))))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("glib" ,glib)
+       ("mpv" ,mpv)))
+    (home-page "https://github.com/hoyon/mpv-mpris")
+    (synopsis "MPRIS plugin for mpv")
+    (description "MPRIS plugin for mpv written in C.  Implements
+@code{org.mpris.MediaPlayer2} and @code{org.mpris.MediaPlayer2.Player} D-Bus
+interfaces.
+
+To load this plugin, specify the following option when starting mpv:
+@code{--script $GUIX_PROFILE/lib/mpris.so} or link it into
+$HOME/.config/mpv/scripts")
+    (license license:expat)))
+
 (define-public libvpx
   (package
     (name "libvpx")