all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dariqq <dariqq@posteo.net>
To: 68937@debbugs.gnu.org
Cc: Dariqq <dariqq@posteo.net>,
	Liliana Marie Prikler <liliana.prikler@gmail.com>,
	Maxim Cournoyer <maxim.cournoyer@gmail.com>,
	Raghav Gururajan <rg@raghavgururajan.name>,
	Vivien Kraus <vivien@planete-kraus.eu>
Subject: [bug#68937] [PATCH 1/3] gnu: orca: Fix invocation errors.
Date: Mon,  5 Feb 2024 15:48:36 +0000	[thread overview]
Message-ID: <83fc1fec3f3d3dab016081c7bbcc9055361a503d.1707146219.git.dariqq@posteo.net> (raw)
In-Reply-To: <cover.1707146219.git.dariqq@posteo.net>

at-spi2-atk causes 'import pyatspi' to fail.
Add orca libraries to GUIX_PYTHONPATH such that the orca modules can be found.

* gnu/pacakges/gnome.scm (orca)[inputs]: Remove at-spi2-atk.
[phases] wrap-orca: Add self to GUIX_PYTHONPATH.

Change-Id: I3a2cd1a410a4c391c6263df2d29b9ec75ecc8da4
---
 gnu/packages/gnome.scm | 42 ++++++++++++++++++++++++------------------
 1 file changed, 24 insertions(+), 18 deletions(-)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 6f22529dd7..0d3fcbe086 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -11115,30 +11115,36 @@ (define-public orca
                 "097pyav3z5ssic8vwd7v1s7vynpycdpyfr324rr6c7mfzq5vmp7s"))))
     (build-system glib-or-gtk-build-system)
     (arguments
-     '(#:phases
-       (modify-phases %standard-phases
-         (add-before 'configure 'qualify-xkbcomp
-           (lambda* (#:key inputs #:allow-other-keys)
-             (let ((xkbcomp (string-append
-                             (assoc-ref inputs "xkbcomp") "/bin/xkbcomp")))
-               (substitute* "src/orca/orca.py"
-                 (("'xkbcomp'") (format #f "'~a'" xkbcomp))))))
-         (add-after 'install 'wrap-orca
-           (lambda* (#:key outputs #:allow-other-keys)
-             (wrap-program (search-input-file outputs "bin/orca")
-               `("GI_TYPELIB_PATH" ":" prefix
-                 (,(getenv "GI_TYPELIB_PATH")))
-               `("GST_PLUGIN_SYSTEM_PATH" ":" prefix
-                 (,(getenv "GST_PLUGIN_SYSTEM_PATH")))
-               `("GUIX_PYTHONPATH" ":" prefix
-                 (,(getenv "GUIX_PYTHONPATH")))))))))
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'configure 'qualify-xkbcomp
+            (lambda* (#:key inputs #:allow-other-keys)
+              (let ((xkbcomp (string-append
+                              (assoc-ref inputs "xkbcomp") "/bin/xkbcomp")))
+                (substitute* "src/orca/orca.py"
+                  (("'xkbcomp'") (format #f "'~a'" xkbcomp))))))
+          (add-after 'set-install 'wrap-orca
+            (lambda* (#:key outputs #:allow-other-keys)
+              (let* ((out (assoc-ref outputs "out"))
+                     (pylib (string-append out "/lib/python"
+                                           #$(version-major+minor
+                                              (package-version (this-package-input "python")))
+                                           "/site-packages")))
+                (wrap-program (search-input-file outputs "bin/orca")
+                  `("GI_TYPELIB_PATH" ":" prefix
+                    (,(getenv "GI_TYPELIB_PATH")))
+                  `("GST_PLUGIN_SYSTEM_PATH" ":" prefix
+                    (,(getenv "GST_PLUGIN_SYSTEM_PATH")))
+                  `("GUIX_PYTHONPATH" ":" prefix
+                    (,(getenv "GUIX_PYTHONPATH") ,pylib)))))))))
     (native-inputs
      (list gettext-minimal
            itstool
            pkg-config
            libxml2))
     (inputs
-     (list at-spi2-atk
+     (list ;; at-spi2-atk
            bash-minimal
            gsettings-desktop-schemas
            gstreamer
-- 
2.41.0





  reply	other threads:[~2024-02-05 15:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-05 15:44 [bug#68937] [PATCH 0/3] Orca fixes Dariqq
2024-02-05 15:48 ` Dariqq [this message]
2024-02-05 15:48 ` [bug#68937] [PATCH 2/3] gnu: brltty: Fix python package install Dariqq
2024-02-05 15:48 ` [bug#68937] [PATCH 3/3] gnu: orca: Add more optional dependencies Dariqq
2024-02-05 16:50 ` [bug#68937] [PATCH 0/3] Orca fixes Vivien Kraus via Guix-patches via
2024-02-05 18:32   ` Dariqq
2024-02-05 18:49 ` [bug#68937] [PATCH gnome-team v2 1/2] gnu: brltty: Fix python package install Dariqq
2024-02-05 18:49   ` [bug#68937] [PATCH gnome-team v2 2/2] gnu: orca: Add optional dependencies Dariqq
2024-02-16 19:49     ` Maxim Cournoyer
2024-02-10  8:12 ` [bug#68937] QA review for 68937 Vivien Kraus via Guix-patches via
2024-02-10 11:11   ` Christopher Baines
2024-02-10 11:15     ` bug#68937: " Christopher Baines

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=83fc1fec3f3d3dab016081c7bbcc9055361a503d.1707146219.git.dariqq@posteo.net \
    --to=dariqq@posteo.net \
    --cc=68937@debbugs.gnu.org \
    --cc=liliana.prikler@gmail.com \
    --cc=maxim.cournoyer@gmail.com \
    --cc=rg@raghavgururajan.name \
    --cc=vivien@planete-kraus.eu \
    /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.