projects/guix·blob python-team · refs

147 lines · 5.9 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2014, 2015, 2016, 2020 Eric Bavier <[email protected]>
3;;; Copyright © 2016 Efraim Flashner <[email protected]>
4;;; Copyright © 2017 Vasile Dumitrascu <[email protected]>
5;;; Copyright © 2019 Ricardo Wurmus <[email protected]>
6;;;
7;;; This file is part of GNU Guix.
8;;;
9;;; GNU Guix is free software; you can redistribute it and/or modify it
10;;; under the terms of the GNU General Public License as published by
11;;; the Free Software Foundation; either version 3 of the License, or (at
12;;; your option) any later version.
13;;;
14;;; GNU Guix is distributed in the hope that it will be useful, but
15;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17;;; GNU General Public License for more details.
18;;;
19;;; You should have received a copy of the GNU General Public License
20;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21
22(define-module (gnu packages synergy)
23 #:use-module (guix gexp)
24 #:use-module (guix packages)
25 #:use-module ((guix licenses) #:select (gpl2 expat))
26 #:use-module (guix git-download)
27 #:use-module (guix build-system cmake)
28 #:use-module (guix build-system meson)
29 #:use-module (guix build-system qt)
30 #:use-module (gnu packages)
31 #:use-module (gnu packages curl)
32 #:use-module (gnu packages compression)
33 #:use-module (gnu packages dns)
34 #:use-module (gnu packages freedesktop)
35 #:use-module (gnu packages linux)
36 #:use-module (gnu packages xdisorg)
37 #:use-module (gnu packages pkg-config)
38 #:use-module (gnu packages python)
39 #:use-module (gnu packages qt)
40 #:use-module (gnu packages tls)
41 #:use-module (gnu packages xorg)
42 #:use-module (srfi srfi-26))
43
44(define-public synergy
45 (package
46 (name "synergy")
47 (version "1.11.1")
48 (source
49 (origin
50 (method git-fetch)
51 (uri (git-reference
52 (url "https://github.com/symless/synergy-core")
53 (commit (string-append "v" version "-stable"))))
54 (file-name (git-file-name name version))
55 (sha256
56 (base32
57 "0dn0h3mdqy0mbg4yyhsh4rhvvsssqlknnln3naplc97my10lk2a0"))
58 (modules '((guix build utils)))
59 (snippet
60 ;; Remove unnecessary bundled source and binaries
61 '(begin
62 (delete-file-recursively "ext/openssl")
63 #t))))
64 (build-system qt-build-system)
65 (arguments
66 `(#:tests? #f ; there is no test target
67 #:phases
68 (modify-phases %standard-phases
69 (add-after 'unpack 'fix-headers
70 (lambda* (#:key inputs #:allow-other-keys)
71 (setenv "CPLUS_INCLUDE_PATH"
72 (string-append (assoc-ref inputs "avahi")
73 "/include/avahi-compat-libdns_sd:"
74 (or (getenv "CPLUS_INCLUDE_PATH") "")))
75 #t))
76 (add-after 'install 'patch-desktop
77 (lambda* (#:key outputs #:allow-other-keys)
78 (let ((out (assoc-ref outputs "out")))
79 (substitute* (string-append out "/share/applications/synergy.desktop")
80 (("/usr") out))
81 #t))))))
82 (native-inputs
83 (list qttools-5)) ; for Qt5LinguistTools
84 (inputs
85 `(("avahi" ,avahi)
86 ("python" ,python-wrapper)
87 ("openssl" ,openssl)
88 ("curl" ,curl)
89 ("libxi" ,libxi)
90 ("libx11" ,libx11)
91 ("libxtst" ,libxtst)
92 ("qtbase" ,qtbase-5)
93 ("qtwayland" ,qtwayland-5)))
94 (home-page "https://symless.com/synergy")
95 (synopsis "Mouse and keyboard sharing utility")
96 (description
97 "Synergy brings your computers together in one cohesive experience; it's
98software for sharing one mouse and keyboard between multiple computers on your
99desk.")
100 (license gpl2)))
101
102(define-public waynergy
103 (package
104 (name "waynergy")
105 (version "0.0.17")
106 (source (origin
107 (method git-fetch)
108 (uri (git-reference
109 (url "https://github.com/r-c-f/waynergy.git")
110 (commit (string-append "v" version))))
111 (file-name (git-file-name name version))
112 (sha256
113 (base32
114 "130h1y68c230fj1c4srsvj8b9d4b8b6lipmi9bpx094axzl5c2kk"))))
115 (build-system meson-build-system)
116 (arguments
117 (list #:phases
118 #~(modify-phases %standard-phases
119 (add-after 'unpack 'patch
120 (lambda* (#:key inputs outputs #:allow-other-keys)
121 (let ((wl-clipboard (assoc-ref inputs "wl-clipboard"))
122 (procps (assoc-ref inputs "procps"))
123 (out (assoc-ref outputs "out")))
124 (substitute* "waynergy.desktop"
125 (("Exec=/usr/bin/waynergy")
126 (string-append "Exec=" out "/bin/waynergy")))
127 (substitute* "src/clip.c"
128 (("\"wl-paste\"")
129 (string-append "\"" wl-clipboard "/bin/wl-paste\""))
130 (("\"wl-copy\"")
131 (string-append "\"" wl-clipboard "/bin/wl-copy\""))
132 (("\"waynergy-clip-update\"")
133 (string-append "\"" out
134 "/bin/waynergy-clip-update\""))
135 (("\"pkill -f 'wlpaste")
136 (string-append "\"" procps
137 "/bin/pkill -f 'wl-paste")))))))))
138 (native-inputs
139 (list pkg-config))
140 (inputs
141 (list libxkbcommon libressl wl-clipboard wayland wl-clipboard procps))
142 (synopsis "Mouse and keyboard sharing utility for Wayland")
143 (description "Synergy brings your computers together in one cohesive experience; it's
144software for sharing one mouse and keyboard between multiple computers on your
145desk. This package is a Wayland version of Synergy, mostly for wlroots.")
146 (home-page "https://github.com/r-c-f/waynergy")
147 (license expat)))