Subject: Re: [PATCH] gnome-tweaks fails to start on core-updates-frozen

From: Vivien Kraus <[email-masked]>
Date: Sat, 13 Nov 2021 09:06:26 +0000

Hello!

Liliana Marie Prikler <[email-masked]> writes:
>> > > Subject: [PATCH 4/5] gnu: gnome-tweaks: Add bash-minimal as an
>> > > input to wrap the program.
>> > Split the long line.  Also perhaps add a comment in the file itself
>> > as to why this is needed if it's not already obvious from best
>> > practises in core-updates-frozen.
>> It’s flagged by the linter, because wrapping a program produces a
>> shell script that needs to be executed.
> "Flagged by the linter" is not a good description in a commit message
> or elsewhere.  I think a few packages on c-u-frozen might have a
> comment along the lines of "; for wrap-program" or similar.
I wrote "to execute the wrapper program" in a comment.

I also updated it to the core-updates-frozen-batched-changes merge,
because we need an older meson now, and libsoup2 for seahorse.

Vivien

From e0fd1eab227d720bd57ff8e9412d1ed0adc59bfb Mon Sep 17 00:00:00 2001
From: Vivien Kraus <[email-masked]>
Date: Tue, 9 Nov 2021 22:17:43 +0000
Subject: [PATCH 1/7] gnu: gnome-tweaks: Use libhandy 1.

* gnu/packages/gnome.scm (gnome-tweaks)[inputs]: Use libhandy 1, not libhandy
0.
---
 gnu/packages/gnome.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 2340d2b391..13e6721597 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -9872,7 +9872,7 @@ (define-public gnome-tweaks
        ("gtk+" ,gtk+)
        ("gobject-introspection" ,gobject-introspection)
        ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
-       ("libhandy" ,libhandy-0.0)
+       ("libhandy" ,libhandy)
        ("libnotify" ,libnotify)
        ("libsoup" ,libsoup)
        ("nautilus" ,nautilus)
-- 
2.33.1

From 65469d76bb1485281db8fba2ea15316a31cc1f67 Mon Sep 17 00:00:00 2001
From: Vivien Kraus <[email-masked]>
Date: Tue, 9 Nov 2021 22:57:13 +0000
Subject: [PATCH 2/7] gnu: gnome-tweaks: Set the python path.

gnu/packages/gnome.scm (gnome-tweaks)[phase wrap-gi-typelib-and-python]:
Also wrap with GUIX_PYTHONPATH.
---
 gnu/packages/gnome.scm | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 13e6721597..012a261a44 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -9857,12 +9857,18 @@ (define-public gnome-tweaks
                (("gtk-update-icon-cache") "true"))))
          (add-after 'install 'wrap
            (@@ (guix build python-build-system) wrap))
