@@ -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"))))