GNU bug report logs - #51924
[PATCH] gnu: Add postmarketos-tweaks.

Previous Next

Package: guix-patches;

Reported by: phodina <phodina <at> protonmail.com>

Date: Wed, 17 Nov 2021 17:09:02 UTC

Severity: normal

Tags: moreinfo, patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#51924: closed ([PATCH] gnu: Add postmarketos-tweaks.)
Date: Wed, 23 Apr 2025 11:56:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Wed, 23 Apr 2025 20:55:15 +0900
with message-id <87o6wnw0rg.fsf <at> gmail.com>
and subject line Re: [bug#51924] [PATCH] gnu: Add postmarketos-tweaks.
has caused the debbugs.gnu.org bug report #51924,
regarding [PATCH] gnu: Add postmarketos-tweaks.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
51924: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=51924
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: phodina <phodina <at> protonmail.com>
To: Guix Patches <guix-patches <at> gnu.org>
Subject: [PATCH] gnu: Add postmarketos-tweaks.
Date: Wed, 17 Nov 2021 17:08:21 +0000
Hi,

here's patch for tool similar to gnome-tweaks just for mobile devices.

There is hardcoded location /etc/postmarket for polkit. Should this be substituted for different location in a similar manner as with udev which looks in out/lib/udev?

* gnu/packages/gnome.scm (postmarketos-tweaks): New variable.

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 28d4432334..2e32be4cd5 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -11357,6 +11357,64 @@ (define-public polari
     (home-page "https://wiki.gnome.org/Apps/Polari")
     (license license:gpl2+)))

+(define-public postmarketos-tweaks
+  (package
+    (name "postmarketos-tweaks")
+    (version "0.8.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://gitlab.com/postmarketOS/postmarketos-tweaks")
+             (commit version)))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "09z3i288jnxvkbk2dphjc578ycp1vqzdmixi311fymvgwhfb3xjs"))))
+    (build-system meson-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-install-dir
+           (lambda* _
+             (substitute* "data/meson.build"
+               (("/etc/init.d") (string-append %output "/etc/init.d")))))
+         (add-after 'glib-or-gtk-wrap 'python-and-gi-wrap
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((bin (string-append (assoc-ref outputs "out") "/bin/"))
+                   (pylib (string-append (assoc-ref outputs "out")
+                                         "/lib/python"
+                                         ,(version-major+minor
+                                           (package-version python))
+                                         "/site-packages")))
+               (for-each
+                (lambda (program)
+                  (wrap-program (string-append bin program)
+                    `("PYTHONPATH" = (,(getenv "PYTHONPATH") ,pylib))
+                    `("GI_TYPELIB_PATH" = (,(getenv
+                                             "GI_TYPELIB_PATH")))))
+                (list "pmos-tweaks" "pmos-tweakd" "pk-tweaks-action"))
+               #t))))))
+    (native-inputs `(("pkg-config" ,pkg-config)
+                     ("gtk+:bin"
+                      ,gtk+ "bin")      ; for gtk-update-icon-cache
+                     ("glib:bin"
+                      ,glib "bin")      ; glib-compile-schemas, etc.
+                     ("desktop-file-utils"
+                      ,desktop-file-utils) ; for update-desktop-database
+                     ("cmake" ,cmake)))
+    (inputs `(("bash-minimal" ,bash-minimal)
+              ("gtk+" ,gtk+)
+              ("libhandy" ,libhandy)
+              ("python" ,python)
+              ("python-pygobject" ,python-pygobject)
+              ("python-pyyaml" ,python-pyyaml)))
+    (home-page "https://gitlab.com/postmarketOS/postmarketos-tweaks")
+    (synopsis "Extra settings on mobile platforms")
+    (description "Postmarket tweaks is an application for tweaking settings
+on desktop environments supported by postmarketOS.")
+    (license license:lgpl3)))
+
 (define-public gnome-boxes
   (package
     (name "gnome-boxes")
--
2.33.0


[Message part 3 (message/rfc822, inline)]
From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: phodina <phodina <at> protonmail.com>
Cc: 51924-done <at> debbugs.gnu.org
Subject: Re: [bug#51924] [PATCH] gnu: Add postmarketos-tweaks.
Date: Wed, 23 Apr 2025 20:55:15 +0900
Hi,

phodina <phodina <at> protonmail.com> writes:

> Hi,
>
> here's patch for tool similar to gnome-tweaks just for mobile devices.
>
> There is hardcoded location /etc/postmarket for polkit. Should this be substituted for different location in a similar manner as with udev which looks in out/lib/udev?

The polkit actions are installed under:

--8<---------------cut here---------------start------------->8---
/gnu/store/ql9mygxdw0pl5cvd666l2f4q3sqgb8fd-postmarketos-tweaks-0.13.2/share/polkit-1
/gnu/store/ql9mygxdw0pl5cvd666l2f4q3sqgb8fd-postmarketos-tweaks-0.13.2/share/polkit-1/actions
/gnu/store/ql9mygxdw0pl5cvd666l2f4q3sqgb8fd-postmarketos-tweaks-0.13.2/share/polkit-1/actions/org.postmarketos.Tweaks.policy
--8<---------------cut here---------------end--------------->8---

That's the normal location and our polkit service is happy with it.

> * gnu/packages/gnome.scm (postmarketos-tweaks): New variable.

I just pushed a modernized version, which I placed in the gnome-xyz
module instead of gnome, and fixed the license to lgpl3+ (the + is
important :-)).

Also updated it to the latest version among other improvements.  Please
see commit 699ce22ed81.

Closing, at last!

-- 
Thanks,
Maxim


This bug report was last modified 85 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.