Patchwork gnu: Add sonata

login
register
mail settings
Submitter Christopher Baines
Date Sept. 11, 2016, 10 a.m.
Message ID <20160911100037.18066-2-mail@cbaines.net>
Download mbox | patch
Permalink /patch/15500/
State New
Headers show

Comments

Christopher Baines - Sept. 11, 2016, 10 a.m.
* gnu/packages/mpd.scm (sonata): New variable.
---
 gnu/packages/mpd.scm | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)
Leo Famulari - Sept. 11, 2016, 3:08 p.m.
On Sun, Sep 11, 2016 at 11:00:37AM +0100, Christopher Baines wrote:
> * gnu/packages/mpd.scm (sonata): New variable.

Thanks! Pushed as 6c86cef5d36d613be0a62f8f18e276232abf51f0.

This will make it easier for my houseguests to control the stereo :)
Alex Kost - Sept. 11, 2016, 5:01 p.m.
Christopher Baines (2016-09-11 11:00 +0100) wrote:

> * gnu/packages/mpd.scm (sonata): New variable.
> ---
>  gnu/packages/mpd.scm | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 53 insertions(+)
>
> diff --git a/gnu/packages/mpd.scm b/gnu/packages/mpd.scm
> index 279ec68..8b1b071 100644
> --- a/gnu/packages/mpd.scm
> +++ b/gnu/packages/mpd.scm
> @@ -27,10 +27,14 @@
>    #:use-module (guix packages)
>    #:use-module (guix download)
>    #:use-module (guix utils)
> +  #:use-module ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)

This line is not needed.  You use it in the #:modules argument in the
package definition, but it should not be put in the top level
'define-module' form.

