From 391fb7a60a71f9dc24970dbf78f50cf2c4ccd686 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Mon, 27 Sep 2021 11:48:38 +0000 Subject: gnu: gnome-weather: Fix GNOME integration. Fixes: . * gnu/packages/gnome.scm (gnome-weather)[inputs]: Remove gdk-pixbuf. [arguments]: Use a gexp to defined the phases. Add a 'fix-service-file phase and adapt 'fix-desktop-file and 'wrap phases. Remove trailing #t. --- gnu/packages/gnome.scm | 45 ++++++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 21 deletions(-) (limited to 'gnu') diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 27fcb1ca1d..168949a58a 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -9213,10 +9213,8 @@ associations for GNOME.") ("gtk+:bin" ,gtk+ "bin") ("pkg-config" ,pkg-config))) (inputs - `( ;("adwaita-icon-theme" ,adwaita-icon-theme) - ("appstream-glib" ,appstream-glib) + `(("appstream-glib" ,appstream-glib) ("geoclue" ,geoclue) - ("gdk-pixbuf" ,gdk-pixbuf) ("gjs" ,gjs) ("gnome-desktop" ,gnome-desktop) ("libgweather" ,libgweather) @@ -9224,24 +9222,29 @@ associations for GNOME.") (arguments `(#:glib-or-gtk? #t #:phases - (modify-phases %standard-phases - (add-after 'install 'fix-desktop-file - ;; FIXME: "gapplication launch org.gnome.Weather" fails for some reason. - ;; See https://issues.guix.gnu.org/issue/39324. - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (applications (string-append out "/share/applications"))) - (substitute* (string-append applications "/org.gnome.Weather.desktop") - (("Exec=.*") "Exec=gnome-weather\n")) - #t))) - (add-after 'install 'wrap - (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (gi-typelib-path (getenv "GI_TYPELIB_PATH"))) - ;; GNOME Weather needs the typelib files of GTK+, Pango etc at runtime. - (wrap-program (string-append out "/bin/gnome-weather") - `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))) - #t)))))) + ,#~(modify-phases %standard-phases + (add-after 'unpack 'fix-service-file + (lambda _ + (substitute* "data/org.gnome.Weather.service.in" + (("Exec=[[:graph:]]+") + (string-append "Exec=" #$output + "/bin/gnome-weather"))))) + (add-after 'install 'fix-desktop-file + ;; FIXME: "gapplication launch org.gnome.Weather" fails for some + ;; reason. See https://issues.guix.gnu.org/issue/39324. + (lambda _ + (let ((applications + (string-append #$output "/share/applications"))) + (substitute* (string-append applications + "/org.gnome.Weather.desktop") + (("Exec=.*") "Exec=gnome-weather\n"))))) + (add-after 'install 'wrap + (lambda _ + (let ((gi-typelib-path (getenv "GI_TYPELIB_PATH"))) + ;; GNOME Weather needs the typelib files of GTK+, Pango etc + ;; at runtime. + (wrap-program (string-append #$output "/bin/gnome-weather") + `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))))))) (synopsis "Weather monitoring for GNOME desktop") (description "GNOME Weather is a small application that allows you to monitor the current weather conditions for your city, or anywhere in the -- cgit v1.2.3