accessibility.scm 12 KB

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