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 <viv...@planete-kraus.eu>
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 <viv...@planete-kraus.eu>
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 <viv...@planete-kraus.eu>
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 <viv...@planete-kraus.eu>
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 <viv...@planete-kraus.eu>
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

Attachment: signature.asc
Description: PGP signature

Reply via email to