GNU bug report logs - #64662
[PATCH] gnu: python-pyperclip: Improve Wayland support.

Previous Next

Package: guix-patches;

Reported by: Hilton Chain <hako <at> ultrarare.space>

Date: Sun, 16 Jul 2023 08:13:02 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 64662 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#64662; Package guix-patches. (Sun, 16 Jul 2023 08:13:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Hilton Chain <hako <at> ultrarare.space>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 16 Jul 2023 08:13:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Hilton Chain <hako <at> ultrarare.space>
To: guix-patches <at> gnu.org
Cc: Hilton Chain <hako <at> ultrarare.space>
Subject: [PATCH] gnu: python-pyperclip: Improve Wayland support.
Date: Sun, 16 Jul 2023 16:11:57 +0800
* gnu/packages/xdisorg.scm (python-pyperclip)[snippet]: Adjust the source to
test $WAYLAND_DISPLAY as well.
---
 gnu/packages/xdisorg.scm | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index 1f7539764c..abe577edd6 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -2361,6 +2361,15 @@ (define-public python-pyperclip
       (origin
         (method url-fetch)
         (uri (pypi-uri "pyperclip" version))
+        (modules '((guix build utils)))
+        (snippet
+         ;; XXX: Pyperclip's Linux detection currently only relies on $DISPLAY,
+         ;; which may not be set in a Wayland session.
+         ;; <https://github.com/asweigart/pyperclip/issues/220>
+         ;; <https://github.com/asweigart/pyperclip/pull/201>
+         '(substitute* "src/pyperclip/__init__.py"
+            (("^HAS_DISPLAY = os\\.getenv\\(\"DISPLAY\", False\\)" line)
+             (string-append line " or os.getenv(\"WAYLAND_DISPLAY\", False)"))))
         (sha256
          (base32
           "0mxzm43z2anr55gyz7awagvam4d5c2rlxhp9hjyg0d29n2l58lhh"))))

base-commit: 093e9204183790558921c968034c547b41ebef3a
-- 
2.41.0





This bug report was last modified 1 year and 159 days ago.

Previous Next


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