all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: John Kehayias via Guix-patches via <guix-patches@gnu.org>
To: Maxime Devos <maximedevos@telenet.be>
Cc: 53222@debbugs.gnu.org, Nicolas Goaziou <mail@nicolasgoaziou.fr>
Subject: [bug#53222] [PATCH] gnu: autokey fix paths.
Date: Fri, 14 Jan 2022 22:48:09 +0000	[thread overview]
Message-ID: <S1e8TdDC_YGqrwGnrRq8W7oyT8CPKRizHBwhMk9JuF-GbUVRwcYnWxfi2Z5hG99yQzTDUpQkktNaoNgxnx90RVpIqpfOFqRkz1PSJHQtHPw=@protonmail.com> (raw)
In-Reply-To: <7459eb594a85d02eb744c9bd5b83941576990aab.camel@telenet.be>

[-- Attachment #1: Type: text/plain, Size: 1666 bytes --]

Hi Maxime,

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

On Friday, January 14th, 2022 at 5:35 PM, Maxime Devos wrote:

>
> Wouldn't these also need to use use 'search-input-file'?
> I think I've mentioned before why 'search-input-file' needs to be
> used in these kind of contexts instead of 'which' (something with
> cross-compilation), if not I can explain.
>

That sounds vaguely familiar and makes sense. I've updated it to do that (not sure why I switched, probably since I was using that somewhere else).

> Do we need propagation here? I don't quite see the need here
> and propagation can cause trouble like profile conflcts during
> partial upgrades (i.e. "guix install foo" after "guix pull"
> without "guix package -u")
> FWIW autokey is never used as library (except for autokey scripts
> but I assume autokey scripts are interpreted in the same process
> as autokey?) and wrap-program sets GUIX_PYTHONPATH so I think all
> python libraries here could be depropagated? Though that might
> be getting out of scope of the original patch, so only if you want
> to investigate.
>

None of the inputs are propagated now (might have been confusing looking at just this patch), all are regular inputs. Runs fine and is a good point I'll keep in mind for other python programs versus libraries.

> Othderwise, the patch you attached LGTM.
>

Just to be clear, this patch (most recent version attached) is just to do these final tweaks on top of the original patch which added autokey (as that was already pushed). So I think everything should be good now?

Thanks for the review and instructive changes!
John

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-autokey-Fix-paths.patch --]
[-- Type: text/x-patch; name=0001-gnu-autokey-Fix-paths.patch, Size: 2878 bytes --]

From 47126c948e4faa608378900c38417e3d020c1e77 Mon Sep 17 00:00:00 2001
From: John Kehayias <john.kehayias@protonmail.com>
Date: Fri, 14 Jan 2022 15:26:36 -0500
Subject: [PATCH] gnu: autokey: Fix paths.

* gnu/packages/python-xyz.scm (autokey): Add comments on the disabled tests
and GI_TYPELIB_PATH wrapping.
[inputs]: Add ipython.
[phases]{fix-paths}: Use paths to ipython3 and python3 in autokey-shell
script.
{wrap-autokey}: Change name to...
{wrap-autokey-gi}: ...this and move to before wrap for clarity.
---
 gnu/packages/python-xyz.scm | 26 ++++++++++++++++++--------
 1 file changed, 18 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index b85232f2b7..13fe60d296 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -4197,7 +4197,9 @@ (define-public autokey
     (build-system python-build-system)
     (arguments
      (list
-      #:tests? #f ; Tests are deprecated/broken until next version.
+      ;; Tests are deprecated and broken until next version, see
+      ;; https://github.com/autokey/autokey/issues/327
+      #:tests? #f
       #:phases
       #~(modify-phases %standard-phases
           (add-after 'unpack 'fix-paths
@@ -4206,8 +4208,16 @@ (define-public autokey
                 (("\"wmctrl\"")
                  (string-append "\"" (search-input-file inputs "bin/wmctrl") "\""))
                 (("\"zenity\"")
-                 (string-append "\"" (search-input-file inputs "bin/zenity") "\"")))))
-          (add-after 'install 'wrap-autokey
+                 (string-append "\"" (search-input-file inputs "bin/zenity") "\"")))
+              (substitute* "autokey-shell"
+                (("'ipython3'")
+                 (string-append "'" (search-input-file inputs "bin/ipython3") "'"))
+                (("'python3'")
+                 (string-append "'" (search-input-file inputs "bin/python3") "'")))))
+          ;; Use 'prefix' instead of '=' to allow the user to use additional
+          ;; GI paths from their autokey scripts.  GUIX_PYTHONPATH is already
+          ;; wrapped with prefix in python-build-system's wrap.
+          (add-before 'wrap 'wrap-autokey-gi
             (lambda _
               (let ((gi-typelib-path (getenv "GI_TYPELIB_PATH")))
                 (for-each
@@ -4223,14 +4233,14 @@ (define-public autokey
            gtksourceview-3
            libappindicator
            libnotify
-           wmctrl
-           zenity))
-    (propagated-inputs
-     (list python-dbus
+           python-dbus
+           python-ipython
            python-pygobject
            python-pyinotify
            python-pyqt+qscintilla
-           python-xlib))
+           python-xlib
+           wmctrl
+           zenity))
     (home-page "https://github.com/autokey/autokey")
     (synopsis
       "Keyboard and GUI automation utility")
-- 
2.34.0


  reply	other threads:[~2022-01-14 22:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-12 21:03 [bug#53222] [PATCH] gnu: Add autokey John Kehayias via Guix-patches via
2022-01-12 21:22 ` Nicolas Goaziou
2022-01-12 21:26 ` Maxime Devos
2022-01-12 21:55   ` John Kehayias via Guix-patches via
2022-01-13  7:34     ` Maxime Devos
2022-01-14 20:40 ` [bug#53222] [PATCH] gnu: autokey fix paths John Kehayias via Guix-patches via
2022-01-14 22:35   ` Maxime Devos
2022-01-14 22:48     ` John Kehayias via Guix-patches via [this message]
2022-01-15 11:17       ` Maxime Devos
2022-01-15 20:03         ` John Kehayias via Guix-patches via
2022-01-15 20:32           ` bug#53222: " Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='S1e8TdDC_YGqrwGnrRq8W7oyT8CPKRizHBwhMk9JuF-GbUVRwcYnWxfi2Z5hG99yQzTDUpQkktNaoNgxnx90RVpIqpfOFqRkz1PSJHQtHPw=@protonmail.com' \
    --to=guix-patches@gnu.org \
    --cc=53222@debbugs.gnu.org \
    --cc=john.kehayias@protonmail.com \
    --cc=mail@nicolasgoaziou.fr \
    --cc=maximedevos@telenet.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.