1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2017 Nikita <nikita@n0.is>
3 ;;; Copyright © 2017 Stefan Reichör <stefan@xsteve.at>
4 ;;; Copyright © 2018, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
5 ;;; Copyright © 2019 Andrew Miloradovsky <andrew@interpretmath.pw>
6 ;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
8 ;;; This file is part of GNU Guix.
10 ;;; GNU Guix is free software; you can redistribute it and/or modify it
11 ;;; under the terms of the GNU General Public License as published by
12 ;;; the Free Software Foundation; either version 3 of the License, or (at
13 ;;; your option) any later version.
15 ;;; GNU Guix is distributed in the hope that it will be useful, but
16 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;;; GNU General Public License for more details.
20 ;;; You should have received a copy of the GNU General Public License
21 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23 (define-module (gnu packages accessibility)
24 #:use-module ((guix licenses) #:prefix license:)
25 #:use-module (guix utils)
26 #:use-module (guix packages)
27 #:use-module (guix download)
28 #:use-module (guix git-download)
29 #:use-module (guix build-system gnu)
30 #:use-module (guix build-system glib-or-gtk)
31 #:use-module (gnu packages)
32 #:use-module (gnu packages lisp)
33 #:use-module (gnu packages base)
34 #:use-module (gnu packages ocaml)
35 #:use-module (gnu packages pcre)
36 #:use-module (gnu packages polkit)
37 #:use-module (gnu packages ncurses)
38 #:use-module (gnu packages music)
39 #:use-module (gnu packages language)
40 #:use-module (gnu packages icu4c)
41 #:use-module (gnu packages speech)
42 #:use-module (gnu packages linux)
43 #:use-module (gnu packages documentation)
44 #:use-module (gnu packages swig)
45 #:use-module (gnu packages libusb)
46 #:use-module (gnu packages java)
47 #:use-module (gnu packages python)
48 #:use-module (gnu packages python-xyz)
49 #:use-module (gnu packages tcl)
50 #:use-module (gnu packages xml)
51 #:use-module (gnu packages gnome)
52 #:use-module (gnu packages gstreamer)
53 #:use-module (gnu packages gtk)
54 #:use-module (gnu packages xorg)
55 #:use-module (gnu packages gettext)
56 #:use-module (gnu packages glib)
57 #:use-module (gnu packages pkg-config)
58 #:use-module (gnu packages libusb))
60 (define-public libbraille
68 (string-append "https://sourceforge.net/projects/" name "/files/" name "/"
69 name "-" version "/" name "-" version ".tar.gz"))
71 (base32 "05g8r0ypazqn10i7k48iibs8bzc3scdfcnhcykab8j16lhzd27d0"))))
72 (build-system glib-or-gtk-build-system)
73 (outputs '("out" "bin"))
75 `(#:tests? #f ; Tests require drivers
81 `(("latex2html" ,latex2html)
82 ("pkg-config" ,pkg-config)
83 ("python" ,python-wrapper)
88 ("libusb" ,libusb-compat)))
89 (synopsis "Portable Braille Library")
90 (description "Libbraille is a library to easily access Braille displays and
92 (home-page "https://libbraille.org")
93 (license license:lgpl2.1+)))
103 (string-append "https://brltty.app/archive/brltty-" version ".tar.gz"))
105 (base32 "0m0cq3p1cwp52n81si621gij82w3mdqwgr39m6bs652pmk5na72l"))))
106 (build-system glib-or-gtk-build-system)
108 `(#:tests? #f ; No target
111 (string-append "--with-tcl-config="
112 (assoc-ref %build-inputs "tcl")
114 (string-append "--with-libbraille="
115 (assoc-ref %build-inputs "libbraille"))
116 (string-append "--with-espeak_ng="
117 (assoc-ref %build-inputs "espeak-ng"))
118 (string-append "--with-espeak="
119 (assoc-ref %build-inputs "espeak"))
120 (string-append "--with-flite="
121 (assoc-ref %build-inputs "flite"))
122 ;; Required for RUNPATH validation.
123 (string-append "LDFLAGS=-Wl,-rpath="
124 (assoc-ref %outputs "out")
128 (string-append "JAVA_JAR_DIR="
129 (assoc-ref %outputs "out"))
130 (string-append "JAVA_JNI_DIR="
131 (assoc-ref %outputs "out"))
132 (string-append "OCAML_DESTDIR="
133 (assoc-ref %outputs "out")
135 (string-append "PYTHON_PREFIX="
136 (assoc-ref %outputs "out"))
138 (string-append "TCL_DIR="
139 (assoc-ref %outputs "out")
141 "INSTALL_WRITABLE_DIRECTORY=no-thanks")
143 (modify-phases %standard-phases
144 (add-after 'unpack 'fix-errors
145 (lambda* (#:key outputs #:allow-other-keys)
146 (substitute* "configure"
149 ;; Make Python bindings use rpath.
150 (substitute* "Bindings/Python/setup.py.in"
151 (("extra_compile_args =")
152 (string-append "extra_link_args = ['-Wl,-rpath="
153 (assoc-ref outputs "out")
155 "extra_compile_args = ")))
159 ("cython" ,python-cython)
161 ("gettext" ,gettext-minimal)
162 ("java" ,icedtea "jdk")
163 ;; ("linuxdoc" ,linuxdoc-tools)
165 ("ocamlfind" ,ocaml-findlib)
166 ("pkg-config" ,pkg-config)
167 ("python" ,python-wrapper)
171 ("atspi2" ,at-spi2-core)
175 ("espeak-ng" ,espeak-ng)
177 ("festival" ,festival)
183 ("libbraille" ,libbraille)
185 ("linux-headers" ,linux-libre-headers)
189 ("speech-dispatcher" ,speech-dispatcher)
190 ("util-linux" ,util-linux)
191 ("util-linux:lib" ,util-linux "lib")
196 ("xfixes" ,libxfixes)
199 (synopsis "Braille TTY")
200 (description "BRLTTY is a background process (daemon) which provides access
201 to the Linux/Unix console (when in text mode) for a blind person using a
202 refreshable braille display. It drives the braille display, and provides
203 complete screen review functionality. Some speech capability has also been
205 (home-page "https://brltty.app/")
206 (license license:lgpl2.1+)))
208 (define-public florence
215 (uri (string-append "mirror://sourceforge/florence/florence/" version
216 "/florence-" version ".tar.bz2"))
219 "07h9qm22krlwayhzvc391lr23vicw81s48g7rirvx1fj0zyr4aa2"))))
220 (build-system glib-or-gtk-build-system)
222 `(#:configure-flags (list "--with-xtst"
224 "--with-notification")))
226 `(("libxml2" ,libxml2)
227 ("libglade" ,libglade)
229 ("gstreamer" ,gstreamer)
233 ("libxcomposite" ,libxcomposite)
234 ("libnotify" ,libnotify)))
236 `(("gettext-minimal" ,gettext-minimal)
237 ("intltool" ,intltool)
238 ("pkg-config" ,pkg-config)))
239 (home-page "http://florence.sourceforge.net/")
240 (synopsis "Extensible, scalable virtual keyboard for X11")
242 "Florence is an extensible scalable virtual keyboard for X11.
243 It is useful for people who can't use a real hardware keyboard (for
244 example for people with disabilities), but you must be able to use
245 a pointing device (as a mouse, a trackball, a touchscreen or opengazer).
247 Florence stays out of your way when you don't need it: it appears on the
248 screen only when you need it. A timer-based auto-click input method is
249 available to help to click.")
250 ;; The documentation is under FDL1.2, but we do not install the
252 (license license:gpl2+)))
254 (define-public footswitch
255 (let ((commit "ca43d53fc2002520cc825d119702afc124303e73")
259 (version (git-version "0.1" revision commit))
263 (url "https://github.com/rgerganov/footswitch")
265 (file-name (git-file-name name version))
268 "14pyzc4ws1mj859xs9n4x83wzxxvd3bh5bdxzr6nv267xwx1mq68"))))
269 (build-system gnu-build-system)
271 `(("pkg-config" ,pkg-config)))
273 `(("hidapi" ,hidapi)))
275 `(#:tests? #f ; no tests
276 #:make-flags (list (string-append "CC=" ,(cc-for-target)))
277 #:phases (modify-phases %standard-phases
279 ;; Install target in the Makefile does not work for Guix
281 (lambda* (#:key outputs #:allow-other-keys)
282 (let ((bin (string-append (assoc-ref outputs "out")
284 (install-file "footswitch" bin)
285 (install-file "scythe" bin)
287 (home-page "https://github.com/rgerganov/footswitch")
288 (synopsis "Command line utility for PCsensor foot switch")
290 "Command line utility for programming foot switches sold by PCsensor.
291 It works for both single pedal devices and three pedal devices. All supported
292 devices have vendorId:productId = 0c45:7403 or 0c45:7404.")
293 (license license:expat))))
295 (define-public xmagnify
302 (url "https://gitlab.com/amiloradovsky/magnify.git")
304 (file-name (git-file-name name version))
307 "1ngnp5f5zl3v35vhbdyjpymy6mwrs0476fm5nd7dzkba7n841jdh"))))
308 (build-system gnu-build-system)
310 `(#:tests? #f ; none included
312 (list (string-append "CC=" ,(cc-for-target))
313 (string-append "prefix=" (assoc-ref %outputs "out")))
315 (modify-phases %standard-phases
316 (delete 'configure))))
318 `(("libX11" ,libx11)))
319 (home-page "https://gitlab.com/amiloradovsky/magnify")
320 (synopsis "Tiny screen magnifier for X11")
322 "This program magnifies a screen region by an integer positive factor and
323 draws the result on a window. It is useful as an accessibility tool, which
324 works with every X Window System based GUI (depends only on libX11); or as an
325 assistant for graphic designers, who need to select individual pixels.")
326 ;; Licensed either under Expat or GPLv2+.
327 (license (list license:expat license:gpl2+))))