Subject: bug#51731: closed (Re: bug#51731: [PATCH] gnome-tweaks fails to start on core-updates-frozen)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 15 Nov 2021 11:14:02 +0000

Your bug report

#51731: [PATCH] gnome-tweaks fails to start on core-updates-frozen

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
51731: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=51731
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#51731: [PATCH] gnome-tweaks fails to start on core-updates-frozen
From: Ludovic Courtès <[email-masked]>
To: Vivien Kraus <[email-masked]>
Cc: [email-masked], Liliana Marie Prikler <[email-masked]>
Date: Mon, 15 Nov 2021 12:13:37 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi!

Vivien Kraus <[email-masked]> skribis:

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

I applied the whole series as commit
6e40c00ad192bb625074a1e3fd49930a47528a81:

  6e40c00ad1 gnu: seahorse: Upgrade to 41.0.
  bfa3bf0ffc gnu: seahorse: Use libsoup 2.
  56f456315f gnu: gcr: Upgrade to 3.41.0.
  b699a4f186 gnu: gnome-tweaks: Add bash-minimal as an input.
  7978b6454b gnu: gnome-tweaks: Set the python path.
  e0b6318a5a gnu: gnome-tweaks: Use libhandy 1.

Ricardo had already pushed this:

  4c4f982c33 gnu: gnome-tweaks: Use meson 0.59.

Thanks!

Ludo’.

Subject: [PATCH] gnome-tweaks fails to start on core-updates-frozen
From: Vivien Kraus <[email-masked]>
To: [email-masked]
Date: Tue, 09 Nov 2021 23:10:29 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Dear guix,

gnome-tweaks does not start on core-updates-frozen, because it needs
libhandy 1 and is given libhandy 0.0.

Also, it cannot find its own python module, so the python path needs to
be wrapped.

I fixed a couple of linter errors, and applied guix style to
it. However, now the linter complains that we have the "bin" output of
glib in something that would be called "glib" and not "glib:bin"… Should
we still keep the styled output?

Best regards,

Vivien

From 4612c8235c14bcb9b7583746683e1d2559df390b Mon Sep 17 00:00:00 2001
From: Vivien Kraus <[email-masked]>
Date: Tue, 9 Nov 2021 22:17:43 +0000
Subject: [PATCH 1/5] 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 3eafcc2f10..17dd87fd62 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -9795,7 +9795,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 cdb79baa5705adbfee8711e5698aa687fd3685f1 Mon Sep 17 00:00:00 2001
From: Vivien Kraus <[email-masked]>
Date: Tue, 9 Nov 2021 22:57:13 +0000
Subject: [PATCH 2/5] gnu: gnome-tweaks: Set the python path.

gnu/packages/gnome.scm (gnome-tweaks)[phases]: Also wrap with GUIX_PYTHONPATH.
---
 gnu/packages/gnome.scm | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 17dd87fd62..f725dfe981 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -9784,8 +9784,14 @@ (define-public gnome-tweaks
            (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 4f5dc6bdb473380619b42986097b56e1ea305f13 Mon Sep 17 00:00:00 2001
From: Vivien Kraus <[email-masked]>
Date: Tue, 9 Nov 2021 22:39:57 +0000
Subject: [PATCH 3/5] gnu: gnome-tweaks: gobject-introspection should be a
 native input.

* gnu/packages/gnome.scm (gnome-tweaks)[inputs]: Move gobject-introspection to
a native input.
---
 gnu/packages/gnome.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index f725dfe981..ab16157fb5 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -9795,11 +9795,11 @@ (define-public gnome-tweaks
     (native-inputs
      `(("glib:bin" ,glib "bin") ; for glib-compile-resources, etc.
        ("intltool" ,intltool)
-       ("pkg-config" ,pkg-config)))
+       ("pkg-config" ,pkg-config)
+       ("gobject-introspection" ,gobject-introspection)))
     (inputs
      `(("gnome-desktop" ,gnome-desktop)
        ("gtk+" ,gtk+)
-       ("gobject-introspection" ,gobject-introspection)
        ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
        ("libhandy" ,libhandy)
        ("libnotify" ,libnotify)
-- 
2.33.1

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

* 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 ab16157fb5..d0bd796fa4 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -9806,7 +9806,8 @@ (define-public gnome-tweaks
        ("libsoup" ,libsoup)
        ("nautilus" ,nautilus)
        ("python" ,python)
-       ("python-pygobject" ,python-pygobject)))
+       ("python-pygobject" ,python-pygobject)
+       ("bash-minimal" ,bash-minimal)))
     (synopsis "Customize advanced GNOME 3 options")
     (home-page "https://wiki.gnome.org/Apps/Tweaks")
     (description
-- 
2.33.1

From 4c5d8d919d433d0669abc124eeb2692ae81739f5 Mon Sep 17 00:00:00 2001
From: Vivien Kraus <[email-masked]>
Date: Tue, 9 Nov 2021 23:04:59 +0000
Subject: [PATCH 5/5] gnu: gnome-tweaks: Style it.

* gnu/packages/gnome.scm (gnome-tweaks): Apply the Guix style.
---
 gnu/packages/gnome.scm | 28 +++++++++++++---------------
 1 file changed, 13 insertions(+), 15 deletions(-)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index d0bd796fa4..785492b186 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -9793,21 +9793,19 @@ (define-public 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)
-       ("pkg-config" ,pkg-config)
-       ("gobject-introspection" ,gobject-introspection)))
-    (inputs
-     `(("gnome-desktop" ,gnome-desktop)
-       ("gtk+" ,gtk+)
-       ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
-       ("libhandy" ,libhandy)
-       ("libnotify" ,libnotify)
-       ("libsoup" ,libsoup)
-       ("nautilus" ,nautilus)
-       ("python" ,python)
-       ("python-pygobject" ,python-pygobject)
-       ("bash-minimal" ,bash-minimal)))
+     (list `(,glib "bin") ; for glib-compile-resources, etc.
+           intltool pkg-config gobject-introspection))
+    (inputs
+     (list gnome-desktop
+           gtk+
+           gsettings-desktop-schemas
+           libhandy
+           libnotify
+           libsoup
+           nautilus
+           python
+           python-pygobject
+           bash-minimal))
     (synopsis "Customize advanced GNOME 3 options")
     (home-page "https://wiki.gnome.org/Apps/Tweaks")
     (description
-- 
2.33.1