Subject: [bug#72600] [PATCH v3] gnu: Add python-pyclip.

From: Evgeny Pisemsky <[email-masked]>
Date: Sun, 26 Jan 2025 18:55:20 +0300

* gnu/packages/xdisorg.scm (python-pyclip): New variable.

Change-Id: Ia0142bb8361e2c7120ea2539f393701aa93d00a9
---
 gnu/packages/xdisorg.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index eadb30fab2..eda2f6e718 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -66,6 +66,7 @@
 ;;; Copyright © 2024 Ashish SHUKLA <[email-masked]>
 ;;; Copyright © 2024 Spencer Peters <[email-masked]>
 ;;; Copyright © 2024 Jakob Kirsch <[email-masked]>
+;;; Copyright © 2025 Evgeny Pisemsky <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -90,6 +91,7 @@ (define-module (gnu packages xdisorg)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system meson)
   #:use-module (guix build-system python)
+  #:use-module (guix build-system pyproject)
   #:use-module (guix build-system scons)
   #:use-module (guix download)
   #:use-module (guix gexp)
@@ -148,6 +150,7 @@ (define-module (gnu packages xdisorg)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages python-web)
   #:use-module (gnu packages python-check)
+  #:use-module (gnu packages python-build)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages sphinx)
   #:use-module (gnu packages tex)
@@ -2683,6 +2686,37 @@ (define-public physlock
     (home-page "https://github.com/xyb3rt/physlock")
     (license license:gpl2+)))
 
+(define-public python-pyclip
+  (package
+    (name "python-pyclip")
+    (version "0.7.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/spyoungtech/pyclip")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "10q698snlid09jmlvsqlljj2r0w6cixncjcgbhnjqp7w0hva8wyj"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:phases #~(modify-phases %standard-phases
+                   (add-before 'check 'start-xorg-server
+                     (lambda _
+                       (system "Xvfb :1 &")
+                       (setenv "DISPLAY" ":1"))))))
+    (native-inputs (list python-setuptools python-wheel python-pytest
+                         xorg-server-for-tests))
+    (propagated-inputs (list xclip wl-clipboard))
+    (home-page "https://github.com/spyoungtech/pyclip")
+    (synopsis "Cross-platform clipboard module for Python")
+    (description
+     "This library implements cross-platform clipboard utilities supporting both
+binary and text data.")
+    (license license:asl2.0)))
+
 (define-public python-pyperclip
   (package
     (name "python-pyperclip")

base-commit: a895cc4c5bdb5d4bf8383077ef587ac18d069d7d
-- 
2.47.1