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 Tobias Geerinckx-Rice <me@tobias.gr>
5 ;;; Copyright © 2019 Andrew Miloradovsky <andrew@interpretmath.pw>
7 ;;; This file is part of GNU Guix.
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.
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.
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/>.
22 (define-module (gnu packages accessibility)
23 #:use-module ((guix licenses) #:prefix license:)
24 #:use-module (guix utils)
25 #:use-module (guix packages)
26 #:use-module (guix download)
27 #:use-module (guix git-download)
28 #:use-module (guix build-system gnu)
29 #:use-module (guix build-system glib-or-gtk)
30 #:use-module (gnu packages)
31 #:use-module (gnu packages lisp)
32 #:use-module (gnu packages base)
33 #:use-module (gnu packages ocaml)
34 #:use-module (gnu packages pcre)
35 #:use-module (gnu packages polkit)
36 #:use-module (gnu packages ncurses)
37 #:use-module (gnu packages music)
38 #:use-module (gnu packages language)
39 #:use-module (gnu packages icu4c)
40 #:use-module (gnu packages speech)
41 #:use-module (gnu packages linux)
42 #:use-module (gnu packages documentation)
43 #:use-module (gnu packages swig)
44 #:use-module (gnu packages libusb)
45 #:use-module (gnu packages java)
46 #:use-module (gnu packages python)
47 #:use-module (gnu packages python-xyz)
48 #:use-module (gnu packages tcl)
49 #:use-module (gnu packages xml)
50 #:use-module (gnu packages gnome)
51 #:use-module (gnu packages gstreamer)
52 #:use-module (gnu packages gtk)
53 #:use-module (gnu packages xorg)
54 #:use-module (gnu packages gettext)
55 #:use-module (gnu packages glib)
56 #:use-module (gnu packages pkg-config)
57 #:use-module (gnu packages libusb))
59 (define-public libbraille
67 (string-append "https://sourceforge.net/projects/" name "/files/" name "/"
68 name "-" version "/" name "-" version ".tar.gz"))
70 (base32 "05g8r0ypazqn10i7k48iibs8bzc3scdfcnhcykab8j16lhzd27d0"))))
71 (build-system glib-or-gtk-build-system)
72 (outputs '("out" "bin"))
74 `(#:tests? #f ; Tests require drivers
80 `(("latex2html" ,latex2html)
81 ("pkg-config" ,pkg-config)
82 ("python" ,python-wrapper)
87 ("libusb" ,libusb-compat)))
88 (synopsis "Portable Braille Library")
89 (description "Libbraille is a library to easily access Braille displays and
91 (home-page "https://libbraille.org")
92 (license license:lgpl2.1+)))
102 (string-append "https://brltty.app/archive/"
103 name "-" version ".tar.gz"))
105 (base32 "0nk54chr7z2w579vyiak9xk2avhnvrx7x2l5sk8nyw2zplchkx9q"))))
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")
142 (modify-phases %standard-phases
143 (add-after 'unpack 'fix-errors
144 (lambda* (#:key outputs #:allow-other-keys)
145 (substitute* "configure"
148 ;; Make Python bindings use rpath.
149 (substitute* "Bindings/Python/setup.py.in"
150 (("extra_compile_args =")
151 (string-append "extra_link_args = ['-Wl,-rpath="
152 (assoc-ref outputs "out")
154 "extra_compile_args = ")))
158 ("cython" ,python-cython)
160 ("gettext" ,gettext-minimal)
161 ("java" ,icedtea "jdk")
162 ;; ("linuxdoc" ,linuxdoc-tools)
164 ("ocamlfind" ,ocaml-findlib)
165 ("pkg-config" ,pkg-config)
166 ("python" ,python-wrapper)
170 ("atspi2" ,at-spi2-core)
174 ("espeak-ng" ,espeak-ng)
176 ("festival" ,festival)
182 ("libbraille" ,libbraille)
184 ("linux-headers" ,linux-libre-headers)
188 ("speech-dispatcher" ,speech-dispatcher)
189 ("util-linux" ,util-linux)
190 ("util-linux:lib" ,util-linux "lib")
195 ("xfixes" ,libxfixes)
198 (synopsis "Braille TTY")
199 (description "BRLTTY is a background process (daemon) which provides access
200 to the Linux/Unix console (when in text mode) for a blind person using a
201 refreshable braille display. It drives the braille display, and provides
202 complete screen review functionality. Some speech capability has also been
204 (home-page "https://brltty.app/")
205 (license license:lgpl2.1+)))
207 (define-public florence
214 (uri (string-append "mirror://sourceforge/florence/florence/" version
215 "/florence-" version ".tar.bz2"))
218 "07h9qm22krlwayhzvc391lr23vicw81s48g7rirvx1fj0zyr4aa2"))))
219 (build-system glib-or-gtk-build-system)
221 `(#:configure-flags (list "--with-xtst"
223 "--with-notification")))
225 `(("libxml2" ,libxml2)
226 ("libglade" ,libglade)
228 ("gstreamer" ,gstreamer)
232 ("libxcomposite" ,libxcomposite)
233 ("libnotify" ,libnotify)))
235 `(("gettext-minimal" ,gettext-minimal)
236 ("intltool" ,intltool)
237 ("pkg-config" ,pkg-config)))
238 (home-page "http://florence.sourceforge.net/")
239 (synopsis "Extensible, scalable virtual keyboard for X11")
241 "Florence is an extensible scalable virtual keyboard for X11.
242 It is useful for people who can't use a real hardware keyboard (for
243 example for people with disabilities), but you must be able to use
244 a pointing device (as a mouse, a trackball, a touchscreen or opengazer).
246 Florence stays out of your way when you don't need it: it appears on the
247 screen only when you need it. A timer-based auto-click input method is
248 available to help to click.")
249 ;; The documentation is under FDL1.2, but we do not install the
251 (license license:gpl2+)))
253 (define-public footswitch
254 (let ((commit "ca43d53fc2002520cc825d119702afc124303e73")
258 (version (git-version "0.1" revision commit))
262 (url "https://github.com/rgerganov/footswitch")
264 (file-name (git-file-name name version))
267 "14pyzc4ws1mj859xs9n4x83wzxxvd3bh5bdxzr6nv267xwx1mq68"))))
268 (build-system gnu-build-system)
270 `(("pkg-config" ,pkg-config)))
272 `(("hidapi" ,hidapi)))
274 `(#:tests? #f ; no tests
275 #:make-flags (list "CC=gcc")
276 #:phases (modify-phases %standard-phases
278 ;; Install target in the Makefile does not work for Guix
280 (lambda* (#:key outputs #:allow-other-keys)
281 (let ((bin (string-append (assoc-ref outputs "out")
283 (install-file "footswitch" bin)
284 (install-file "scythe" bin)
286 (home-page "https://github.com/rgerganov/footswitch")
287 (synopsis "Command line utility for PCsensor foot switch")
289 "Command line utility for programming foot switches sold by PCsensor.
290 It works for both single pedal devices and three pedal devices. All supported
291 devices have vendorId:productId = 0c45:7403 or 0c45:7404.")
292 (license license:expat))))
294 (define-public xmagnify
301 (url "https://gitlab.com/amiloradovsky/magnify.git")
303 (file-name (git-file-name name version))
306 "1ngnp5f5zl3v35vhbdyjpymy6mwrs0476fm5nd7dzkba7n841jdh"))))
307 (build-system gnu-build-system)
309 `(#:tests? #f ; none included
312 (string-append "prefix=" (assoc-ref %outputs "out")))
314 (modify-phases %standard-phases
315 (delete 'configure))))
317 `(("libX11" ,libx11)))
318 (home-page "https://gitlab.com/amiloradovsky/magnify")
319 (synopsis "Tiny screen magnifier for X11")
321 "This program magnifies a screen region by an integer positive factor and
322 draws the result on a window. It is useful as an accessibility tool, which
323 works with every X Window System based GUI (depends only on libX11); or as an
324 assistant for graphic designers, who need to select individual pixels.")
325 ;; Licensed either under Expat or GPLv2+.
326 (license (list license:expat license:gpl2+))))