[PATCH] gnu: python-pyperclip: Improve Wayland support.

  • Open
  • quality assurance status badge
Details
One participant
  • Hilton Chain
Owner
unassigned
Submitted by
Hilton Chain
Severity
normal
H
H
Hilton Chain wrote on 16 Jul 2023 10:11
(address . guix-patches@gnu.org)(name . Hilton Chain)(address . hako@ultrarare.space)
7d732b0b55c85524431db4cbb59e6d496fc69edc.1689495066.git.hako@ultrarare.space
* 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(+)

Toggle diff (24 lines)
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
?