projects/guix·blob javascript-team · refs

878 lines · 34.0 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2016 Danny Milosavljevic <[email protected]>
3;;; Copyright © 2016, 2017 Ricardo Wurmus <[email protected]>
4;;; Copyright © 2016 Hartmut Goebel <[email protected]>
5;;; Copyright © 2017-2023 Efraim Flashner <[email protected]>
6;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <[email protected]>
7;;; Copyright © 2018-2026 Nicolas Goaziou <[email protected]>
8;;; Copyright © 2020 Robert Smith <[email protected]>
9;;; Copyright © 2020 Guy Fleury Iteriteka <[email protected]>
10;;; Copyright © 2020 Jakub Kądziołka <[email protected]>
11;;; Copyright © 2020 Prafulla Giri <[email protected]>
12;;; Copyright © 2021 Nicolò Balzarotti <[email protected]>
13;;; Copyright © 2022 Luis Felipe López Acevedo <[email protected]>
14;;; Copyright © 2023 Maxim Cournoyer <[email protected]>
15;;; Copyright © 2024 Luis Higino <[email protected]>
16;;; Copyright © 2025 Andreas Enge <[email protected]>
17;;; Copyright © 2025 Arun Isaac <[email protected]>
18;;;
19;;; This file is part of GNU Guix.
20;;;
21;;; GNU Guix is free software; you can redistribute it and/or modify it
22;;; under the terms of the GNU General Public License as published by
23;;; the Free Software Foundation; either version 3 of the License, or (at
24;;; your option) any later version.
25;;;
26;;; GNU Guix is distributed in the hope that it will be useful, but
27;;; WITHOUT ANY WARRANTY; without even the implied warranty of
28;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29;;; GNU General Public License for more details.
30;;;
31;;; You should have received a copy of the GNU General Public License
32;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
33
34(define-module (gnu packages education)
35 #:use-module (ice-9 regex)
36 #:use-module (gnu packages)
37 #:use-module (gnu packages audio)
38 #:use-module (gnu packages base)
39 #:use-module (gnu packages bash)
40 #:use-module (gnu packages compression)
41 #:use-module (gnu packages cups)
42 #:use-module (gnu packages curl)
43 #:use-module (gnu packages databases)
44 #:use-module (gnu packages django)
45 #:use-module (gnu packages compiler-tools)
46 #:use-module (gnu packages fonts)
47 #:use-module (gnu packages fontutils)
48 #:use-module (gnu packages freedesktop)
49 #:use-module (gnu packages game-development)
50 #:use-module (gnu packages gettext)
51 #:use-module (gnu packages glib)
52 #:use-module (gnu packages gnome)
53 #:use-module (gnu packages golang)
54 #:use-module (gnu packages golang-build)
55 #:use-module (gnu packages golang-check)
56 #:use-module (gnu packages golang-web)
57 #:use-module (gnu packages golang-xyz)
58 #:use-module (gnu packages gtk)
59 #:use-module (gnu packages gstreamer)
60 #:use-module (gnu packages image)
61 #:use-module (gnu packages javascript)
62 #:use-module (gnu packages kde-education)
63 #:use-module (gnu packages linux)
64 #:use-module (gnu packages mp3)
65 #:use-module (gnu packages ncurses)
66 #:use-module (gnu packages pdf)
67 #:use-module (gnu packages perl)
68 #:use-module (gnu packages pkg-config)
69 #:use-module (gnu packages python)
70 #:use-module (gnu packages python-build)
71 #:use-module (gnu packages python-web)
72 #:use-module (gnu packages python-xyz)
73 #:use-module (gnu packages qt)
74 #:use-module (gnu packages readline)
75 #:use-module (gnu packages sdl)
76 #:use-module (gnu packages sqlite)
77 #:use-module (gnu packages texinfo)
78 #:use-module (gnu packages tls)
79 #:use-module (gnu packages video)
80 #:use-module (gnu packages xiph)
81 #:use-module (gnu packages xorg)
82 #:use-module (gnu packages xml)
83 #:use-module (guix gexp)
84 #:use-module ((guix licenses) #:prefix license:)
85 #:use-module (guix packages)
86 #:use-module (guix download)
87 #:use-module (guix git-download)
88 #:use-module (guix svn-download)
89 #:use-module (guix utils)
90 #:use-module (guix build-system cmake)
91 #:use-module (guix build-system gnu)
92 #:use-module (guix build-system go)
93 #:use-module (guix build-system pyproject)
94 #:use-module (guix build-system qt)
95 #:use-module (guix build-system trivial)
96 #:use-module (srfi srfi-1))
97
98;; XXX: This project was archived by the owner on Dec 14, 2024.
99(define-public cf-tool
100 (package
101 (name "cf-tool")
102 (version "1.0.0")
103 (source
104 (origin
105 (method git-fetch)
106 (uri (git-reference
107 (url "https://github.com/xalanq/cf-tool")
108 (commit (string-append "v" version))))
109 (file-name (git-file-name name version))
110 (sha256
111 (base32 "0ad2mljjg4pr8jjk9i1asnld16xi1wdfnh25drngm3c590cmrnfj"))
112 (patches (search-patches "cf-tool-add-languages.patch"))
113 (modules '((guix build utils)))
114 ;; Remove assets and vendorized dependencies from checkout
115 (snippet '(begin
116 (delete-file-recursively "assets")
117 (delete-file-recursively "vendor")))))
118 (build-system go-build-system)
119 (arguments
120 (list
121 #:install-source? #f
122 #:import-path "github.com/xalanq/cf-tool"
123 #:test-flags
124 #~(list "-vet=off")
125 #:phases
126 #~(modify-phases %standard-phases
127 (add-after 'install 'add-alternate-name
128 (lambda* _
129 (let ((bin (string-append #$output "/bin")))
130 (symlink (string-append bin "/cf-tool")
131 (string-append bin "/cf"))))))))
132 (native-inputs
133 (list go-github-com-docopt-docopt-go
134 go-github-com-fatih-color
135 go-github-com-k0kubun-go-ansi
136 go-github-com-mitchellh-go-homedir
137 go-github-com-olekukonko-tablewriter-0.0.5
138 go-github-com-puerkitobio-goquery
139 go-github-com-sergi-go-diff
140 go-github-com-shirou-gopsutil
141 go-github-com-skratchdot-open-golang
142 go-golang-org-x-crypto
143 go-golang-org-x-term))
144 (home-page "https://github.com/xalanq/cf-tool")
145 (synopsis
146 "Command-line interface tool for @url{https://codeforces.com, Codeforces}")
147 (description
148 "Codeforces Tool is a command-line interface tool for
149@url{https://codeforces.com,Codeforces}. Its features include:
150@itemize
151@item support Contests, Gym, Groups and acmsguru
152@item support all programming languages in Codeforces
153@item submit codes
154@item watch submissions' status dynamically
155@item fetch problems' samples
156@item compile and test locally
157@item clone all codes of someone
158@item generate codes from the specified template (including timestamp, author, etc.)
159@item list problems' stats of one contest
160@item use default web browser to open problems' pages, standings' page, etc.
161@item setup a network proxy and setup a mirror host
162@end itemize")
163 (license license:expat)))
164
165(define-public gotypist
166 (let ((revision "0")
167 (commit "03f8618f8e23acdaa94cda3bcf197da520db8dd4"))
168 (package
169 (name "gotypist")
170 (version (git-version "0.0.0" revision commit))
171 (source
172 (origin
173 (method git-fetch)
174 (uri (git-reference
175 (url "https://github.com/KappaDistributive/gotypist")
176 (commit commit)))
177 (file-name (git-file-name name version))
178 (sha256
179 (base32 "0sjndaspqfzffjxz388m384wqz5lzbiw4cwpi688k5aq7n05jh0f"))))
180 (build-system go-build-system)
181 (arguments
182 `(#:unpack-path "github.com/KappaDistributive/gotypist"
183 #:import-path "github.com/KappaDistributive/gotypist/v1"
184 #:install-source? #f
185 #:phases
186 (modify-phases %standard-phases
187 (add-before 'build 'install-data
188 (lambda* (#:key import-path unpack-path outputs #:allow-other-keys)
189 (let* ((out (assoc-ref outputs "out"))
190 (data (string-append out "/share/gotypist/data")))
191 (with-directory-excursion "src"
192 (with-directory-excursion import-path
193 (substitute* "lesson.go"
194 (("\"data/")
195 (format #f "\"~a/" data))))
196 (with-directory-excursion unpack-path
197 (mkdir-p data)
198 (copy-recursively "data" data))))))
199 (add-after 'install 'rename-executable
200 (lambda* (#:key outputs #:allow-other-keys)
201 (let* ((out (assoc-ref outputs "out"))
202 (bin (string-append out "/bin")))
203 (with-directory-excursion bin
204 (rename-file "v1" "gotypist"))))))))
205 (native-inputs
206 (list go-github-com-gizak-termui-v3
207 go-github-com-stretchr-testify))
208 (home-page "https://github.com/KappaDistributive/gotypist")
209 (synopsis "Simple typing trainer for text terminals")
210 (description
211 "Gotypist is a simple typing tutor for text terminals, similar to
212gtypist but with no instruction. Hence it's best suited for people who already
213know how to touch type and wish to improve their typing accuracy and/or speed.
214
215You can provide your own lesson text, choose from the included samples, or ask
216@command{gotypist} to construct a random lesson from a fixed list of the most
217frequently used words in American English.")
218 (license license:expat))))
219
220(define-public tipp10
221 (package
222 (name "tipp10")
223 (version "3.3.4")
224 (source (origin
225 (method git-fetch)
226 ;; Use the community maintained Qt 6 fork of the project, as the
227 ;; original software is now developed as a web application. The
228 ;; latest official version was 2.1.0.
229 (uri (git-reference
230 (url "https://gitlab.com/tipp10/tipp10.git")
231 (commit (string-append "v" version))))
232 (file-name (git-file-name name version))
233 (sha256
234 (base32
235 "1a6swdzf15jrqafwzv7grkdcl4a4nhpm8b8lh6br0djxkzqzx45b"))))
236 (build-system qt-build-system)
237 (arguments (list #:qtbase qtbase ;qtbase 6
238 #:tests? #f)) ;packages has no tests
239 (inputs (list qtbase qtmultimedia qtwayland))
240 (home-page "https://www.tipp10.com/en/")
241 (synopsis "Touch typing tutor")
242 (description "Tipp10 is a touch typing tutor. The ingenious thing about
243the software is its intelligence feature: characters that are mistyped are
244repeated more frequently. Beginners will find their way around right away so
245they can start practicing without a hitch.
246
247Useful support functions and an extensive progress tracker, topical lessons
248and the ability to create your own practice lessons make learning to type
249easy.")
250 ;; XXX: The LICENSE file mentions 'or later', but the source license
251 ;; headers have been modified to mention only "either version 2 of the
252 ;; License", which is not quite clear.
253 (license license:gpl2)))
254
255(define-public snap
256 (package
257 (name "snap")
258 (version "7.0.5")
259 (source
260 (origin
261 (method git-fetch)
262 (uri (git-reference
263 (url "https://github.com/jmoenig/Snap")
264 (commit (string-append "v" version))))
265 (file-name (git-file-name name version))
266 (sha256
267 (base32 "13j52r810yijvkj85c356c342drc3947j28z3va7kz75mi26whsf"))))
268 (build-system trivial-build-system)
269 (arguments
270 `(#:modules ((guix build utils))
271 #:builder
272 (begin
273 (use-modules (guix build utils))
274 (let* ((source (assoc-ref %build-inputs "source"))
275 (out (assoc-ref %outputs "out"))
276 (share (string-append out "/share/snap")))
277 (copy-recursively source share)
278 ;; Replace the sole minified file in the package.
279 (with-directory-excursion (string-append share "/src")
280 (delete-file "FileSaver.min.js")
281 (symlink (search-input-file %build-inputs
282 "/share/javascript/FileSaver.min.js")
283 "FileSaver.min.js"))
284 ;; Create a "snap" executable.
285 (let* ((bin (string-append out "/bin"))
286 (script (string-append bin "/snap"))
287 (snap (string-append share "/snap.html"))
288 (bash (search-input-file %build-inputs "/bin/sh"))
289 (xdg-open (search-input-file %build-inputs
290 "/bin/xdg-open")))
291 (mkdir-p bin)
292 (call-with-output-file script
293 (lambda (port)
294 (format port "#!~a\n~a '~a'" bash xdg-open snap)))
295 (chmod script #o555))))))
296 (inputs
297 (list bash-minimal js-filesaver xdg-utils))
298 (home-page "https://snap.berkeley.edu")
299 (synopsis "Visual, blocks based programming language")
300 (description "Snap! (formerly BYOB) is a visual, drag-and-drop
301programming language. It is an extended reimplementation of Scratch (a
302project of the Lifelong Kindergarten Group at the MIT Media Lab) that
303allows you to Build Your Own Blocks. It also features first class
304lists, first class procedures, and continuations. These added
305capabilities make it suitable for a serious introduction to computer
306science for high school or college students.
307
308This package provides a @command{snap} executable calling @command{xdg-open}
309to open the application in a web browser, for offline usage.")
310 (license license:agpl3+)))
311
312(define-public toutenclic
313 (package
314 (name "toutenclic")
315 (version "7.00")
316 (source
317 (origin
318 (method url-fetch)
319 (uri (list
320 ;; XXX: Upstream does not exist anymore.
321 ;; (string-append "http://www.bipede.fr/downloads/logiciels/"
322 ;; "ToutEnClic-" version "-src.zip")
323 (string-append "https://archive.org/download/tout-en-clic-"
324 version "-src/ToutEnClic-" version "-src.zip")))
325 (sha256
326 (base32 "0xg24p925rl5bfqsq3jb2lrkidb0f3kbmay5iyxxmjsn3ra0blyh"))))
327 (build-system pyproject-build-system)
328 (arguments
329 (list
330 #:tests? #f ;no tests
331 #:phases
332 #~(modify-phases %standard-phases
333 (delete 'build)
334 (replace 'install
335 (lambda _
336 (let ((share (string-append #$output "/share/toutenclic"))
337 (bin (string-append #$output "/bin"))
338 (executable "toutenclic"))
339 ;; Install icon.
340 (install-file "toutenclic.png"
341 (string-append #$output "/share/pixmaps"))
342 ;; Move files into "share/" directory.
343 (for-each (lambda (f)
344 (install-file f share))
345 (find-files "." "\\.py$"))
346 ;; Install documentation.
347 (install-file "ToutEnClic.pdf"
348 (string-append #$output "share/doc/"
349 #$name "-" #$version))
350 ;; Create executable in "bin/".
351 (mkdir-p bin)
352 (with-directory-excursion bin
353 (symlink (string-append share "/" executable ".py")
354 executable)))))
355 (add-after 'install 'create-desktop-file
356 (lambda _
357 (let ((applications (string-append #$output "/share/applications")))
358 (mkdir-p applications)
359 (call-with-output-file (string-append applications
360 "/toutenclic.desktop")
361 (lambda (file)
362 (format file
363 "[Desktop Entry]~@
364 Name=ToutEnClic~@
365 Comment=For schooling without difference~@
366 Exec=~a/bin/toutenclic~@
367 TryExec=~@*~a/bin/toutenclic~@
368 Terminal=false~@
369 Icon=toutenclic~@
370 Type=Application~%"
371 #$output)))))))))
372 (native-inputs (list unzip python-setuptools))
373 (inputs (list python-pyqt))
374 (synopsis "School tools for physically disabled children")
375 (description
376 "ToutEnClic is intended to facilitate the schooling of physically
377disabled children in ordinary schools. It is both a multi-page virtual
378exercise book and a kit including pencil, scissors, glue, ruler, compass,
379protractor and square. A virtual keyboard is also available if the child does
380not have any other specialized device.")
381 (home-page "https://bipede.fr/contrib/")
382 (license license:gpl3)))
383
384(define-public openboard
385 (package
386 (name "openboard")
387 (version "1.7.7")
388 (source
389 (origin
390 (method git-fetch)
391 (uri (git-reference
392 (url "https://github.com/OpenBoard-org/OpenBoard")
393 (commit (string-append "v" version))))
394 (file-name (git-file-name name version))
395 (sha256
396 (base32 "1i27h84p77pl1chw791fjs3vyzsjvsqc9ky2mbw7g8xpzxz1nd9j"))))
397 (build-system qt-build-system)
398 (arguments
399 (list
400 #:qtbase qtbase
401 #:tests? #f ;no tests
402 #:phases
403 #~(modify-phases %standard-phases
404 (add-after 'unpack 'set-initial-values
405 ;; Remove useless "Check for updates" action from menu.
406 (lambda _
407 (substitute* "src/core/UBSettings.cpp"
408 (("(appHideCheckForSoftwareUpdate = .*?)false(\\);)" _ beg end)
409 (string-append beg "true" end))))))))
410 (native-inputs
411 (list pkg-config qttools))
412 (inputs
413 (list alsa-lib
414 coreutils-minimal ;for patched 'env' shebang
415 cups-minimal
416 ffmpeg
417 freetype
418 lame
419 libass
420 libfdk
421 libtheora
422 libva
423 libvorbis
424 libvpx
425 libx264
426 openssl
427 opus
428 poppler
429 qt5compat
430 qtdeclarative
431 qtmultimedia
432 qtsvg
433 qtwebchannel
434 qtwebengine
435 quazip
436 sdl
437 zlib))
438 (home-page "https://openboard.ch/")
439 (synopsis "Interactive whiteboard for schools and universities")
440 (description
441 "OpenBoard is a teaching software for interactive whiteboard
442designed primarily for use in schools and universities. It can be
443used both with interactive whiteboards or in a dual-screen setup with
444a pen-tablet display and a beamer.")
445 (license license:gpl3)))
446
447(define-public fet
448 (package
449 (name "fet")
450 (version "7.9.1")
451 (source
452 (origin
453 (method url-fetch)
454 (uri (let ((directory "https://lalescu.ro/liviu/fet/download/")
455 (base (string-append "fet-" version ".tar.xz")))
456 (list (string-append directory base)
457 (string-append directory "old/" base))))
458 (sha256
459 (base32 "0c0vcdv1llzx9pp6lddssqcv24d107fm2zriphb9i7hbn9xpmj30"))))
460 (build-system gnu-build-system)
461 (arguments
462 (list
463 #:phases
464 #~(modify-phases %standard-phases
465 (add-after 'unpack 'fix-hardcoded-directories
466 (lambda _
467 (substitute* (list "fet.pro"
468 "src/src.pro"
469 "src/src-cl.pro"
470 "src/interface/fet.cpp")
471 (("/usr") #$output))))
472 (replace 'configure
473 (lambda _ (invoke "qmake" "fet.pro"))))))
474 (inputs
475 (list qtbase))
476 (home-page "https://lalescu.ro/liviu/fet/")
477 (synopsis "Timetabling software")
478 (description
479 "FET is a program for automatically scheduling the timetable of a school,
480high-school or university. It uses a fast and efficient timetabling
481algorithm.
482
483Usually, FET is able to solve a complicated timetable in maximum 5-20 minutes.
484For extremely difficult timetables, it may take a longer time, a matter of
485hours.")
486 (license license:agpl3)))
487
488(define-public klavaro
489 (package
490 (name "klavaro")
491 (version "3.14")
492 (source
493 (origin
494 (method url-fetch)
495 (uri (string-append "mirror://sourceforge/klavaro/klavaro-"
496 version ".tar.bz2"))
497 (sha256
498 (base32 "1avdwpmd7jmdkrwzsxd8s8qg0sqj2avcv620jvk11i81sd4pw647"))))
499 (build-system gnu-build-system)
500 (native-inputs
501 (list intltool pkg-config))
502 (inputs
503 (list cairo curl gtk+ gtkdatabox pango))
504 (home-page "https://klavaro.sourceforge.io/en/index.html")
505 (synopsis "Touch typing tutor")
506 (description
507 "Klavaro is a simple tutor to teach correct typing, almost independently of
508language and very flexible regarding to new or unknown keyboard layouts.")
509 (license license:gpl3+)))
510
511(define-public kanatest
512 ;; Latest release tarball is 0.4.8, which is really old and does not build
513 ;; commit on sourceforge are not tagged, we take the latest
514 (let ((commit "860e790a35f547cc96669f805d371a5ba3d8daff")
515 (revision "0"))
516 (package
517 (name "kanatest")
518 (version (git-version "0.4.10" revision commit))
519 (source
520 (origin
521 (method git-fetch)
522 (uri (git-reference
523 (url "https://git.code.sf.net/p/kanatest/code")
524 (commit commit)))
525 (file-name (git-file-name name version))
526 (sha256
527 (base32 "0dz63m9p4ggzw0yb309qmgnl664qb5q268vaa3i9v0i8qsl66d78"))))
528 (build-system gnu-build-system)
529 (native-inputs
530 (list gettext-minimal ; for msgfmt
531 pkg-config))
532 (inputs
533 (list libxml2 gtk+))
534 (home-page "https://kanatest.sourceforge.io/")
535 (synopsis "Hiragana and Katakana simple flashcard tool")
536 (description "Kanatest is a Japanese kana (Hiragana and Katakana) simple
537flashcard tool.
538
539During test the Kanatest displays randomly selected kana char (respecting mode
540and lesson) and waits for user answer expected as romaji equivalent. This
541process continues until all questions will be answered or all questions will
542be answered correctly (depends on options). At the end of test a short info
543about drilling time and correctness ratio is displayed. The results are
544stored and user can review his performance in any time.")
545 (license license:gpl2+))))
546
547(define-public libeb
548 (package
549 (name "libeb")
550 (version "4.4.3")
551 (source
552 (origin
553 (method url-fetch)
554 (uri
555 (string-append "ftp://ftp.sra.co.jp/pub/misc/eb/eb-" version ".tar.bz2"))
556 (sha256
557 (base32
558 "0psbdzirazfnn02hp3gsx7xxss9f1brv4ywp6a15ihvggjki1rxb"))
559 (patches
560 (search-patches "libeb-gcc-14.patch"))))
561 (build-system gnu-build-system)
562 (native-inputs ; Required for building docs
563 (list perl))
564 (inputs
565 (list zlib))
566 (synopsis "C library for accessing Japanese CD-ROM books")
567 (description "The EB library is a library for accessing CD-ROM
568books, which are a common way to distribute electronic dictionaries in
569Japan. It supports the EB, EBG, EBXA, EBXA-C, S-EBXA and EPWING
570formats.")
571 ;; FIXME: I cannot find a real home page
572 (home-page "https://sra.co.jp/")
573 (license license:bsd-3)))
574
575(define-public qolibri
576 (package
577 (name "qolibri")
578 (version "2.1.4")
579 (source
580 (origin
581 (method git-fetch)
582 (uri (git-reference
583 (url"https://github.com/ludios/qolibri")
584 (commit version)))
585 (file-name (git-file-name name version))
586 (sha256
587 (base32 "066y7jcq9vg6hnvn7qxckzhd1qkgfzpzhw69nw5psm43qbaca8lg"))))
588 (build-system qt-build-system)
589 (arguments
590 '(#:tests? #f)) ; no test target
591 (native-inputs
592 (list qttools-5))
593 (inputs
594 (list libeb
595 qtbase-5
596 qtmultimedia-5
597 qtquickcontrols2-5
598 qtdeclarative-5
599 qtwayland-5
600 qtwebchannel-5
601 qtwebengine-5
602 zlib))
603 (synopsis "EPWING dictionary reader")
604 (description "qolibri is a dictionary viewer for the EPWING dictionary
605format. Most monolingual Japanese dictionaries can only be found in the
606EPWING format.")
607 (home-page "https://github.com/ludios/qolibri")
608 (license license:gpl2)))
609
610(define-public mdk
611 (package
612 (name "mdk")
613 (version "1.3.0")
614 (source
615 (origin
616 (method url-fetch)
617 (uri (string-append "mirror://gnu/mdk/v" version "/mdk-"
618 version ".tar.gz"))
619 (sha256
620 (base32
621 "0bhk3c82kyp8167h71vdpbcr852h5blpnwggcswqqwvvykbms7lb"))))
622 (build-system gnu-build-system)
623 (arguments
624 `(#:configure-flags (list "--enable-gui=yes" "-with-readline=yes")))
625 (native-inputs
626 (list flex intltool pkg-config))
627 (inputs
628 (list glib
629 gtk+
630 libglade
631 ncurses
632 pango
633 readline))
634 (home-page "https://www.gnu.org/software/mdk/manual/")
635 (synopsis "Virtual development environment for Knuth's MIX")
636 (description
637 "GNU MDK is the Mix Development Kit, an emulation of the pedagogical
638computer MIX and its assembly language MIXAL. MIX has a virtual CPU with
639standard features such as registers, memory cells, an overflow toggle,
640comparison flags, input-output devices, and a set of binary instructions.
641The package includes a compiler, a virtual machine, a GUI for the virtual
642machine, and more.")
643 (license license:gpl3+)))
644
645(define-public exercism
646 (package
647 (name "exercism")
648 (version "3.5.8")
649 (source
650 (origin
651 (method git-fetch)
652 (uri (git-reference
653 (url "https://github.com/exercism/cli")
654 (commit (string-append "v" version))))
655 (file-name (git-file-name name version))
656 (sha256
657 (base32 "1acgys6kgv5rag3mqifyr3ryd9gbvvxk4x7cvf1hlizp0dmcx1mx"))
658 (patches (search-patches "exercism-disable-self-update.patch"))))
659 (build-system go-build-system)
660 (arguments
661 (list
662 #:install-source? #f
663 #:import-path "github.com/exercism/cli/exercism"
664 #:unpack-path "github.com/exercism/cli"
665 ;; Step away from cli/exercism to test the whole project.
666 #:test-subdirs #~(list "../../...")
667 #:phases
668 #~(modify-phases %standard-phases
669 (add-after 'unpack 'patch-xdg-open
670 (lambda* (#:key unpack-path #:allow-other-keys)
671 (with-directory-excursion (string-append "src/" unpack-path)
672 (substitute* "browser/open.go"
673 (("xdg-open")
674 (string-append #$(this-package-input "xdg-utils")
675 "/bin/xdg-open"))))))
676 (add-after 'install 'install-completions
677 (lambda* (#:key outputs #:allow-other-keys)
678 (let* ((exercism (string-append #$output "/bin/exercism"))
679 (bash (string-append
680 #$output
681 "/etc/bash_completion.d/exercism"))
682 (fish (string-append
683 #$output
684 "/share/fish/vendor_completions.d/exercism.fish"))
685 (zsh (string-append
686 #$output
687 "/share/zsh/site-functions/_exercism")))
688 (mkdir-p (dirname bash))
689 (with-output-to-file bash
690 (lambda ()
691 (invoke exercism "completion" "bash")))
692 (mkdir-p (dirname fish))
693 (with-output-to-file fish
694 (lambda ()
695 (invoke exercism "completion" "fish")))
696 (mkdir-p (dirname zsh))
697 (with-output-to-file zsh
698 (lambda ()
699 (invoke exercism "completion" "zsh")))))))
700 #:test-flags #~(list "-vet=off")))
701 (native-inputs
702 (list go-github-com-blang-semver
703 go-github-com-spf13-cobra
704 go-github-com-spf13-pflag
705 go-github-com-spf13-viper
706 go-github-com-stretchr-testify
707 go-golang-org-x-net
708 go-golang-org-x-text))
709 (inputs
710 (list xdg-utils))
711 (home-page "https://exercism.org/")
712 (synopsis "Mentored learning for programming languages")
713 (description
714 "Commandline client for exercism.io, a free service providing mentored
715learning for programming languages.")
716 (license license:expat)))
717
718(define-public exercism-cli
719 (package/inherit exercism
720 (name "exercism-cli")))
721
722(define-public mazo
723 (package
724 (name "mazo")
725 (version "1.2.1")
726 (source
727 (origin
728 (method git-fetch)
729 (uri (git-reference
730 (url "https://codeberg.org/luis-felipe/mazo.git")
731 (commit (string-append "v" version))))
732 (file-name (git-file-name name version))
733 (sha256
734 (base32 "0mwhd8y3xs57rbaarpi1ams5i0kndizdpns4ym7dmnnn7s9g1xq8"))))
735 (build-system pyproject-build-system)
736 (arguments
737 (list
738 #:phases
739 #~(modify-phases %standard-phases
740 (delete 'build)
741 (replace 'check
742 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
743 (when tests?
744 (setenv "HOME" (getcwd))
745 (invoke "python3" "manage.py" "test"))))
746 (replace 'install
747 (lambda* (#:key inputs outputs #:allow-other-keys)
748 (let* ((bin (string-append #$output "/bin"))
749 (script (string-append bin "/mazo"))
750 (share (string-append #$output "/share"))
751 (help (string-append share "/help/C/mazo")))
752 (mkdir-p help)
753 (mkdir-p bin)
754 (copy-file "mazo.py" script)
755 (chmod script #o555)
756 (install-file "icons/mazo.svg"
757 (string-append share
758 "/icons/hicolor/scalable/apps"))
759 (install-file "lugare.ulkeva.Mazo.desktop"
760 (string-append share "/applications"))
761 (copy-recursively "help/C/mazo" help)
762 (copy-recursively "mazo"
763 (string-append (site-packages inputs outputs)
764 "/mazo"))))))))
765 (native-inputs
766 (list python-django
767 python-django-cleanup
768 python-django-svg-image-form-field
769 python-pillow
770 python-pycairo))
771 (propagated-inputs
772 (list adwaita-icon-theme
773 dbus
774 gstreamer
775 gtk
776 python
777 python-django
778 python-django-cleanup
779 python-django-svg-image-form-field
780 python-pillow
781 python-pycairo
782 python-pygobject
783 yelp))
784 (home-page "https://luis-felipe.gitlab.io/mazo/")
785 (synopsis "Memorize concepts using multimedia flash cards")
786 (description
787 "Mazo is a learning application that helps you memorize simple concepts
788using multimedia flash cards and spaced reviews.")
789 (license license:public-domain)))
790
791(define-public hardv
792 (package
793 (name "hardv")
794 (version "5.0.0")
795 (source (origin
796 (method git-fetch)
797 (uri (git-reference
798 (url "https://github.com/dongyx/hardv")
799 (commit (string-append "v" version))))
800 (file-name (git-file-name name version))
801 (sha256
802 (base32
803 "0l1wb7hlyldl5hq0z9a1a1rrgn33rjyqb08jph3q7mcn5p3qx40i"))))
804 (build-system gnu-build-system)
805 (arguments
806 (list #:make-flags #~(list (string-append "prefix=" #$output)
807 (string-append "CC=" #$(cc-for-target)))
808 #:phases
809 #~(modify-phases %standard-phases
810 (add-after 'unpack 'patch-paths
811 (lambda* (#:key inputs #:allow-other-keys)
812 (substitute* (list "hardv.man1" "learn.c")
813 (("/bin/sh")
814 (search-input-file inputs "/bin/sh")))))
815 (delete 'configure)
816 (delete 'check)
817 (add-after 'install 'check
818 (lambda* (#:key tests? #:allow-other-keys)
819 ;; Tests can only be run after installation.
820 (when tests?
821 (setenv "PATH"
822 (string-append #$output "/bin:" (getenv "PATH")))
823 (invoke "make" "test")))))))
824 (home-page "https://github.com/dongyx/hardv")
825 (synopsis "Spaced repetition flash card program")
826 (description "HardV is a powerful spaced repetition flash card program.
827The key features are:
828
829@itemize
830@item HardV runs in the CLI mode by default, but you may configure it
831to be a TUI program, or to view images in a GUI window.
832@item HardV can open the editor, send the content you wrote to an online
833judging system, and determine the next quiz time by the judging result.
834@item It can be used to implement keyboard shortcut practice, cloze deletion,
835text-to-speech review, typing in the answer, and more.
836@item The format of input files are easy to be parsed by both human and other
837Unix utilities like grep, sed, and awk.
838@item Metadata like scheduled time is written back to input files; thus all
839your data is in files created and managed by yourself.
840@item HardV is a Unix filter in the default mode; that makes it easy to be
841called by other programs. For example, you could pipe HardV to a voice
842synthesizer to make an audio quiz.
843@end itemize")
844 (license license:bsd-2)))
845
846(define-public tagainijisho
847 (package
848 (name "tagainijisho")
849 (version "1.2.2")
850 (source
851 (origin
852 (method url-fetch)
853 (uri (string-append
854 "https://github.com/Gnurou/tagainijisho/releases/download/"
855 version
856 "/tagainijisho-" version ".tar.gz"))
857 (sha256
858 (base32
859 "00whfcnpn42asxmafcfbcmpwfwyv40qaqdk28psa1vp0lainmyhh"))))
860 (build-system qt-build-system)
861 (arguments
862 (list #:tests? #f)) ;no test target
863 (native-inputs
864 (list qttools-5))
865 (synopsis "Japanese dictionary and learning assistant")
866 (description
867 "Tagaini Jisho is a Japanese dictionary and kanji lookup tool. It aims
868at becoming your Japanese study assistant. It allows you to quickly search
869for entries and mark those that you wish to study, along with tags and
870personal notes. It also let you train entries you are studying and follows
871your progression in remembering them. Finally, it makes it easy to review
872entries you did not remember by listing them on screen or printing them on
873a small booklet.
874
875Tagaini Jisho also features complete stroke order animations for more than
8766000 kanji.")
877 (home-page "https://www.tagaini.net")
878 (license license:gpl3+)))