gnu: Simplify package inputs.
[jackhill/guix/guix.git] / gnu / packages / accessibility.scm
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>
7 ;;;
8 ;;; This file is part of GNU Guix.
9 ;;;
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.
14 ;;;
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.
19 ;;;
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/>.
22
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))
59
60 (define-public libbraille
61 (package
62 (name "libbraille")
63 (version "0.19.0")
64 (source
65 (origin
66 (method url-fetch)
67 (uri
68 (string-append "https://sourceforge.net/projects/" name "/files/" name "/"
69 name "-" version "/" name "-" version ".tar.gz"))
70 (sha256
71 (base32 "05g8r0ypazqn10i7k48iibs8bzc3scdfcnhcykab8j16lhzd27d0"))))
72 (build-system glib-or-gtk-build-system)
73 (outputs '("out" "bin"))
74 (arguments
75 `(#:tests? #f ; Tests require drivers
76 #:configure-flags
77 (list
78 "--disable-static"
79 "--enable-fake")))
80 (native-inputs
81 `(("latex2html" ,latex2html)
82 ("pkg-config" ,pkg-config)
83 ("python" ,python-wrapper)
84 ("swig" ,swig)))
85 (inputs
86 `(("glib" ,glib)
87 ("gtk+" ,gtk+-2)
88 ("libusb" ,libusb-compat)))
89 (synopsis "Portable Braille Library")
90 (description "Libbraille is a library to easily access Braille displays and
91 terminals.")
92 (home-page "https://libbraille.org")
93 (license license:lgpl2.1+)))
94
95 (define-public brltty
96 (package
97 (name "brltty")
98 (version "6.2")
99 (source
100 (origin
101 (method url-fetch)
102 (uri
103 (string-append "https://brltty.app/archive/brltty-" version ".tar.gz"))
104 (sha256
105 (base32 "0m0cq3p1cwp52n81si621gij82w3mdqwgr39m6bs652pmk5na72l"))))
106 (build-system glib-or-gtk-build-system)
107 (arguments
108 `(#:tests? #f ; No target
109 #:configure-flags
110 (list
111 (string-append "--with-tcl-config="
112 (assoc-ref %build-inputs "tcl")
113 "/lib/tclConfig.sh")
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")
125 "/lib"))
126 #:make-flags
127 (list
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")
134 "/lib")
135 (string-append "PYTHON_PREFIX="
136 (assoc-ref %outputs "out"))
137 "PYTHON_ROOT=/"
138 (string-append "TCL_DIR="
139 (assoc-ref %outputs "out")
140 "/lib")
141 "INSTALL_WRITABLE_DIRECTORY=no-thanks")
142 #:phases
143 (modify-phases %standard-phases
144 (add-after 'unpack 'fix-errors
145 (lambda* (#:key outputs #:allow-other-keys)
146 (substitute* "configure"
147 (("/sbin/ldconfig")
148 (which "true")))
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")
154 "/lib'], "
155 "extra_compile_args = ")))
156 #t)))))
157 (native-inputs
158 `(("clisp" ,clisp)
159 ("cython" ,python-cython)
160 ("doxygen" ,doxygen)
161 ("gettext" ,gettext-minimal)
162 ("java" ,icedtea "jdk")
163 ;; ("linuxdoc" ,linuxdoc-tools)
164 ("ocaml" ,ocaml)
165 ("ocamlfind" ,ocaml-findlib)
166 ("pkg-config" ,pkg-config)
167 ("python" ,python-wrapper)
168 ("tcl" ,tcl)))
169 (inputs
170 `(("alsa" ,alsa-lib)
171 ("atspi2" ,at-spi2-core)
172 ("bluez" ,bluez)
173 ("dbus" ,dbus)
174 ("espeak" ,espeak)
175 ("espeak-ng" ,espeak-ng)
176 ("expat" ,expat)
177 ("festival" ,festival)
178 ("flite" ,flite)
179 ("glib" ,glib)
180 ("gpm" ,gpm)
181 ("iconv" ,libiconv)
182 ("icu" ,icu4c)
183 ("libbraille" ,libbraille)
184 ("libpcre2" ,pcre2)
185 ("linux-headers" ,linux-libre-headers)
186 ("louis" ,liblouis)
187 ("ncurses" ,ncurses)
188 ("polkit" ,polkit)
189 ("speech-dispatcher" ,speech-dispatcher)
190 ("util-linux" ,util-linux)
191 ("util-linux:lib" ,util-linux "lib")
192 ("x11" ,libx11)
193 ("xaw" ,libxaw)
194 ("xaw3d" ,libxaw3d)
195 ("xext" ,libxext)
196 ("xfixes" ,libxfixes)
197 ("xt" ,libxt)
198 ("xtst" ,libxtst)))
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
204 incorporated.")
205 (home-page "https://brltty.app/")
206 (license license:lgpl2.1+)))
207
208 (define-public florence
209 (package
210 (name "florence")
211 (version "0.6.3")
212 (source
213 (origin
214 (method url-fetch)
215 (uri (string-append "mirror://sourceforge/florence/florence/" version
216 "/florence-" version ".tar.bz2"))
217 (sha256
218 (base32
219 "07h9qm22krlwayhzvc391lr23vicw81s48g7rirvx1fj0zyr4aa2"))))
220 (build-system glib-or-gtk-build-system)
221 (arguments
222 `(#:configure-flags (list "--with-xtst"
223 "--without-docs"
224 "--with-notification")))
225 (inputs
226 (list libxml2
227 libglade
228 librsvg
229 gstreamer
230 cairo
231 gtk+
232 libxtst
233 libxcomposite
234 libnotify))
235 (native-inputs
236 (list gettext-minimal intltool pkg-config))
237 (home-page "http://florence.sourceforge.net/")
238 (synopsis "Extensible, scalable virtual keyboard for X11")
239 (description
240 "Florence is an extensible scalable virtual keyboard for X11.
241 It is useful for people who can't use a real hardware keyboard (for
242 example for people with disabilities), but you must be able to use
243 a pointing device (as a mouse, a trackball, a touchscreen or opengazer).
244
245 Florence stays out of your way when you don't need it: it appears on the
246 screen only when you need it. A timer-based auto-click input method is
247 available to help to click.")
248 ;; The documentation is under FDL1.2, but we do not install the
249 ;; documentation.
250 (license license:gpl2+)))
251
252 (define-public footswitch
253 (let ((commit "ca43d53fc2002520cc825d119702afc124303e73")
254 (revision "2"))
255 (package
256 (name "footswitch")
257 (version (git-version "0.1" revision commit))
258 (source (origin
259 (method git-fetch)
260 (uri (git-reference
261 (url "https://github.com/rgerganov/footswitch")
262 (commit commit)))
263 (file-name (git-file-name name version))
264 (sha256
265 (base32
266 "14pyzc4ws1mj859xs9n4x83wzxxvd3bh5bdxzr6nv267xwx1mq68"))))
267 (build-system gnu-build-system)
268 (native-inputs
269 (list pkg-config))
270 (inputs
271 (list hidapi))
272 (arguments
273 `(#:tests? #f ; no tests
274 #:make-flags (list (string-append "CC=" ,(cc-for-target)))
275 #:phases (modify-phases %standard-phases
276 (delete 'configure)
277 ;; Install target in the Makefile does not work for Guix
278 (replace 'install
279 (lambda* (#:key outputs #:allow-other-keys)
280 (let ((bin (string-append (assoc-ref outputs "out")
281 "/bin")))
282 (install-file "footswitch" bin)
283 (install-file "scythe" bin)
284 #t))))))
285 (home-page "https://github.com/rgerganov/footswitch")
286 (synopsis "Command line utility for PCsensor foot switch")
287 (description
288 "Command line utility for programming foot switches sold by PCsensor.
289 It works for both single pedal devices and three pedal devices. All supported
290 devices have vendorId:productId = 0c45:7403 or 0c45:7404.")
291 (license license:expat))))
292
293 (define-public xmagnify
294 (package
295 (name "xmagnify")
296 (version "0.1.0")
297 (source (origin
298 (method git-fetch)
299 (uri (git-reference
300 (url "https://gitlab.com/amiloradovsky/magnify.git")
301 (commit version)))
302 (file-name (git-file-name name version))
303 (sha256
304 (base32
305 "1ngnp5f5zl3v35vhbdyjpymy6mwrs0476fm5nd7dzkba7n841jdh"))))
306 (build-system gnu-build-system)
307 (arguments
308 `(#:tests? #f ; none included
309 #:make-flags
310 (list (string-append "CC=" ,(cc-for-target))
311 (string-append "prefix=" (assoc-ref %outputs "out")))
312 #:phases
313 (modify-phases %standard-phases
314 (delete 'configure))))
315 (inputs
316 `(("libX11" ,libx11)))
317 (home-page "https://gitlab.com/amiloradovsky/magnify")
318 (synopsis "Tiny screen magnifier for X11")
319 (description
320 "This program magnifies a screen region by an integer positive factor and
321 draws the result on a window. It is useful as an accessibility tool, which
322 works with every X Window System based GUI (depends only on libX11); or as an
323 assistant for graphic designers, who need to select individual pixels.")
324 ;; Licensed either under Expat or GPLv2+.
325 (license (list license:expat license:gpl2+))))