Add python-pyclip

Evgeny PisemskySun Jan 19 17:55:49+0300 2025

25aab24

Add python-pyclip

modules/cogd/packages/python-xyz.scm

66
77
(use-modules (guix packages)
88
             (guix download)
9+
             (guix git-download)
10+
             (guix gexp)
911
             (guix build-system python)
1012
             (guix build-system pyproject)
1113
             ((guix licenses) #:prefix license:)
14+
             (gnu packages check)
15+
             (gnu packages python-build)
1216
             (gnu packages python-xyz)
13-
             (gnu packages python-build))
17+
             (gnu packages xdisorg)
18+
             (gnu packages xorg))
1419
1520
(define-public python-shxparser
1621
  (package

3136
AutoCad format which can encode single line fonts.  This format is
3237
used for many CNC and laser operations.")
3338
    (license license:expat)))
39+
40+
(define-public python-pyclip
41+
  (package
42+
    (name "python-pyclip")
43+
    (version "0.7.0")
44+
    (source
45+
     (origin
46+
       (method git-fetch)
47+
       (uri (git-reference
48+
             (url "https://github.com/spyoungtech/pyclip")
49+
             (commit (string-append "v" version))))
50+
       (file-name (git-file-name name version))
51+
       (sha256
52+
        (base32 "10q698snlid09jmlvsqlljj2r0w6cixncjcgbhnjqp7w0hva8wyj"))))
53+
    (build-system pyproject-build-system)
54+
    (arguments
55+
     (list
56+
      #:phases #~(modify-phases %standard-phases
57+
                   (add-before 'check 'startx
58+
                     (lambda* (#:key inputs #:allow-other-keys)
59+
                       (let ((x (assoc-ref inputs "xorg-server")))
60+
                         (system (string-append x "/bin/Xvfb :1 &"))
61+
                         (setenv "DISPLAY" ":1")))))))
62+
    (native-inputs (list python-setuptools python-wheel python-pytest
63+
                         xorg-server))
64+
    (propagated-inputs (list xclip wl-clipboard))
65+
    (home-page "https://github.com/spyoungtech/pyclip")
66+
    (synopsis "Cross-platform clipboard module for Python")
67+
    (description
68+
     "This library implements cross-platform clipboard utilities supporting
69+
both binary and text data.")
70+
    (license license:asl2.0)))