projects/guix·blob ruby-team · refs

387 lines · 14.0 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2017 Nikita <[email protected]>
3;;; Copyright © 2017 Stefan Reichör <[email protected]>
4;;; Copyright © 2018, 2021, 2022 Tobias Geerinckx-Rice <[email protected]>
5;;; Copyright © 2019 Andrew Miloradovsky <[email protected]>
6;;; Copyright © 2020, 2023, 2024 Efraim Flashner <[email protected]>
7;;; Copyright © 2022 Hunter Jozwiak <[email protected]>
8;;; Copyright © 2023 Ivan Gankevich <[email protected]>
9;;; Copyright © 2025 Janneke Nieuwenhuizen <[email protected]>
10;;;
11;;; This file is part of GNU Guix.
12;;;
13;;; GNU Guix is free software; you can redistribute it and/or modify it
14;;; under the terms of the GNU General Public License as published by
15;;; the Free Software Foundation; either version 3 of the License, or (at
16;;; your option) any later version.
17;;;
18;;; GNU Guix is distributed in the hope that it will be useful, but
19;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21;;; GNU General Public License for more details.
22;;;
23;;; You should have received a copy of the GNU General Public License
24;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25
26(define-module (gnu packages accessibility)
27 #:use-module ((guix licenses) #:prefix license:)
28 #:use-module (guix gexp)
29 #:use-module (guix utils)
30 #:use-module (guix packages)
31 #:use-module (guix download)
32 #:use-module (guix git-download)
33 #:use-module (guix build-system gnu)
34 #:use-module (guix build-system glib-or-gtk)
35 #:use-module (guix build-system pyproject)
36 #:use-module (guix build-system meson)
37 #:use-module (gnu packages)
38 #:use-module (gnu packages autotools)
39 #:use-module (gnu packages lisp)
40 #:use-module (gnu packages ocaml)
41 #:use-module (gnu packages pcre)
42 #:use-module (gnu packages polkit)
43 #:use-module (gnu packages ncurses)
44 #:use-module (gnu packages music)
45 #:use-module (gnu packages language)
46 #:use-module (gnu packages icu4c)
47 #:use-module (gnu packages speech)
48 #:use-module (gnu packages linux)
49 #:use-module (gnu packages documentation)
50 #:use-module (gnu packages swig)
51 #:use-module (gnu packages libusb)
52 #:use-module (gnu packages java)
53 #:use-module (gnu packages python)
54 #:use-module (gnu packages python-build)
55 #:use-module (gnu packages python-xyz)
56 #:use-module (gnu packages tcl)
57 #:use-module (gnu packages xml)
58 #:use-module (gnu packages gnome)
59 #:use-module (gnu packages gstreamer)
60 #:use-module (gnu packages gtk)
61 #:use-module (gnu packages xorg)
62 #:use-module (gnu packages gettext)
63 #:use-module (gnu packages glib)
64 #:use-module (gnu packages pkg-config)
65 #:use-module (gnu packages libusb))
66
67(define-public libbraille
68 (package
69 (name "libbraille")
70 (version "0.19.0")
71 (source
72 (origin
73 (method url-fetch)
74 (uri
75 (string-append "https://sourceforge.net/projects/" name "/files/" name "/"
76 name "-" version "/" name "-" version ".tar.gz"))
77 (sha256
78 (base32 "05g8r0ypazqn10i7k48iibs8bzc3scdfcnhcykab8j16lhzd27d0"))))
79 (build-system glib-or-gtk-build-system)
80 (outputs '("out" "bin"))
81 (arguments
82 (list
83 #:tests? #f ; Tests require drivers
84 #:configure-flags
85 #~(list "CFLAGS=-g -O2 -Wno-error=incompatible-pointer-types"
86 "--disable-static"
87 "--enable-fake")
88 #:phases
89 #~(modify-phases %standard-phases
90 #$@(if (this-package-native-input "config")
91 #~((add-after 'unpack 'update-config-scripts
92 (lambda* (#:key native-inputs inputs #:allow-other-keys)
93 (for-each
94 (lambda (dir)
95 (for-each
96 (lambda (file)
97 (install-file
98 (search-input-file
99 (or native-inputs inputs)
100 (string-append "/bin/" file)) dir))
101 (list "config.guess" "config.sub")))
102 (list "." "libltdl")))))
103 (list)))))
104 (native-inputs
105 (append
106 (if (or (target-aarch64?)
107 (target-ppc64le?)
108 (target-riscv64?))
109 (list config)
110 (list))
111 (list latex2html
112 pkg-config
113 python-wrapper
114 swig-4.4)))
115 (inputs
116 (list glib
117 gtk+-2
118 libusb-compat))
119 (synopsis "Portable Braille Library")
120 (description "Libbraille is a library to easily access Braille displays and
121terminals.")
122 (home-page "https://libbraille.org")
123 (license license:lgpl2.1+)))
124
125(define-public brltty
126 (package
127 (name "brltty")
128 (version "6.6")
129 (source
130 (origin
131 (method url-fetch)
132 (uri
133 (string-append "https://brltty.app/archive/brltty-" version ".tar.gz"))
134 (sha256
135 (base32 "1z54rin4zhg3294pq47gamzjy2c56zfkl07rx2qy2khlpyczds0k"))))
136 (build-system glib-or-gtk-build-system)
137 (arguments
138 (list
139 #:tests? #f ; no target
140 ;; High parallelism may cause errors such as:
141 ;; ranlib: ./libbrlapi_stubs.a: error reading brlapi_stubs.o: file truncated
142 #:parallel-build? #f
143 #:configure-flags
144 #~(list
145 (string-append "--with-libbraille="
146 #$(this-package-input "libbraille"))
147 (string-append "--with-espeak_ng="
148 #$(this-package-input "espeak-ng"))
149 (string-append "--with-espeak="
150 #$(this-package-input "espeak"))
151 (string-append "--with-flite="
152 #$(this-package-input "flite"))
153 ;; Required for RUNPATH validation.
154 (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib"))
155 #:make-flags
156 #~(list
157 (string-append "JAVA_JAR_DIR=" #$output)
158 (string-append "JAVA_JNI_DIR=" #$output)
159 (string-append "OCAML_DESTDIR=" #$output "/lib")
160 (string-append "PYTHON_PREFIX=" #$output)
161 "PYTHON_ROOT=/"
162 (string-append "TCL_DIR=" #$output "/lib")
163 "INSTALL_WRITABLE_DIRECTORY=no-thanks")
164 #:imported-modules (append %glib-or-gtk-build-system-modules
165 %pyproject-build-system-modules)
166 #:modules '((guix build utils)
167 (guix build glib-or-gtk-build-system)
168 ((guix build pyproject-build-system) #:prefix python:))
169 #:phases
170 #~(modify-phases %standard-phases
171 (add-after 'unpack 'fix-errors
172 (lambda _
173 (substitute* "configure"
174 (("/sbin/ldconfig")
175 (which "true")))
176 ;; Make Python bindings use rpath.
177 (substitute* "Bindings/Python/setup.py.in"
178 (("extra_compile_args =")
179 (string-append "extra_link_args = ['-Wl,-rpath="
180 #$output
181 "/lib'], "
182 "extra_compile_args = ")))))
183 (add-before 'install 'set-pythonpath
184 (assoc-ref python:%standard-phases
185 'add-install-to-pythonpath)))))
186 (native-inputs
187 (append
188 (list clisp
189 ;; See: <https://bugzilla.redhat.com/show_bug.cgi?id=2231865>.
190 python-cython
191 python-setuptools ;remove with next update
192 doxygen
193 gettext-minimal)
194 ;; icedtea doesn't build reliably on all architectures.
195 (if (or (target-x86?)
196 (target-aarch64?))
197 (list `(,icedtea "jdk"))
198 '())
199 (list ;; ("linuxdoc" ,linuxdoc-tools)
200 ocaml
201 ocaml-findlib
202 pkg-config
203 python-wrapper
204 tcl)))
205 (inputs
206 (list alsa-lib
207 at-spi2-core
208 bluez
209 dbus
210 espeak
211 espeak-ng
212 expat
213 festival
214 flite
215 glib
216 gpm
217 icu4c
218 libbraille
219 pcre2
220 liblouis
221 ncurses
222 polkit
223 speech-dispatcher
224 util-linux
225 `(,util-linux "lib")
226 libx11
227 libxaw
228 libxaw3d
229 libxext
230 libxfixes
231 libxt
232 libxtst))
233 (synopsis "Braille TTY")
234 (description "BRLTTY is a background process (daemon) which provides access
235to the Linux/Unix console (when in text mode) for a blind person using a
236refreshable braille display. It drives the braille display, and provides
237complete screen review functionality. Some speech capability has also been
238incorporated.")
239 (home-page "https://brltty.app/")
240 (license license:lgpl2.1+)))
241
242(define-public footswitch
243 (let ((commit "e455d6752221b9e9c3818cc304c873b9c2792490")
244 (revision "0"))
245 (package
246 (name "footswitch")
247 (version (git-version "1.0" revision commit))
248 (source (origin
249 (method git-fetch)
250 (uri (git-reference
251 (url "https://github.com/rgerganov/footswitch")
252 (commit commit)))
253 (file-name (git-file-name name version))
254 (sha256
255 (base32
256 "0xkk60sg3szpgbl3z8djlpagglsldv9viqibsih6wcnbhikzlc6j"))))
257 (build-system gnu-build-system)
258 (arguments
259 (list
260 #:tests? #f ; no tests
261 #:make-flags #~(list (string-append "CC=" #$(cc-for-target)))
262 #:phases
263 #~(modify-phases %standard-phases
264 (delete 'configure)
265 ;; Install target in the Makefile does not work for Guix.
266 (replace 'install
267 (lambda _
268 (let ((bin (string-append #$output "/bin")))
269 (install-file "footswitch" bin)
270 (install-file "scythe" bin)))))))
271 (native-inputs
272 (list pkg-config))
273 (inputs
274 (list hidapi))
275 (home-page "https://github.com/rgerganov/footswitch")
276 (synopsis "Command line utilities for PCsensor and Scythe foot switches")
277 (description
278 "This package provides command line utilities for programming PCsensor
279and Scythe foot switches. It works for both single pedal and three pedal
280devices.")
281 (license license:expat))))
282
283(define-public xmagnify
284 (package
285 (name "xmagnify")
286 (version "0.1.0")
287 (source (origin
288 (method git-fetch)
289 (uri (git-reference
290 (url "https://gitlab.com/amiloradovsky/magnify.git")
291 (commit version)))
292 (file-name (git-file-name name version))
293 (sha256
294 (base32
295 "1ngnp5f5zl3v35vhbdyjpymy6mwrs0476fm5nd7dzkba7n841jdh"))))
296 (build-system gnu-build-system)
297 (arguments
298 `(#:tests? #f ; none included
299 #:make-flags
300 (list (string-append "CC=" ,(cc-for-target))
301 (string-append "prefix=" (assoc-ref %outputs "out")))
302 #:phases
303 (modify-phases %standard-phases
304 (delete 'configure))))
305 (inputs
306 (list libx11))
307 (home-page "https://gitlab.com/amiloradovsky/magnify")
308 (synopsis "Tiny screen magnifier for X11")
309 (description
310 "This program magnifies a screen region by an integer positive factor and
311draws the result on a window. It is useful as an accessibility tool, which
312works with every X Window System based GUI (depends only on libX11); or as an
313assistant for graphic designers, who need to select individual pixels.")
314 ;; Licensed either under Expat or GPLv2+.
315 (license (list license:expat license:gpl2+))))
316
317(define-public espeakup
318 (package
319 (name "espeakup")
320 (version "0.90")
321 (source (origin
322 (method git-fetch)
323 (uri (git-reference
324 (url "https://github.com/linux-speakup/espeakup")
325 (commit (string-append "v" version))))
326 (file-name (git-file-name name version))
327 (sha256
328 (base32
329 "0lmjwafvfxy07zn18v3dzjwwpnid2xffgvy2dzlwkbns8gb60ds2"))))
330 (build-system meson-build-system)
331 (native-inputs (list pkg-config))
332 (inputs (list espeak-ng alsa-lib))
333 (license license:gpl3+)
334 (synopsis "Bridge for espeak and speakup")
335 (description
336 "Espeakup is a bridge between the speakup driver implemented in
337the Linux kernel and the espeak-ng text to speech synthesizer.
338In order for this package to work, you need to have the following
339kernel modules built:
340@itemize @bullet
341@item
342CONFIG_SPEAKUP=m
343@item
344CONFIG_SPEAKUP_SOFT=m
345@end itemize")
346 (home-page "https://github.com/linux-speakup/espeakup")))
347
348(define-public mouseloupe
349 (package
350 (name "mouseloupe")
351 (version "0.6")
352 (source
353 (origin
354 (method url-fetch)
355 (uri (string-append "mirror://sourceforge/" name "/" name "/v" version
356 "/" name "-v" version ".tar.gz"))
357 (sha256
358 (base32 "0cvdkfakw7cix07j0c4iy10fkbqn6n8l1gr5dd3iy4f2d9bkza43"))
359 (snippet
360 #~(begin (use-modules (guix build utils))
361 (substitute* "Makefile"
362 (("-D__i386__") ""))))))
363 (build-system gnu-build-system)
364 (arguments
365 (list
366 #:tests? #f ; there are no tests
367 #:phases
368 #~(modify-phases %standard-phases
369 (delete 'configure)
370 (add-before 'build 'strtof
371 (lambda _
372 (substitute* "mouseloupe.c"
373 (("\\bstrtof\\b") "mouseloupe_strtof"))))
374 (replace 'install
375 (lambda _
376 (install-file "mouseloupe" (string-append #$output "/bin"))
377 (install-file "mouseloupe.1.gz"
378 (string-append #$output "/share/man/man1")))))))
379 (native-inputs
380 (list pkg-config))
381 (inputs
382 (list libx11 libxext libxcomposite libxdamage libxrender))
383 (synopsis "Screen magnifier tool for people with low vision")
384 (description "MouseLoupe is a kind of magnifying glass combined with the
385mouse pointer which allows an easy and pleasant web navigation.")
386 (home-page "https://sourceforge.net/projects/mouseloupe/")
387 (license license:gpl2+)))