From patchwork Fri Jan 14 22:48:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: John Kehayias X-Patchwork-Id: 36350 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id AA8D727BBEA; Fri, 14 Jan 2022 22:49:16 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 2E28027BBE9 for ; Fri, 14 Jan 2022 22:49:16 +0000 (GMT) Received: from localhost ([::1]:37558 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n8VNj-0002Iv-BY for patchwork@mira.cbaines.net; Fri, 14 Jan 2022 17:49:15 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41268) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n8VNW-0002IV-G4 for guix-patches@gnu.org; Fri, 14 Jan 2022 17:49:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:45612) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n8VNW-0006aG-0q for guix-patches@gnu.org; Fri, 14 Jan 2022 17:49:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n8VNV-00026s-Pq for guix-patches@gnu.org; Fri, 14 Jan 2022 17:49:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53222] [PATCH] gnu: autokey fix paths. Resent-From: John Kehayias Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 14 Jan 2022 22:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53222 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxime Devos Cc: 53222@debbugs.gnu.org, Nicolas Goaziou Received: via spool by 53222-submit@debbugs.gnu.org id=B53222.16422005058058 (code B ref 53222); Fri, 14 Jan 2022 22:49:01 +0000 Received: (at 53222) by debbugs.gnu.org; 14 Jan 2022 22:48:25 +0000 Received: from localhost ([127.0.0.1]:38515 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8VMu-00025u-Nm for submit@debbugs.gnu.org; Fri, 14 Jan 2022 17:48:25 -0500 Received: from mail-40133.protonmail.ch ([185.70.40.133]:24823) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8VMp-00025d-Bw for 53222@debbugs.gnu.org; Fri, 14 Jan 2022 17:48:23 -0500 Date: Fri, 14 Jan 2022 22:48:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail2; t=1642200492; bh=FodndWHquaQ7gwc9uBAdzQcap2bLSsDxZTzsqld3J3w=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:From:To:Cc; b=ij2Mz/gioVC+5PfR/X8KldbHtfVg9UOpqsrBt21AgKXeMFLYgpjgkeRWdFm4n7XZf VQ2HYE9VGJUimY60Oh9eV+BYSlLjEWQspC7OduAG0Be8TnrIGJP8fnb/Nds+l44MQB 09AYQiN/32WcLATt5RZJbc1TxQZsAkK57qfnAwIe3xqjJwmGACqIiyiOnsrfEDNSXH /6Eiim3NZlkyddiIGUknOv4VpsKWwoCzRL/EeEm4M21E2eZ9aeFjaSolZirBNDE+Ua vJppbxr+JwTMRAtVRO6i5oDL3rfHxRiVCWMxyBxQ+0Fek+m7Oj6/+DxZxeRreOs4P6 y1uUWttvACbOQ== Message-ID: In-Reply-To: <7459eb594a85d02eb744c9bd5b83941576990aab.camel@telenet.be> References: <7459eb594a85d02eb744c9bd5b83941576990aab.camel@telenet.be> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: John Kehayias X-ACL-Warn: , John Kehayias via Guix-patches X-Patchwork-Original-From: John Kehayias via Guix-patches via From: John Kehayias X-getmail-retrieved-from-mailbox: Patches 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 From 47126c948e4faa608378900c38417e3d020c1e77 Mon Sep 17 00:00:00 2001 From: John Kehayias 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