Subject: [bug#28561] Add gnome-clocks

From: Mohammed Sadiq <[email-masked]>
Date: Sat, 23 Sep 2017 09:47:22 +0530 (IST)

Sorry, a few more fixes reported by 'guix lint'.

Btw, this is my first contribution. Hope to get reviewed soon.

From 5d0f93a67a221e9a331405fad9322f4fb0ab6991 Mon Sep 17 00:00:00 2001
From: Mohammed Sadiq <[email-masked]>
Date: Fri, 22 Sep 2017 21:28:53 +0530
Subject: [PATCH 1/3] gnu: libgweather: Enable vala support.

* gnu/packages/gnome.scm (libgweather)[native-inputs]: Add vala.
(libgweather)[arguments]: Install vala bindings into out.
---
 gnu/packages/gnome.scm | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index bee1f3bc9..ebfc844aa 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -26,6 +26,7 @@
 ;;; Copyright © 2017 Hartmut Goebel <[email-masked]>
 ;;; Copyright © 2017 nee <[email-masked]>
 ;;; Copyright © 2017 Chris Marusich <[email-masked]>
+;;; Copyright © 2017 Mohammed Sadiq <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2963,11 +2964,20 @@ service via the system message bus.")
              (substitute* "data/Locations.xml"
                (("Asia/Rangoon")
                 "Asia/Yangon"))
-            #t)))))
+             #t))
+         (replace 'install
+           (lambda _
+             (zero?
+              (system* "make"
+                       ;; Install vala bindings into $out.
+                       (string-append "vapidir=" %output
+                                      "/share/vala/vapi")
+                       "install")))))))
     (native-inputs
      `(("glib:bin" ,glib "bin") ; for glib-mkenums
        ("gobject-introspection" ,gobject-introspection)
        ("pkg-config" ,pkg-config)
+       ("vala" ,vala)
        ("intltool" ,intltool)))
     (propagated-inputs
      ;; gweather-3.0.pc refers to GTK+, GDK-Pixbuf, GLib/GObject, libxml, and
-- 
2.14.1

From 684afe8b15baf153178e1a2d66c10f12b221ebee Mon Sep 17 00:00:00 2001
From: Mohammed Sadiq <[email-masked]>
Date: Fri, 22 Sep 2017 21:29:34 +0530
Subject: [PATCH 2/3] gnu: Add gsound.

* gnu/packages/gnome.scm (gsound): New public variable.
---
 gnu/packages/gnome.scm | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index ebfc844aa..c0b5a8a41 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -5967,6 +5967,34 @@ specified duration and save it as a GIF encoded animated image file.")
       (home-page "https://git.gnome.org/browse/byzanz")
       (license license:gpl2+))))
 
+(define-public gsound
+  (package
+    (name "gsound")
+    (version "1.0.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://gnome/sources/" name "/"
+                                  (version-major+minor version) "/"
+                                  name "-" version ".tar.xz"))
+              (sha256
+               (base32
+                "0lwfwx2c99qrp08pfaj59pks5dphsnxjgrxyadz065d8xqqgza5v"))))
+    (build-system glib-or-gtk-build-system)
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("gobject-introspection" ,gobject-introspection)
+       ("vala" ,vala)))
+    (inputs
+     `(("glib" ,glib)
+       ("libcanberra" ,libcanberra)))
+    (home-page "https://wiki.gnome.org/Projects/GSound")
+    (synopsis "GObject wrapper for libcanberra")
+    (description
+     "GSound is a small library for playing system sounds.  It's designed to be
+used via GObject Introspection, and is a thin wrapper around the libcanberra C
+library.")
+    (license license:lgpl2.1+)))
+
 (define-public libzapojit
   (package
     (name "libzapojit")
-- 
2.14.1

From d0620afbb72d340ead5546509d5cc3699c2edac6 Mon Sep 17 00:00:00 2001
From: Mohammed Sadiq <[email-masked]>
Date: Fri, 22 Sep 2017 21:38:44 +0530
Subject: [PATCH 3/3] gnu: Add gnome-clocks.

* gnu/packages/gnome.scm (gnome-clocks): New public variable.
---
 gnu/packages/gnome.scm | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index c0b5a8a41..838077124 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -52,6 +52,7 @@
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system glib-or-gtk)
+  #:use-module (guix build-system meson)
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages)
   #:use-module (gnu packages admin)
@@ -6023,6 +6024,44 @@ library.")
 Microsoft SkyDrive and Hotmail, using their REST protocols.")
     (license license:lgpl2.1+)))
 
+(define-public gnome-clocks
+  (package
+    (name "gnome-clocks")
+    (version "3.26.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://gnome/sources/" name "/"
+                                  (version-major+minor version) "/"
+                                  name "-" version ".tar.xz"))
+              (sha256
+               (base32
+                "00a5bqi1hbyb9kbl4p393l1g6rddl2y6ljxjby9c5j3k1qka0c0g"))))
+    (build-system meson-build-system)
+    (arguments
+     '(#:glib-or-gtk? #t))
+    (native-inputs
+     `(("vala" ,vala)
+       ("pkg-config" ,pkg-config)
+       ("glib" ,glib "bin")             ; for glib-compile-resources
+       ("gtk+-bin" ,gtk+ "bin")         ; for gtk-update-icon-cache
+       ("desktop-file-utils" ,desktop-file-utils)
+       ("gettext" ,gettext-minimal)
+       ("itstool" ,itstool)))
+    (inputs
+     `(("glib" ,glib)
+       ("gtk+" ,gtk+)
+       ("gsound" ,gsound)
+       ("geoclue" ,geoclue)
+       ("geocode-glib" ,geocode-glib)
+       ("libgweather" ,libgweather)
+       ("gnome-desktop" ,gnome-desktop)))
+    (home-page "https://wiki.gnome.org/Apps/Clocks")
+    (synopsis "GNOME's clock application")
+    (description
+     "GNOME Clocks is a simple clocks application designed to fit the GNOME
+desktop.  It supports world clock, stop watch, alarms, and count down timer.")
+    (license license:gpl3+)))
+
 (define-public gnome-calendar
   (package
     (name "gnome-calendar")
-- 
2.14.1