>    #:use-module (guix build-system gnu)
>    #:use-module (guix build-system python)
>    #:use-module (gnu packages avahi)
>    #:use-module (gnu packages boost)
> +  #:use-module (gnu packages gettext)
> +  #:use-module (gnu packages gnome)
> +  #:use-module (gnu packages gtk)
>    #:use-module (gnu packages icu4c)
>    #:use-module (gnu packages readline)
>    #:use-module (gnu packages compression)
> @@ -263,3 +267,52 @@ interface for the Music Player Daemon.")
>      (package (inherit mpd2)
>        (native-inputs `(("python2-setuptools" ,python2-setuptools)
>                         ,@(package-native-inputs mpd2))))))
> +
> +(define-public sonata
> +  (package
> +    (name "sonata")
> +    (version "1.7b1")
> +    (source (origin
> +              (method url-fetch)
> +              (uri
> +               (string-append "https://github.com/multani/sonata/archive/v"
> +                              version ".tar.gz"))
> +              (file-name (string-append name "-" version ".tar.gz"))
> +              (sha256
> +               (base32
> +                "07gq2nxqwxs0qyxjbay7k5j25zd386bn7wdr2dl1gk53diwnn7s0"))))
> +    (build-system python-build-system)
> +    (arguments
> +     `(#:modules ((guix build gnu-build-system)
> +                  (guix build python-build-system)
> +                  ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
> +                  (guix build utils))
> +       #:imported-modules (,@%gnu-build-system-modules
> +                           (guix build python-build-system)
> +                           (guix build glib-or-gtk-build-system))
> +       #:phases
> +       (modify-phases %standard-phases
> +         (add-after 'install 'glib-or-gtk-wrap
> +           (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))
> +         (add-after 'install 'wrap-sonata
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (let ((out               (assoc-ref outputs "out"))
> +                   (gi-typelib-path   (getenv "GI_TYPELIB_PATH")))
> +               (wrap-program (string-append out "/bin/sonata")
> +                 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
> +             #t)))))
> +    (native-inputs
> +     `(("gettext" ,gnu-gettext)))
> +    (inputs
> +     `(("python-mpd2" ,python-mpd2)
> +       ("gtk+" ,gtk+)
> +       ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
> +       ("gobject-introspection" ,gobject-introspection)
> +       ("adwaita-icon-theme" ,adwaita-icon-theme)
> +       ("python-pygobject" ,python-pygobject)))
> +    (synopsis "Elegant client for the Music Player Daemon")
> +    (description "Sonata is an elegant graphical client for the Music Player
> +Daemon (MPD).  It supports playlists, multiple profiles (connecting to different
> +MPD servers, search and multimedia key support.")
> +    (home-page "http://www.nongnu.org/sonata/")
> +    (license license:gpl3+)))
Leo Famulari - Sept. 11, 2016, 6:11 p.m.
On Sun, Sep 11, 2016 at 08:01:19PM +0300, Alex Kost wrote:
> Christopher Baines (2016-09-11 11:00 +0100) wrote:
> > +  #:use-module ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
> 
> This line is not needed.  You use it in the #:modules argument in the
> package definition, but it should not be put in the top level
> 'define-module' form.

Thanks Alex, I fixed it in a followup commit.
Christopher Baines - Sept. 11, 2016, 6:34 p.m.
On 11/09/16 18:01, Alex Kost wrote:
> Christopher Baines (2016-09-11 11:00 +0100) wrote:
>
>> * gnu/packages/mpd.scm (sonata): New variable.
>> ---
>>  gnu/packages/mpd.scm | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++
>>  1 file changed, 53 insertions(+)
>>
>> diff --git a/gnu/packages/mpd.scm b/gnu/packages/mpd.scm
>> index 279ec68..8b1b071 100644
>> --- a/gnu/packages/mpd.scm
>> +++ b/gnu/packages/mpd.scm
>> @@ -27,10 +27,14 @@
>>    #:use-module (guix packages)
>>    #:use-module (guix download)
>>    #:use-module (guix utils)
>> +  #:use-module ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
>
> This line is not needed.  You use it in the #:modules argument in the
> package definition, but it should not be put in the top level
> 'define-module' form.

Ah, yep, that makes sense. Thanks Alex, and thanks for fixing Leo.
David Thompson - Sept. 12, 2016, 4:04 p.m.
On Sun, Sep 11, 2016 at 11:08 AM, Leo Famulari <leo@famulari.name> wrote:
> On Sun, Sep 11, 2016 at 11:00:37AM +0100, Christopher Baines wrote:
>> * gnu/packages/mpd.scm (sonata): New variable.
>
> Thanks! Pushed as 6c86cef5d36d613be0a62f8f18e276232abf51f0.
>
> This will make it easier for my houseguests to control the stereo :)

This is awesome.  Thanks, everyone!  Sonata used to be my music player
of choice many years ago until it became unmaintained, but it looks
like there is a new maintainer!  I'll have to give it a go.

And using Sonata for visitors to control the stereo sounds like a
fantastic idea.

- Dave

Patch

diff --git a/gnu/packages/mpd.scm b/gnu/packages/mpd.scm
index 279ec68..8b1b071 100644
--- a/gnu/packages/mpd.scm
+++ b/gnu/packages/mpd.scm
@@ -27,10 +27,14 @@ 
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix utils)
+  #:use-module ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system python)
   #:use-module (gnu packages avahi)
   #:use-module (gnu packages boost)
+  #:use-module (gnu packages gettext)
+  #:use-module (gnu packages gnome)
+  #:use-module (gnu packages gtk)
   #:use-module (gnu packages icu4c)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages compression)
@@ -263,3 +267,52 @@  interface for the Music Player Daemon.")
     (package (inherit mpd2)
       (native-inputs `(("python2-setuptools" ,python2-setuptools)
                        ,@(package-native-inputs mpd2))))))
+
+(define-public sonata
+  (package
+    (name "sonata")
+    (version "1.7b1")
+    (source (origin
+              (method url-fetch)
+              (uri
+               (string-append "https://github.com/multani/sonata/archive/v"
+                              version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "07gq2nxqwxs0qyxjbay7k5j25zd386bn7wdr2dl1gk53diwnn7s0"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:modules ((guix build gnu-build-system)
+                  (guix build python-build-system)
+                  ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
+                  (guix build utils))
+       #:imported-modules (,@%gnu-build-system-modules
+                           (guix build python-build-system)
+                           (guix build glib-or-gtk-build-system))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'glib-or-gtk-wrap
+           (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))
+         (add-after 'install 'wrap-sonata
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out               (assoc-ref outputs "out"))
+                   (gi-typelib-path   (getenv "GI_TYPELIB_PATH")))
+               (wrap-program (string-append out "/bin/sonata")
+                 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
+             #t)))))
+    (native-inputs
+     `(("gettext" ,gnu-gettext)))
+    (inputs
+     `(("python-mpd2" ,python-mpd2)
+       ("gtk+" ,gtk+)
+       ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
+       ("gobject-introspection" ,gobject-introspection)
+       ("adwaita-icon-theme" ,adwaita-icon-theme)
+       ("python-pygobject" ,python-pygobject)))
+    (synopsis "Elegant client for the Music Player Daemon")
+    (description "Sonata is an elegant graphical client for the Music Player
+Daemon (MPD).  It supports playlists, multiple profiles (connecting to different
+MPD servers, search and multimedia key support.")
+    (home-page "http://www.nongnu.org/sonata/")
+    (license license:gpl3+)))