-         (add-after 'wrap 'wrap-gi-typelib
+         (add-after 'wrap 'wrap-gi-typelib-and-python
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let ((out               (assoc-ref outputs "out"))
                    (gi-typelib-path   (getenv "GI_TYPELIB_PATH")))
-               (wrap-program (string-append out "/bin/gnome-tweaks")
-                 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))))))))
+               (let ((python-path
+                      (string-append out "/lib/python"
+                                     ,(version-major+minor
+                                       (package-version python))
+                                     "/site-packages")))
+                 (wrap-program (string-append out "/bin/gnome-tweaks")
+                   `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
+                   `("GUIX_PYTHONPATH" ":" prefix (,python-path))))))))))
     (native-inputs
      `(("glib:bin" ,glib "bin") ; for glib-compile-resources, etc.
        ("intltool" ,intltool)
-- 
2.33.1

From 5dcc96bc39f72e41c3c4ad524dbf23cc1952e5d8 Mon Sep 17 00:00:00 2001
From: Vivien Kraus <[email-masked]>
Date: Tue, 9 Nov 2021 23:01:45 +0000
Subject: [PATCH 3/7] gnu: gnome-tweaks: Add bash-minimal as an input.

* gnu/packages/gnome.scm (gnome-tweaks)[inputs]: Add bash-minimal.
---
 gnu/packages/gnome.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 012a261a44..3943e6e7cc 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -9874,7 +9874,8 @@ (define-public gnome-tweaks
        ("intltool" ,intltool)
        ("pkg-config" ,pkg-config)))
     (inputs
-     `(("gnome-desktop" ,gnome-desktop)
+     `(("bash-minimal" ,bash-minimal) ; to execute the wrapper program
+       ("gnome-desktop" ,gnome-desktop)
        ("gtk+" ,gtk+)
        ("gobject-introspection" ,gobject-introspection)
        ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
-- 
2.33.1

From 07b11864df5ccef11659927de7fe49c97e3a7b3e Mon Sep 17 00:00:00 2001
From: Vivien Kraus <[email-masked]>
Date: Sat, 13 Nov 2021 09:05:27 +0000
Subject: [PATCH 4/7] gnu: gnome-tweaks: Use meson 0.59.

* gnu/packages/gnome.scm (gnome-tweaks) [arguments]: Use meson 0.59.
---
 gnu/packages/gnome.scm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 3943e6e7cc..b9aea90ae3 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -9844,6 +9844,7 @@ (define-public gnome-tweaks
     (build-system meson-build-system)
     (arguments
      `(#:glib-or-gtk? #t
+       #:meson ,meson-0.59
        #:configure-flags '("-Dlocalstatedir=/tmp"
                            "-Dsysconfdir=/tmp")
        #:imported-modules ((guix build python-build-system)
-- 
2.33.1

From f53a518d9ac03501e4273a3625efcc9c0ff5ca96 Mon Sep 17 00:00:00 2001
From: Vivien Kraus <[email-masked]>
Date: Wed, 10 Nov 2021 18:50:40 +0000
Subject: [PATCH 5/7] gnu: gcr: Upgrade to 3.41.0.

* gnu/packages/gnome.scm (gcr): Upgrade to 3.41.0.
---
 gnu/packages/gnome.scm | 29 +++++++++++++++++++++++------
 1 file changed, 23 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index b9aea90ae3..1ba38c14f9 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -2409,7 +2409,7 @@ (define-public gnome-font-viewer
 (define-public gcr
   (package
     (name "gcr")
-    (version "3.34.0")
+    (version "3.41.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnome/sources/" name "/"
@@ -2417,8 +2417,8 @@ (define-public gcr
                                   name "-" version ".tar.xz"))
               (sha256
                (base32
-                "0925snsixzkwh49xiayqmj6fcrmklqk8kyy0jkv7m64h9abm1pr9"))))
-    (build-system gnu-build-system)
+                "00fsf82ycac8qi0kkiq759p6jrn63pyz4ksn4wnq7m4ax94zq289"))))
+    (build-system meson-build-system)
     (arguments
      '(#:phases
        (modify-phases %standard-phases
@@ -2426,10 +2426,21 @@ (define-public gcr
          ;; build environment.
          (add-after 'unpack 'disable-failing-tests
            (lambda _
-             (substitute* "Makefile.in"
-               (("[[:blank:]]+test-system-prompt\\$\\(EXEEXT\\)")
+             (substitute* "gcr/meson.build"
+               (("[[:blank:]]+'system-prompt',")
                 ""))
              #t))
+         (add-after 'unpack 'skip-gtk-update-icon-cache
+           ;; Don't create 'icon-theme.cache'.
+           (lambda _
+             (substitute* "meson_post_install.py"
+               (("gtk-update-icon-cache") "true"))
+             #t))
+         (add-after 'unpack 'fix-systemd-detection
+           (lambda _
+             (substitute* "gcr/gcr-ssh-agent-service.c"
+               (("#ifdef WITH_SYSTEMD")
+                "#if (WITH_SYSTEMD)"))))
          (add-before 'check 'pre-check
            (lambda _
              ;; Some tests expect to write to $HOME.
@@ -2438,11 +2449,17 @@ (define-public gcr
     (inputs
      `(("dbus" ,dbus)
        ("gnupg" ,gnupg)                ;called as a child process during tests
-       ("libgcrypt" ,libgcrypt)))
+       ("libgcrypt" ,libgcrypt)
+       ("libsecret" ,libsecret)))
     (native-inputs
      `(("python" ,python-wrapper)       ;for tests
+       ("openssh" ,openssh)             ;for tests
        ("pkg-config" ,pkg-config)
        ("gettext" ,gettext-minimal)
+       ("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("libtool" ,libtool)
+       ("gtk-doc" ,gtk-doc)
        ("glib" ,glib "bin")
        ("gobject-introspection" ,gobject-introspection)
        ("libxml2" ,libxml2)
-- 
2.33.1

From 7d85fa1df0efc8d34f69178f5ca65c0b345bde82 Mon Sep 17 00:00:00 2001
From: Vivien Kraus <[email-masked]>
Date: Sat, 13 Nov 2021 09:20:06 +0000
Subject: [PATCH 6/7] gnu: seahorse: Use libsoup 2.

* gnu/packages/gnome.scm (seahorse) [inputs]: Use libsoup 2.
---
 gnu/packages/gnome.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 1ba38c14f9..67a23941ff 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -4370,7 +4370,7 @@ (define-public seahorse
        ("libhandy" ,libhandy-0.0)
        ("libpwquality" ,libpwquality)
        ("libsecret" ,libsecret)
-       ("libsoup" ,libsoup)))
+       ("libsoup" ,libsoup-minimal-2)))
     (native-inputs
      `(("gettext" ,gettext-minimal)
        ("glib:bin" ,glib "bin")
-- 
2.33.1

From 9629a56bd53eabf406c2d68e1bd8ac9acfd3cb38 Mon Sep 17 00:00:00 2001
From: Vivien Kraus <[email-masked]>
Date: Wed, 10 Nov 2021 18:52:58 +0000
Subject: [PATCH 7/7] gnu: seahorse: Upgrade to 41.0.

* gnu/packages/gnome.scm (seahorse): Upgrade to 41.0.
---
 gnu/packages/gnome.scm | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 67a23941ff..7c6e10de33 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -4339,15 +4339,15 @@ (define-public gnome-themes-standard
 (define-public seahorse
   (package
     (name "seahorse")
-    (version "3.36.2")
+    (version "41.0")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://gnome/sources/" name "/"
-                           (version-major+minor version) "/" name "-"
+                           (version-major version) "/" name "-"
                            version ".tar.xz"))
        (sha256
-        (base32 "16wmxxppgcgfj8zkagcny5af1c81x32ysm9d6j9f2k7bmik21ss5"))))
+        (base32 "1x99i7kdvd8hbxcs5rfrq7nw6r9bfzaw263zaigjjj04h6gc1vp6"))))
     (build-system meson-build-system)
     (arguments
      '(#:glib-or-gtk? #t
@@ -4358,7 +4358,11 @@ (define-public seahorse
            (lambda _
              (substitute* "build-aux/meson_post_install.py"
                (("gtk-update-icon-cache") "true"))
-             #t)))))
+             #t))
+         (add-before 'check 'pre-check
+           (lambda _
+             ;; Tests require a writable HOME.
+             (setenv "HOME" (getcwd)))))))
     (inputs
      `(("gtk+" ,gtk+)
        ("gcr" ,gcr)
@@ -4367,7 +4371,7 @@ (define-public seahorse
        ("openldap" ,openldap)
        ("openssh" ,openssh)
        ("avahi" ,avahi)
-       ("libhandy" ,libhandy-0.0)
+       ("libhandy" ,libhandy)
        ("libpwquality" ,libpwquality)
        ("libsecret" ,libsecret)
        ("libsoup" ,libsoup-minimal-2)))
-- 
2.33.1