Subject: [PATCH gnome-team v2 10/23] gnu: gnome-shell-extension-gsconnect: Update to 55.

From: Vivien Kraus <[email-masked]>
Date: Tue, 16 Jan 2024 22:59:14 +0100

* gnu/packages/gnome-xyz.scm (gnome-shell-extension-gsconnect): Update to 55.
[arguments]: Convert to list of G-Expressions.
[#:configure-flags]: Do not set settings_schemadir nor post_install anymore.
[#:phase 'skip-post-installation]: New phase.
[inputs]: Drop labels.
[native-inputs]: Drop labels.

Change-Id: I63933e43815826a8ab91a472ecda235173486dae
---
 gnu/packages/gnome-xyz.scm | 134 ++++++++++++++++++-------------------
 1 file changed, 67 insertions(+), 67 deletions(-)

diff --git a/gnu/packages/gnome-xyz.scm b/gnu/packages/gnome-xyz.scm
index 80462d6e08..b5816e62b6 100644
--- a/gnu/packages/gnome-xyz.scm
+++ b/gnu/packages/gnome-xyz.scm
@@ -761,7 +761,7 @@ (define-public gnome-shell-extension-dash-to-dock
 (define-public gnome-shell-extension-gsconnect
   (package
     (name "gnome-shell-extension-gsconnect")
-    (version "50")       ; See GNOME Shell supported versions in metadata.json
+    (version "55")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -771,77 +771,77 @@ (define-public gnome-shell-extension-gsconnect
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0vg87fdihs5kp7apgyd32ldjmwzmrxaimsc005yjyy8m3f65sjmr"))))
+                "158qbjl6m807g0fy15dvhwwwy6z8r0g7kh9gjyhm7n3y14v5p8wz"))))
     (build-system meson-build-system)
     (arguments
-     `(#:tests? #f ;; every test fails
-       #:configure-flags
-       (let* ((out (assoc-ref %outputs "out"))
-              (name+version (strip-store-file-name out))
-              (gschema-dir (string-append out
-                                          "/share/gsettings-schemas/"
-                                          name+version
-                                          "/glib-2.0/schemas"))
-              (gnome-shell (assoc-ref %build-inputs "gnome-shell"))
-              (openssh (assoc-ref %build-inputs "openssh"))
-              (openssl (assoc-ref %build-inputs "openssl")))
-         (list
-          (string-append "-Dgnome_shell_libdir=" gnome-shell "/lib")
-          (string-append "-Dgsettings_schemadir=" gschema-dir)
-          (string-append "-Dopenssl_path=" openssl "/bin/openssl")
-          (string-append "-Dsshadd_path=" openssh "/bin/ssh-add")
-          (string-append "-Dsshkeygen_path=" openssh "/bin/ssh-keygen")
-          (string-append "-Dsession_bus_services_dir=" out "/share/dbus-1/services")
-          "-Dpost_install=true"))
-       #:phases
-       (modify-phases %standard-phases
-         (add-before 'configure 'fix-paths
-           (lambda* (#:key inputs #:allow-other-keys)
-             (let* ((glib (assoc-ref inputs "glib:bin"))
-                    (gapplication (string-append glib "/bin/gapplication"))
-                    (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
-               (substitute* "data/org.gnome.Shell.Extensions.GSConnect.desktop.in"
-                 (("gapplication") gapplication))
-               (for-each
-                (lambda (file)
-                  (substitute* file
-                    (("'use strict';")
-                     (string-append "'use strict';\n\n"
-                                    "'" gi-typelib-path "'.split(':').forEach("
-                                    "path => imports.gi.GIRepository.Repository."
-                                    "prepend_search_path(path));"))))
-                '("src/extension.js" "src/prefs.js"))
-               #t)))
-         (add-after 'install 'wrap-daemons
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (service-dir
-                     (string-append out "/share/gnome-shell/extensions"
-                                    "/[email-masked]/service"))
+     (list
+      #:tests? #f ;; every test fails
+      #:configure-flags
+      #~(let ((out #$output)
+              (gnome-shell #$(this-package-input "gnome-shell"))
+              (openssh #$(this-package-input "openssh"))
+              (openssl #$(this-package-input "openssl")))
+          (list
+           (string-append "-Dgnome_shell_libdir=" gnome-shell "/lib")
+           (string-append "-Dopenssl_path=" openssl "/bin/openssl")
+           (string-append "-Dsshadd_path=" openssh "/bin/ssh-add")
+           (string-append "-Dsshkeygen_path=" openssh "/bin/ssh-keygen")
+           (string-append "-Dsession_bus_services_dir=" out "/share/dbus-1/services")))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'skip-post-installation
+            (lambda _
+              (substitute* "meson.build"
+                (("gtk_update_icon_cache: true")
+                 "gtk_update_icon_cache: false")
+                (("update_desktop_database: true")
+                 "update_desktop_database: false"))))
+          (add-before 'configure 'fix-paths
+            (lambda* (#:key inputs #:allow-other-keys)
+              (let ((gapplication (search-input-file inputs "/bin/gapplication"))
                     (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
-               (wrap-program (string-append service-dir "/daemon.js")
-                 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))
-               #t))))))
+                (substitute* "data/org.gnome.Shell.Extensions.GSConnect.desktop.in"
+                  (("gapplication") gapplication))
+                (for-each
+                 (lambda (file)
+                   (substitute* file
+                     (("'use strict';")
+                      (string-append "'use strict';\n\n"
+                                     "'" gi-typelib-path "'.split(':').forEach("
+                                     "path => imports.gi.GIRepository.Repository."
+                                     "prepend_search_path(path));"))))
+                 '("src/extension.js" "src/prefs.js")))))
+          (add-after 'install 'wrap-daemons
+            (lambda _
+              (let* ((out #$output)
+                     (service-dir
+                      (string-append out "/share/gnome-shell/extensions"
+                                     "/[email-masked]/service"))
+                     (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
+                (wrap-program (string-append service-dir "/daemon.js")
+                  `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))))))))
     (inputs
-     `(("at-spi2-core" ,at-spi2-core)
-       ("caribou" ,caribou)
-       ("evolution-data-server" ,evolution-data-server)
-       ("gjs" ,gjs)
-       ("glib" ,glib)
-       ("glib:bin" ,glib "bin")
-       ("gsound" ,gsound)
-       ("gnome-shell" ,gnome-shell)
-       ("gtk+" ,gtk+)
-       ("nautilus" ,nautilus)
-       ("openssh" ,openssh)
-       ("openssl" ,openssl)
-       ("python-pygobject" ,python-pygobject)
-       ("upower" ,upower)))
+     (list
+      at-spi2-core
+      caribou
+      evolution-data-server
+      gjs
+      glib
+      `(,glib "bin") ;for /bin/gapplication
+      gsound
+      gnome-shell
+      gtk+
+      nautilus
+      openssh
+      openssl
+      python-pygobject
+      upower))
     (native-inputs
-     `(("gettext" ,gettext-minimal)
-       ("gobject-introspection" ,gobject-introspection)
-       ("libxml2" ,libxml2)
-       ("pkg-config" ,pkg-config)))
+     (list
+      gettext-minimal
+      gobject-introspection
+      libxml2
+      pkg-config))
     (home-page "https://github.com/GSConnect/gnome-shell-extension-gsconnect/wiki")
     (synopsis "Connect GNOME Shell with your Android phone")
     (description "GSConnect is a complete implementation of KDE Connect
-- 
2.41.0