serialization: 'read-byte-string' makes a single read(2) call.
[jackhill/guix/guix.git] / gnu / packages / guile-xyz.scm
CommitLineData
0791437f 1;;; GNU Guix --- Functional package management for GNU
f918a8d9 2;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
0791437f
RW
3;;; Copyright © 2014, 2015, 2018 Mark H Weaver <mhw@netris.org>
4;;; Copyright © 2015, 2017 Christopher Allan Webber <cwebber@dustycloud.org>
5;;; Copyright © 2016 Alex Sassmannshausen <alex@pompo.co>
6;;; Copyright © 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
7;;; Copyright © 2016 Erik Edrosa <erik.edrosa@gmail.com>
f61f424d 8;;; Copyright © 2016, 2019 Eraim Flashner <efraim@flashner.co.il>
0791437f
RW
9;;; Copyright © 2016, 2017 Alex Kost <alezost@gmail.com>
10;;; Copyright © 2016, 2017 Adonay "adfeno" Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno@openmailbox.org>
11;;; Copyright © 2016 Amirouche <amirouche@hypermove.net>
bdf2dd79 12;;; Copyright © 2016, 2019 Jan Nieuwenhuizen <janneke@gnu.org>
0791437f
RW
13;;; Copyright © 2017 Andy Wingo <wingo@igalia.com>
14;;; Copyright © 2017 David Thompson <davet@gnu.org>
a3246602 15;;; Copyright © 2017, 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
0791437f 16;;; Copyright © 2017 Theodoros Foradis <theodoros@foradis.org>
47956fa0 17;;; Copyright © 2017 ng0 <ng0@n0.is>
0791437f
RW
18;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
19;;; Copyright © 2018 Maxim Cournoyer <maxim.cournoyer@gmail.com>
50771f5b 20;;; Copyright © 2018, 2019 Arun Isaac <arunisaac@systemreboot.net>
0791437f
RW
21;;; Copyright © 2018 Pierre-Antoine Rouby <pierre-antoine.rouby@inria.fr>
22;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
cd81199c 23;;; Copyright © 2019 swedebugia <swedebugia@riseup.net>
c99f32b9 24;;; Copyright © 2019 Amar Singh <nly@disroot.org>
f9ec89f4 25;;; Copyright © 2019 Timothy Sample <samplet@ngyro.com>
0791437f
RW
26;;;
27;;; This file is part of GNU Guix.
28;;;
29;;; GNU Guix is free software; you can redistribute it and/or modify it
30;;; under the terms of the GNU General Public License as published by
31;;; the Free Software Foundation; either version 3 of the License, or (at
32;;; your option) any later version.
33;;;
34;;; GNU Guix is distributed in the hope that it will be useful, but
35;;; WITHOUT ANY WARRANTY; without even the implied warranty of
36;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
37;;; GNU General Public License for more details.
38;;;
39;;; You should have received a copy of the GNU General Public License
40;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
41
42(define-module (gnu packages guile-xyz)
43 #:use-module ((guix licenses) #:prefix license:)
44 #:use-module (gnu packages)
7ff157c1 45 #:use-module (gnu packages algebra)
0791437f
RW
46 #:use-module (gnu packages aspell)
47 #:use-module (gnu packages autotools)
48 #:use-module (gnu packages base)
49 #:use-module (gnu packages bash)
50 #:use-module (gnu packages compression)
406ef442 51 #:use-module (gnu packages databases)
0791437f 52 #:use-module (gnu packages disk)
15218d4e 53 #:use-module (gnu packages emacs)
5531782d 54 #:use-module (gnu packages emacs-xyz)
0791437f
RW
55 #:use-module (gnu packages gawk)
56 #:use-module (gnu packages gettext)
57 #:use-module (gnu packages gl)
bdf2dd79 58 #:use-module (gnu packages glib)
5531782d 59 #:use-module (gnu packages gnome)
e8c2da41 60 #:use-module (gnu packages gnupg)
0791437f 61 #:use-module (gnu packages gperf)
bdf2dd79 62 #:use-module (gnu packages gtk)
0791437f
RW
63 #:use-module (gnu packages guile)
64 #:use-module (gnu packages hurd)
65 #:use-module (gnu packages image)
d1a3a8e1 66 #:use-module (gnu packages imagemagick)
0791437f
RW
67 #:use-module (gnu packages libffi)
68 #:use-module (gnu packages libunistring)
69 #:use-module (gnu packages linux)
70 #:use-module (gnu packages man)
71 #:use-module (gnu packages maths)
72 #:use-module (gnu packages multiprecision)
73 #:use-module (gnu packages ncurses)
74 #:use-module (gnu packages networking)
f0de9544 75 #:use-module (gnu packages noweb)
1a37fd1e 76 #:use-module (gnu packages nss)
e8c2da41 77 #:use-module (gnu packages password-utils)
406ef442 78 #:use-module (gnu packages perl)
0791437f
RW
79 #:use-module (gnu packages pkg-config)
80 #:use-module (gnu packages python)
81 #:use-module (gnu packages readline)
82 #:use-module (gnu packages sdl)
83 #:use-module (gnu packages slang)
84 #:use-module (gnu packages sqlite)
f0de9544 85 #:use-module (gnu packages tex)
0791437f
RW
86 #:use-module (gnu packages texinfo)
87 #:use-module (gnu packages tls)
88 #:use-module (gnu packages version-control)
bdf2dd79 89 #:use-module (gnu packages webkit)
0791437f
RW
90 #:use-module (gnu packages xdisorg)
91 #:use-module (gnu packages xorg)
92 #:use-module (guix packages)
93 #:use-module (guix download)
94 #:use-module (guix git-download)
dec4b3aa 95 #:use-module (guix hg-download)
0791437f
RW
96 #:use-module (guix build-system gnu)
97 #:use-module (guix build-system guile)
98 #:use-module (guix utils)
99 #:use-module (ice-9 match)
100 #:use-module ((srfi srfi-1) #:select (alist-delete)))
101
102(define-public artanis
1a37fd1e
RW
103 (package
104 (name "artanis")
105 (version "0.4.1")
106 (source (origin
107 (method url-fetch)
108 (uri (string-append "mirror://gnu/artanis/artanis-"
109 version ".tar.gz"))
110 (sha256
111 (base32
112 "0nnmdfx5xwcc3kck64var7msz7g3qk817d7bv9l159nkmic0v9w4"))
113 (modules '((guix build utils)))
114 (snippet
115 '(begin
116 ;; Unbundle guile-redis and guile-json
117 (delete-file-recursively "artanis/third-party/json.scm")
118 (delete-file-recursively "artanis/third-party/json")
119 (delete-file-recursively "artanis/third-party/redis.scm")
120 (delete-file-recursively "artanis/third-party/redis")
121 (substitute* '("artanis/artanis.scm"
122 "artanis/lpc.scm"
123 "artanis/oht.scm")
124 (("(#:use-module \\()artanis third-party (json\\))" _
125 use-module json)
126 (string-append use-module json)))
127 (substitute* '("artanis/lpc.scm"
128 "artanis/session.scm")
129 (("(#:use-module \\()artanis third-party (redis\\))" _
130 use-module redis)
131 (string-append use-module redis)))
132 (substitute* "artanis/oht.scm"
133 (("([[:punct:][:space:]]+)(->json-string)([[:punct:][:space:]]+)"
134 _ pre json-string post)
135 (string-append pre
136 "scm" json-string
137 post)))
138 (substitute* "artanis/artanis.scm"
139 (("[[:punct:][:space:]]+->json-string[[:punct:][:space:]]+")
140 ""))
141 #t))))
142 (build-system gnu-build-system)
143 (inputs
144 `(("guile" ,guile-2.2)
145 ("nss" ,nss)))
146 ;; FIXME the bundled csv contains one more exported procedure
147 ;; (sxml->csv-string) than guile-csv. The author is maintainer of both
148 ;; projects.
149 ;; TODO: Add guile-dbi and guile-dbd optional dependencies.
150 (propagated-inputs
151 `(("guile-json" ,guile-json-1)
152 ("guile-readline" ,guile-readline)
153 ("guile-redis" ,guile-redis)))
154 (native-inputs
155 `(("bash" ,bash) ;for the `source' builtin
156 ("pkgconfig" ,pkg-config)
157 ("util-linux" ,util-linux))) ;for the `script' command
158 (arguments
159 '(#:make-flags
160 ;; TODO: The documentation must be built with the `docs' target.
161 (let* ((out (assoc-ref %outputs "out"))
162 (scm (string-append out "/share/guile/site/2.2"))
163 (go (string-append out "/lib/guile/2.2/site-ccache")))
164 ;; Don't use (%site-dir) for site paths.
165 (list (string-append "MOD_PATH=" scm)
166 (string-append "MOD_COMPILED_PATH=" go)))
167 #:test-target "test"
168 #:phases
169 (modify-phases %standard-phases
170 (add-after 'unpack 'patch-site-dir
171 (lambda* (#:key outputs #:allow-other-keys)
172 (substitute* "artanis/commands/help.scm"
173 (("\\(%site-dir\\)")
174 (string-append "\""
175 (assoc-ref outputs "out")
176 "/share/guile/site/2.2\"")))))
177 (add-after 'unpack 'patch-reference-to-libnss
178 (lambda* (#:key inputs #:allow-other-keys)
179 (substitute* "artanis/security/nss.scm"
180 (("ffi-binding \"libnss3\"")
181 (string-append
182 "ffi-binding \""
183 (assoc-ref inputs "nss") "/lib/nss/libnss3.so"
184 "\"")))
185 #t))
186 (add-before 'install 'substitute-root-dir
187 (lambda* (#:key outputs #:allow-other-keys)
188 (let ((out (assoc-ref outputs "out")))
189 (substitute* "Makefile" ;ignore the execution of bash.bashrc
190 ((" /etc/bash.bashrc") " /dev/null"))
191 (substitute* "Makefile" ;set the root of config files to OUT
192 ((" /etc") (string-append " " out "/etc")))
193 (mkdir-p (string-append out "/bin")) ;for the `art' executable
194 #t)))
195 (add-after 'install 'wrap-art
196 (lambda* (#:key inputs outputs #:allow-other-keys)
197 (let* ((out (assoc-ref outputs "out"))
198 (bin (string-append out "/bin"))
199 (scm (string-append out "/share/guile/site/2.2"))
200 (go (string-append out "/lib/guile/2.2/site-ccache")))
201 (wrap-program (string-append bin "/art")
202 `("GUILE_LOAD_PATH" ":" prefix
203 (,scm ,(getenv "GUILE_LOAD_PATH")))
204 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
205 (,go ,(getenv "GUILE_LOAD_COMPILED_PATH"))))
206 #t))))))
207 (synopsis "Web application framework written in Guile")
208 (description "GNU Artanis is a web application framework written in Guile
0791437f
RW
209Scheme. A web application framework (WAF) is a software framework that is
210designed to support the development of dynamic websites, web applications, web
211services and web resources. The framework aims to alleviate the overhead
212associated with common activities performed in web development. Artanis
213provides several tools for web development: database access, templating
214frameworks, session management, URL-remapping for RESTful, page caching, and
215more.")
1a37fd1e
RW
216 (home-page "https://www.gnu.org/software/artanis/")
217 (license (list license:gpl3+ license:lgpl3+)))) ;dual license
0791437f
RW
218
219;; There has not been any release yet.
220(define-public guildhall
221 (let ((commit "2fe2cc539f4b811bbcd69e58738db03eb5a2b778")
222 (revision "1"))
223 (package
224 (name "guildhall")
225 (version (string-append "0-" revision "." (string-take commit 9)))
226 (source (origin
227 (method git-fetch)
228 (uri (git-reference
229 (url "https://github.com/ijp/guildhall.git")
230 (commit commit)))
231 (file-name (string-append name "-" version "-checkout"))
232 (sha256
233 (base32
234 "115bym7bg66h3gs399yb2vkzc2ygriaqsn4zbrg8f054mgy8wzn1"))))
235 (build-system gnu-build-system)
236 (arguments
237 `(#:phases
238 (modify-phases %standard-phases
239 ;; Tests fail without this fix because they try to load the bash
240 ;; executable as a Scheme file. See bug report at
241 ;; https://github.com/ijp/guildhall/issues/22
242 (add-after 'unpack 'fix-bug-22
243 (lambda _
244 (substitute* "Makefile.am"
245 (("TESTS_ENVIRONMENT=.*")
246 "AM_TESTS_ENVIRONMENT=srcdir=$(abs_top_srcdir)/tests/
247TEST_EXTENSIONS = .scm
248SCM_LOG_COMPILER= $(top_builddir)/env $(GUILE)
249AM_SCM_LOG_FLAGS = --no-auto-compile -s")
250 ;; FIXME: one of the database tests fails for unknown
251 ;; reasons. It does not fail when run outside of Guix.
252 (("tests/database.scm") ""))
253 #t)))))
254 (inputs
255 `(("guile" ,guile-2.0)))
256 (native-inputs
257 `(("zip" ,zip) ; for tests
258 ("autoconf" ,autoconf)
259 ("automake" ,automake)
260 ("texinfo" ,texinfo)))
261 (synopsis "Package manager for Guile")
262 (description
263 "Guildhall is a package manager written for Guile Scheme. A guild is
264an association of independent craftspeople. A guildhall is where they meet.
265This Guildhall aims to make a virtual space for Guile wizards and journeyfolk
266to share code.
267
268On a practical level, Guildhall lets you share Scheme modules and programs
269over the internet, and install code that has been shared by others. Guildhall
270can handle dependencies, so when a program requires several libraries, and
271each of those has further dependencies, all of the prerequisites for the
272program can be installed in one go.")
273 (home-page "https://github.com/ijp/guildhall")
274 (license license:gpl3+))))
275
276(define-public guile-aspell
277 (package
278 (name "guile-aspell")
279 (version "0.4")
280 (source (origin
281 (method url-fetch)
282 (uri (string-append
283 "http://lonelycactus.com/tarball/guile_aspell-"
284 version ".tar.gz"))
285 (sha256
286 (base32
287 "0vpk5xj9m9qc702z3khmkwhgpb949qbsyz8kw2qycda6qnxk0077"))))
288 (build-system gnu-build-system)
289 (arguments
290 '(#:phases (modify-phases %standard-phases
291 (add-before 'configure 'set-guilesitedir
292 (lambda _
293 (substitute* "Makefile.in"
294 (("^guilesitedir =.*$")
295 "guilesitedir = \
296$(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
297 #t))
298 (add-before 'build 'set-libaspell-file-name
299 (lambda* (#:key inputs #:allow-other-keys)
300 (let ((aspell (assoc-ref inputs "aspell")))
301 (substitute* "aspell.scm"
302 (("\"libaspell\\.so\"")
303 (string-append "\"" aspell
304 "/lib/libaspell\"")))
305 #t))))))
306 (native-inputs `(("pkg-config" ,pkg-config)))
307 (inputs `(("guile" ,guile-2.2)
308 ("aspell" ,aspell)))
309 (home-page "https://github.com/spk121/guile-aspell")
310 (synopsis "Spell-checking from Guile")
311 (description
312 "guile-aspell is a Guile Scheme library for comparing a string against a
313dictionary and suggesting spelling corrections.")
314 (license license:gpl3+)))
315
316(define-public guile-bash
317 ;; This project is currently retired. It was initially announced here:
318 ;; <https://lists.gnu.org/archive/html/guile-user/2015-02/msg00003.html>.
319 (let ((commit "1eabc563ca5692b3e08d84f1f0e6fd2283284469")
320 (revision "0"))
321 (package
322 (name "guile-bash")
323 (version (string-append "0.1.6-" revision "." (string-take commit 7)))
324 (home-page
325 "https://anonscm.debian.org/cgit/users/kaction-guest/retired/dev.guile-bash.git")
326 (source (origin
327 (method git-fetch)
328 (uri (git-reference
329 (commit commit)
330 (url home-page)))
331 (sha256
332 (base32
333 "097vny990wp2qpjij6a5a5gwc6fxzg5wk56inhy18iki5v6pif1p"))
334 (file-name (string-append name "-" version "-checkout"))))
335 (build-system gnu-build-system)
336 (arguments
337 '(#:configure-flags
338 ;; Add -I to match 'bash.pc' of Bash 4.4.
339 (list (string-append "CPPFLAGS=-I"
340 (assoc-ref %build-inputs "bash:include")
341 "/include/bash/include")
342
343 ;; The '.a' file is useless.
344 "--disable-static"
345
346 ;; Install 'lib/bash' as Bash 4.4 expects.
347 (string-append "--libdir=" (assoc-ref %outputs "out")
348 "/lib/bash"))))
349 (native-inputs `(("pkg-config" ,pkg-config)
350 ("autoconf" ,autoconf-wrapper)
351 ("automake" ,automake)
352 ("libtool" ,libtool)
353 ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'.
354 ("gettext" ,gettext-minimal)
355
356 ;; Bash with loadable module support, for the test
357 ;; suite.
358 ("bash-full" ,bash)))
359 (inputs `(("guile" ,guile-2.0)
360 ("bash:include" ,bash "include")))
361 (synopsis "Extend Bash using Guile")
362 (description
363 "Guile-Bash provides a shared library and set of Guile modules,
364allowing you to extend Bash in Scheme. Scheme interfaces allow you to access
365the following aspects of Bash:
366
367@itemize
368@item aliases;
369@item setting and getting Bash variables;
370@item creating dynamic variables;
371@item creating Bash functions with a Scheme implementation;
372@item reader macro for output capturing;
373@item reader macro for evaluating raw Bash commands.
374@end itemize
375
376To enable it, run:
377
378@example
379enable -f ~/.guix-profile/lib/bash/libguile-bash.so scm
380@end example
381
382and then run @command{scm example.scm}.")
383 (license license:gpl3+))))
384
385(define-public guile-8sync
386 (package
387 (name "guile-8sync")
388 (version "0.4.2")
389 (source (origin
390 (method url-fetch)
391 (uri (string-append "mirror://gnu/8sync/8sync-" version
392 ".tar.gz"))
393 (sha256
394 (base32
395 "031wm13srak3wsnll7j2mbbi29g1pcm4swdb71ds9yn567pn20qw"))))
396 (build-system gnu-build-system)
397 (native-inputs `(("autoconf" ,autoconf)
398 ("automake" ,automake)
399 ("guile" ,guile-2.2)
400 ("pkg-config" ,pkg-config)
401 ("texinfo" ,texinfo)))
402 (arguments
403 `(#:phases (modify-phases %standard-phases
404 (add-before 'configure 'setenv
405 (lambda _
406 ;; quiet warnings
407 (setenv "GUILE_AUTO_COMPILE" "0")
408 #t)))))
409 (home-page "https://gnu.org/s/8sync/")
410 (synopsis "Asynchronous actor model library for Guile")
411 (description
412 "GNU 8sync (pronounced \"eight-sync\") is an asynchronous programming
413library for GNU Guile based on the actor model.
414
415Note that 8sync is only available for Guile 2.2.")
416 (license license:lgpl3+)))
417
418(define-public guile-daemon
419 (package
420 (name "guile-daemon")
f975f82d 421 (version "0.1.3")
0791437f
RW
422 (source (origin
423 (method url-fetch)
424 (uri (string-append "https://github.com/alezost/" name
425 "/releases/download/v" version
426 "/" name "-" version ".tar.gz"))
427 (sha256
428 (base32
f975f82d 429 "08gaqrgjlly9k5si72vvpbr4xhq5v52l5ma5y6a7spid5dd057cy"))))
0791437f
RW
430 (build-system gnu-build-system)
431 (native-inputs
432 `(("pkg-config" ,pkg-config)))
433 (inputs
434 `(("guile" ,guile-2.2)))
435 (home-page "https://github.com/alezost/guile-daemon")
436 (synopsis "Evaluate code in a running Guile process")
437 (description
438 "Guile-Daemon is a small Guile program that loads your initial
439configuration file, and then reads and evaluates Guile expressions that
440you send to a FIFO file.")
441 (license license:gpl3+)))
442
443(define-public guile-dsv
444 (package
445 (name "guile-dsv")
446 (version "0.2.1")
447 (source (origin
448 (method git-fetch)
449 (uri (git-reference
450 (url "https://github.com/artyom-poptsov/guile-dsv")
451 (commit "bdc5267d007478abc20ea96d7c459b7dd9560b3d")))
452 (file-name (string-append name "-" version "-checkout"))
453 (sha256
454 (base32
455 "1irw6mz8998nwyhzrw9g94jcz60b9zljgqfmipaz1ybn8579qjx0"))))
456 (build-system gnu-build-system)
457 (native-inputs
458 `(("autoconf" ,autoconf)
459 ("automake" ,automake)
460 ("pkg-config" ,pkg-config)
461 ("texinfo" ,texinfo)))
462 (inputs `(("guile" ,guile-2.2)))
463 (propagated-inputs `(("guile-lib" ,guile-lib)))
464 (arguments
465 '(#:phases (modify-phases %standard-phases
466 (add-before 'configure 'set-guilesitedir
467 (lambda _
468 (substitute* "Makefile.in"
469 (("^guilesitedir =.*$")
470 "guilesitedir = \
471$(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
472 (substitute* "modules/Makefile.in"
473 (("^guilesitedir =.*$")
474 "guilesitedir = \
475$(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
476 (substitute* "modules/dsv/Makefile.in"
477 (("^guilesitedir =.*$")
478 "guilesitedir = \
479$(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
480 #t)))))
481 (home-page "https://github.com/artyom-poptsov/guile-dsv")
482 (synopsis "DSV module for Guile")
483 (description
484 "Guile-DSV is a GNU Guile module for working with the
485delimiter-separated values (DSV) data format. Guile-DSV supports the
486Unix-style DSV format and RFC 4180 format.")
487 (license license:gpl3+)))
488
489(define-public guile-fibers
490 (package
491 (name "guile-fibers")
492 (version "1.0.0")
493 (source (origin
494 (method url-fetch)
495 (uri (string-append "https://wingolog.org/pub/fibers/fibers-"
496 version ".tar.gz"))
497 (sha256
498 (base32
9e016129
LC
499 "0vjkg72ghgdgphzbjz9ig8al8271rq8974viknb2r1rg4lz92ld0"))
500 (modules '((guix build utils)))
501 (snippet
502 '(begin
503 ;; Allow builds with Guile 3.0.
504 (substitute* "configure"
505 (("search=\"2\\.2\"")
506 "search=\"3.0 2.2\""))
507
508 ;; Explicitly include system headers rather than relying on
509 ;; <libguile.h> to do it for us.
510 (substitute* "epoll.c"
511 (("#include.*libguile\\.h.*$" all)
512 (string-append "#include <unistd.h>\n"
513 "#include <string.h>\n"
514 all "\n")))
515
516 ;; Import (ice-9 threads) for 'current-processor-count'.
517 (substitute* "tests/channels.scm"
518 (("#:use-module \\(fibers\\)")
519 (string-append "#:use-module (fibers)\n"
520 "#:use-module (ice-9 threads)\n")))
521 #t))))
0791437f
RW
522 (build-system gnu-build-system)
523 (arguments
524 '(#:phases (modify-phases %standard-phases
525 (add-after 'install 'mode-guile-objects
526 (lambda* (#:key outputs #:allow-other-keys)
527 ;; .go files are installed to "lib/guile/X.Y/cache".
528 ;; This phase moves them to "…/site-ccache".
529 (let* ((out (assoc-ref outputs "out"))
530 (lib (string-append out "/lib/guile"))
531 (old (car (find-files lib "^ccache$"
532 #:directories? #t)))
533 (new (string-append (dirname old)
534 "/site-ccache")))
535 (rename-file old new)
536 #t))))))
537 (native-inputs
538 `(("texinfo" ,texinfo)
539 ("pkg-config" ,pkg-config)))
540 (inputs
541 `(("guile" ,guile-2.2)))
542 (synopsis "Lightweight concurrency facility for Guile")
543 (description
544 "Fibers is a Guile library that implements a a lightweight concurrency
545facility, inspired by systems like Concurrent ML, Go, and Erlang. A fiber is
546like a \"goroutine\" from the Go language: a lightweight thread-like
547abstraction. Systems built with Fibers can scale up to millions of concurrent
548fibers, tens of thousands of concurrent socket connections, and many parallel
549cores. The Fibers library also provides Concurrent ML-like channels for
550communication between fibers.
551
552Note that Fibers makes use of some Guile 2.1/2.2-specific features and
553is not available for Guile 2.0.")
554 (home-page "https://github.com/wingo/fibers")
555 (license license:lgpl3+)))
556
9e016129
LC
557(define-public guile3.0-fibers
558 (package
559 (inherit guile-fibers)
560 (name "guile3.0-fibers")
561 (arguments
562 ;; The code uses 'scm_t_uint64' et al., which are deprecated in 3.0.
563 `(#:configure-flags '("CFLAGS=-Wno-error=deprecated-declarations")
564 ,@(package-arguments guile-fibers)))
565 (inputs `(("guile" ,guile-3.0)))))
566
0791437f
RW
567(define-public guile-syntax-highlight
568 (package
569 (name "guile-syntax-highlight")
570 (version "0.1")
571 (source (origin
572 (method url-fetch)
573 (uri (string-append "https://files.dthompson.us/"
574 "guile-syntax-highlight/"
575 "guile-syntax-highlight-"
576 version ".tar.gz"))
577 (sha256
578 (base32
fb8a77f4
LC
579 "1p771kq15x83483m23bhah1sz6vkalg3drm7x279f4j1cxligkzi"))
580 (modules '((guix build utils)))
581 (snippet
582 '(begin
583 ;; Allow builds with Guile 3.0.
584 (substitute* "configure"
585 (("2\\.2 2\\.0")
586 "3.0 2.2 2.0"))
587 #t))))
0791437f
RW
588 (build-system gnu-build-system)
589 (native-inputs
590 `(("pkg-config" ,pkg-config)))
591 (inputs
592 `(("guile" ,guile-2.2)))
593 (synopsis "General-purpose syntax highlighter for GNU Guile")
594 (description "Guile-syntax-highlight is a general-purpose syntax
595highlighting library for GNU Guile. It can parse code written in various
596programming languages into a simple s-expression that can be converted to
597HTML (via SXML) or any other format for rendering.")
598 (home-page "http://dthompson.us/projects/guile-syntax-highlight.html")
599 (license license:lgpl3+)))
600
fb8a77f4
LC
601(define-public guile3.0-syntax-highlight
602 (package
603 (inherit guile-syntax-highlight)
604 (name "guile3.0-syntax-highlight")
605 (inputs `(("guile" ,guile-3.0)))))
606
0791437f
RW
607(define-public guile-sjson
608 (package
609 (name "guile-sjson")
610 (version "0.2.1")
611 (source (origin
612 (method url-fetch)
613 (uri (string-append "https://dustycloud.org/misc/sjson-" version
614 ".tar.gz"))
615 (sha256
616 (base32
617 "1mzmapln79vv10qxaggz9qwcdbag3jnrj19xx8bgkmxss8h03sv3"))))
618 (build-system gnu-build-system)
619 (native-inputs
620 `(("autoconf" ,autoconf)
621 ("automake" ,automake)
622 ("pkg-config" ,pkg-config)))
623 (inputs
624 `(("guile" ,guile-2.2)))
625 (home-page "https://gitlab.com/dustyweb/guile-sjson")
626 (synopsis "S-expression based json reader/writer for Guile")
627 (description "guile-sjson is a json reader/writer for Guile.
628It has a nice, simple s-expression based syntax.")
629 (license license:lgpl3+)))
630
61dafdc0
CB
631(define-public guile-squee
632 (let ((commit "a85902a92bf6f58a1d35fd974a01ade163deda8d")
633 (revision "0"))
634 (package
635 (name "guile-squee")
636 (version (string-append "0-" revision "." (string-take commit 7)))
637 (source (origin
638 (method git-fetch)
639 (uri (git-reference
640 (url "https://notabug.org/cwebber/guile-squee.git")
641 (commit commit)))
642 (file-name (git-file-name name version))
643 (sha256
644 (base32
645 "0p1lpsp4kx57j3ai1dkxilm4ziavzzx8wbbc42m3hpziq0a7qz5z"))))
646 (build-system guile-build-system)
647 (arguments
648 '(#:phases
649 (modify-phases %standard-phases
650 (add-after 'unpack 'patch
651 (lambda* (#:key inputs #:allow-other-keys)
652 (substitute* "squee.scm"
653 (("dynamic-link \"libpq\"")
654 (string-append
655 "dynamic-link \""
656 (assoc-ref inputs "postgresql") "/lib/libpq.so"
657 "\"")))
658 #t)))))
659 (inputs
660 `(("postgresql" ,postgresql)))
661 (native-inputs
662 `(("guile" ,guile-2.2)))
663 (home-page "https://notabug.org/cwebber/guile-squee")
664 (synopsis "Connect to PostgreSQL using Guile")
665 (description
666 "@code{squee} is a Guile library for connecting to PostgreSQL databases
667using Guile's foreign function interface.")
6fd72f70 668 (license license:lgpl3+))))
61dafdc0 669
0791437f
RW
670(define-public guile-colorized
671 (package
672 (name "guile-colorized")
673 (version "0.1")
1340ce28
TGR
674 (source
675 (origin
676 (method git-fetch)
677 (uri (git-reference
55f4282e 678 (url "https://gitlab.com/NalaGinrut/guile-colorized.git")
1340ce28
TGR
679 (commit (string-append "v" version))))
680 (file-name (git-file-name name version))
681 (sha256
682 (base32 "10mv8c63159r3qvwwdvsgnsvdg7nc2ghak85zapwqpv4ywrqp9zc"))))
0791437f
RW
683 (build-system guile-build-system)
684 (native-inputs
685 `(("guile" ,guile-2.2)))
55f4282e 686 (home-page "https://gitlab.com/NalaGinrut/guile-colorized")
0791437f
RW
687 (synopsis "Colorized REPL for Guile")
688 (description
689 "Guile-colorized provides you with a colorized REPL for GNU Guile.")
690 (license license:gpl3+)))
691
fc870a0d
LC
692(define-public guile3.0-colorized
693 (package
694 (inherit guile-colorized)
695 (name "guile3.0-colorized")
696 (native-inputs `(("guile" ,guile-next)))))
697
0791437f
RW
698(define-public guile-pfds
699 (package
700 (name "guile-pfds")
701 (version "0.3")
702 (home-page "https://github.com/ijp/pfds")
703 (source (origin
704 (method git-fetch)
705 (uri (git-reference
706 (url home-page)
707 (commit (string-append "v" version))))
708 (sha256
709 (base32
710 "19y33wg94pf0n98dkfqd1zbw93fgky4sawxsxl6s3vyqwl0yi5vh"))
711 (file-name (string-append name "-" version "-checkout"))))
712 (build-system guile-build-system)
713 (arguments
714 '(#:source-directory "src"
715 #:phases (modify-phases %standard-phases
716 (add-after 'unpack 'move-files-around
717 (lambda _
718 ;; Move files under a pfds/ directory to reflect the
719 ;; module hierarchy.
720 (mkdir-p "src/pfds")
721 (for-each (lambda (file)
722 (rename-file file
723 (string-append "src/pfds/"
724 file)))
725 '("bbtrees.sls"
726 "deques"
727 "deques.sls"
728 "dlists.sls"
729 "fingertrees.sls"
730 "hamts.sls"
731 "heaps.sls"
732 "private"
733 "psqs.sls"
734 "queues"
735 "queues.sls"
736 "sequences.sls"
737 "sets.sls"))
738
739 ;; In Guile <= 2.2.4, there's no way to tell 'guild
740 ;; compile' to accept the ".sls" extension. So...
741 (for-each (lambda (file)
742 (rename-file file
743 (string-append
744 (string-drop-right file 4)
745 ".scm")))
746 (find-files "." "\\.sls$"))
747 #t)))))
748 (native-inputs
749 `(("guile" ,guile-2.2)))
750 (synopsis "Purely functional data structures for Guile")
751 (description
752 "This package provides purely functional data structures written in R6RS
753Scheme and compiled for Guile. It has been tested with Racket, Guile 2,
754Vicare Scheme and IronScheme. Right now it contains:
755
756@itemize
757@item queues
758@item deques
759@item bbtrees
760@item sets
761@item dlists
762@item priority search queues (PSQs)
763@item finger trees
764@item sequences
765@item heaps
766@item hash array mapped tries (HAMTs).
767@end itemize\n")
768 (license license:bsd-3)))
769
77c95ee6
RW
770(define-public guile3.0-pfds
771 (package
772 (inherit guile-pfds)
773 (name "guile3.0-pfds")
774 (native-inputs `(("guile" ,guile-3.0)))
775 (arguments
0dd1e277
RW
776 (substitute-keyword-arguments (package-arguments guile-pfds)
777 ((#:phases phases)
778 `(modify-phases ,phases
779 (add-after 'unpack 'work-around-guile-bug
780 (lambda _
781 ;; See bug #39210.
782 (substitute* '("fingertrees.sls"
783 "queues/private/condition.sls"
784 "deques/private/condition.sls")
785 (("&assertion") "&violation"))
786 #t))))))))
77c95ee6 787
0791437f
RW
788(define-public guile-aa-tree
789 (package
790 (name "guile-aa-tree")
791 (version "3.1.1")
792 (source (origin
793 (method url-fetch)
794 (uri (string-append "mirror://savannah/guile-aa-tree/guile-aa-tree-"
795 version ".tar.gz"))
796 (sha256
797 (base32
798 "0044c105r3q9vpl17pv3phl1b79kjm1llhkakqgiasixyav01blh"))))
799 (build-system guile-build-system)
800 (native-inputs `(("guile" ,guile-2.2)))
801 ;; https://savannah.nongnu.org/projects/guile-aa-tree
802 (home-page "https://qlfiles.net/guile-aa-tree/")
803 (synopsis "AA tree data structure for Guile")
804 (description
805 "This package provides an implementation of @dfn{AA trees}, a
806self-balancing binary tree data structure, for Guile. It ensure @math{O(log
807n)} worst case performance for core operations. The module provides
808non-mutating insert, delete, and search operations, with support for
809convenient nested tree operations.")
810 (license license:gpl3+)))
811
812(define-public guile-simple-zmq
813 (let ((commit "68bedb6679716214fb9d3472da57544526f7a618")
814 (revision "3"))
815 (package
816 (name "guile-simple-zmq")
817 (version (git-version "0.0.0" revision commit))
818 (source
819 (origin
820 (method git-fetch)
821 (uri (git-reference
822 (url "https://github.com/jerry40/guile-simple-zmq")
823 (commit commit)))
824 (sha256
825 (base32
826 "1ad3xg69qqviy1f6dnlw0ysmfdbmp1jq65rfqb8nfd8dsrq2syli"))
827 (file-name (git-file-name name version))))
828 (build-system guile-build-system)
829 (arguments
830 `(#:source-directory "src"
831 #:phases (modify-phases %standard-phases
832 (add-after 'unpack 'set-libzmq-file-name
833 (lambda* (#:key inputs #:allow-other-keys)
834 (substitute* "src/simple-zmq.scm"
835 (("\\(dynamic-link \"libzmq\"\\)")
836 (format #f "(dynamic-link \"~a/lib/libzmq.so\")"
837 (assoc-ref inputs "zeromq"))))
838 #t)))))
839 (native-inputs
840 `(("guile" ,guile-2.2)))
841 (inputs
842 `(("zeromq" ,zeromq)))
843 (home-page "https://github.com/jerry40/guile-simple-zmq")
844 (synopsis "Guile wrapper over ZeroMQ library")
845 (description
846 "This package provides a Guile programming interface to the ZeroMQ
847messaging library.")
848 (license license:gpl3+))))
849
015bb1c8
LC
850(define-public guile3.0-simple-zmq
851 (package
852 (inherit guile-simple-zmq)
853 (name "guile3.0-simple-zmq")
854 (native-inputs `(("guile" ,guile-next)))))
855
0791437f
RW
856(define-public jupyter-guile-kernel
857 (let ((commit "a7db9245a886e104138474df46c3e88b95cff629")
858 (revision "1"))
859 (package
860 (name "jupyter-guile-kernel")
861 (version (git-version "0.0.0" revision commit))
862 (source
863 (origin
864 (method git-fetch)
865 (uri (git-reference
866 (url "https://github.com/jerry40/guile-kernel")
867 (commit commit)))
f1d4d79f 868 (file-name (git-file-name name version))
0791437f
RW
869 (sha256
870 (base32
871 "0aj04853bqm47ivfcmrgpb7w3wkis847kc7qrwsa5zcn9h38qh2f"))))
872 (build-system guile-build-system)
873 (arguments
874 '(#:phases (modify-phases %standard-phases
875 (add-after 'unpack 'set-openssl-file-name
876 (lambda* (#:key inputs #:allow-other-keys)
877 ;; Record the absolute file name of the 'openssl'
878 ;; command.
879 (substitute* "src/hmac.scm"
880 (("openssl")
881 (string-append (assoc-ref inputs "openssl")
882 "/bin/openssl")))
883 #t))
884
885 ;; XXX: The code uses 'include' to include its own source
886 ;; files, and "-L src" isn't enough in this case.
887 (add-before 'build 'chdir
888 (lambda _ (chdir "src") #t))
889 (add-after 'build 'chdir-back
890 (lambda _ (chdir "..") #t))
891
892 (add-after 'install 'install-kernel
893 (lambda* (#:key inputs outputs #:allow-other-keys)
894 (let* ((out (assoc-ref outputs "out"))
895 (json (assoc-ref inputs "guile-json"))
896 (zmq (assoc-ref inputs "guile-simple-zmq"))
897 (deps (list json zmq))
898 (dir (string-append
899 out "/share/jupyter/kernels/guile"))
900 (effective (target-guile-effective-version)))
901 ;; Install kernel.
902 (install-file "src/kernel.json" dir)
903
904 ;; Fix hard-coded file name in the kernel.
905 (substitute* (string-append dir "/kernel.json")
906 (("/home/.*/guile-jupyter-kernel.scm")
907 (string-append out "/share/guile/site/"
908 (target-guile-effective-version)
909 "/guile-jupyter-kernel.scm"))
910 (("\"guile\"")
911 (string-append "\"" (assoc-ref inputs "guile")
912 "/bin/guile\""))
913 (("-s")
914 ;; Add '-L' and '-C' flags so that the kernel
915 ;; finds its dependencies.
916 (let ((-L (map (lambda (item)
917 (string-append "\"" item
918 "/share/guile/site/"
919 effective "\""))
920 deps))
921 (-C (map (lambda (item)
922 (string-append "\"" item
923 "/lib/guile/"
924 effective
925 "/site-ccache\""))
926 deps)))
927 (string-append "--no-auto-compile\""
928 (string-join -L ", \"-L\", "
929 'prefix)
930 (string-join -C ", \"-C\", "
931 'prefix)
932 ", \"-s"))))
933 #t))))))
934 (inputs
935 `(("openssl" ,openssl)
936 ("guile" ,guile-2.2)
91f55717 937 ("guile-json" ,guile-json-1)
0791437f
RW
938 ("guile-simple-zmq" ,guile-simple-zmq)))
939 (synopsis "Guile kernel for the Jupyter Notebook")
940 (description
941 "This package provides a Guile 2.x kernel for the Jupyter Notebook. It
942allows users to interact with the Guile REPL through Jupyter.")
943 (home-page "https://github.com/jerry40/guile-kernel")
944 (license license:gpl3+))))
945
946(define-public guile-sparql
947 (package
948 (name "guile-sparql")
949 (version "0.0.7")
950 (source (origin
951 (method url-fetch)
952 (uri (string-append
953 "https://github.com/roelj/guile-sparql/releases/download/"
954 version "/guile-sparql-" version ".tar.gz"))
955 (sha256
956 (base32 "1drnvhsgl0gc5crmb16yyw1j98nkhwwcgssv9vgm36ng43nnzffd"))))
957 (build-system gnu-build-system)
958 (arguments `(#:tests? #f)) ; There are no tests.
959 (native-inputs
960 `(("pkg-config" ,pkg-config)))
961 (inputs
962 `(("guile" ,guile-2.2)))
963 (home-page "https://github.com/roelj/guile-sparql")
964 (synopsis "SPARQL module for Guile")
965 (description "This package provides the functionality to query a SPARQL
966endpoint. Additionally, it provides an interface to write SPARQL queries
967using S-expressions.")
968 (license license:gpl3+)))
969
970(define-public guile-debbugs
971 (package
972 (name "guile-debbugs")
973 (version "0.0.2")
974 (source (origin
975 (method url-fetch)
976 (uri (string-append "mirror://gnu/guile-debbugs/guile-debbugs-"
977 version ".tar.gz"))
978 (sha256
979 (base32
980 "16l8910p57im6s3j93xhdaqvgfy6ms5n97177mrch3y961z5hy0i"))
981 (modules '((guix build utils)))
982 (snippet
983 '(substitute* "Makefile.in"
984 (("^godir = (.*)/ccache" _ prefix)
985 (string-append "godir = " prefix "/site-ccache"))))))
986 (build-system gnu-build-system)
987 (native-inputs
988 `(("guile" ,guile-2.2)
989 ("pkg-config" ,pkg-config)))
990 (home-page "https://savannah.gnu.org/projects/guile-debbugs/")
991 (synopsis "Guile interface to the Debbugs bug tracking service")
992 (description
993 "This package provides a Guile library to communicate with a Debbugs bug
994tracker's SOAP service, such as @url{https://bugs.gnu.org}.")
995 (license license:gpl3+)))
996
997(define-public guile-email
50771f5b
AI
998 (package
999 (name "guile-email")
223cb7c6 1000 (version "0.2.2")
50771f5b
AI
1001 (source
1002 (origin
1003 (method url-fetch)
1004 (uri (string-append
db18d87a
AI
1005 "https://guile-email.systemreboot.net/releases/guile-email-"
1006 version ".tar.lz"))
50771f5b
AI
1007 (sha256
1008 (base32
223cb7c6 1009 "1rc8r0fgvflnyq5ckl7ii8sghpsgpkzxa8vskjr1ak2kyar6m35k"))))
50771f5b
AI
1010 (build-system gnu-build-system)
1011 (native-inputs
1012 `(("pkg-config" ,pkg-config)
db18d87a 1013 ("lzip" ,lzip)))
50771f5b
AI
1014 (inputs
1015 `(("guile" ,guile-2.2)))
db18d87a 1016 (arguments
2c33a849 1017 '(#:make-flags '("GUILE_AUTO_COMPILE=0"))) ; to prevent guild warnings
db18d87a 1018 (home-page "https://guile-email.systemreboot.net")
50771f5b 1019 (synopsis "Guile email parser")
db18d87a
AI
1020 (description "guile-email is a collection of email utilities implemented
1021in pure guile. It supports parsing MIME (Multipurpose Internet Mail
1022Extensions) compliant email messages and reading emails from the mbox
1023format.")
50771f5b 1024 (license license:agpl3+)))
0791437f
RW
1025
1026(define-public guile-debbugs-next
014c3012
RW
1027 (let ((commit "fb0ae064037a38a0d526e08b4ad24c52e205edb9")
1028 (revision "2"))
0791437f
RW
1029 (package (inherit guile-debbugs)
1030 (name "guile-debbugs")
1031 (version (git-version "0.0.3" revision commit))
1032 (source (origin
1033 (method git-fetch)
1034 (uri (git-reference
1035 (url "https://git.savannah.gnu.org/git/guile-debbugs.git")
1036 (commit commit)))
1037 (file-name (git-file-name name version))
1038 (sha256
1039 (base32
014c3012 1040 "195sacx2xc1mzzfljj62nfpi8mxn0rc6dabxckizjksnhb5irfwy"))))
0791437f
RW
1041 (build-system gnu-build-system)
1042 (native-inputs
1043 `(("pkg-config" ,pkg-config)
1044 ("autoconf" ,autoconf)
1045 ("automake" ,automake)
1046 ("texinfo" ,texinfo)))
1047 (inputs
1048 `(("guile" ,guile-2.2)
1049 ("guile-email" ,guile-email))))))
1050
0791437f 1051(define-public guile-newt
442a11f6
MO
1052 (package
1053 (name "guile-newt")
1054 (version "0.0.1")
1055 (source (origin
1056 (method git-fetch)
1057 (uri (git-reference
1058 (url "https://gitlab.com/mothacehe/guile-newt")
1059 (commit version)))
1060 (file-name (git-file-name name version))
1061 (sha256
1062 (base32
e7fc7746
LC
1063 "1w7qy4dw1f4bx622l6hw8mv49sf1ha8kch8j4nganyk8fj0wn695"))
1064 (modules '((guix build utils)))
1065 (snippet
1066 '(begin
1067 ;; Allow builds with Guile 3.0.
1068 (substitute* "configure.ac"
1069 (("^GUILE_PKG.*")
1070 "GUILE_PKG([3.0 2.2 2.0])\n"))
1071
1072 ;; Remove "guile.m4" since it contains an obsolete version
1073 ;; of 'GUILE_PKG' that doesn't work with development
1074 ;; versions such as 2.9.
1075 (delete-file "m4/guile.m4")
1076 #t))))
442a11f6
MO
1077 (build-system gnu-build-system)
1078 (arguments
1079 '(#:make-flags
1080 '("GUILE_AUTO_COMPILE=0"))) ;to prevent guild warnings
1081 (inputs
1082 `(("guile" ,guile-2.2)
1083 ("newt" ,newt)))
1084 (native-inputs
1085 `(("autoconf" ,autoconf)
1086 ("automake" ,automake)
1087 ("pkg-config" ,pkg-config)))
1088 (synopsis "Guile bindings to Newt")
1089 (description
1090 "This package provides bindings for Newt, a programming library for
0791437f
RW
1091color text mode, widget based user interfaces. The bindings are written in pure
1092Scheme by using Guile’s foreign function interface.")
442a11f6
MO
1093 (home-page "https://gitlab.com/mothacehe/guile-newt")
1094 (license license:gpl3+)))
0791437f 1095
e7fc7746
LC
1096(define-public guile3.0-newt
1097 (package
1098 (inherit guile-newt)
1099 (name "guile3.0-newt")
1100 (inputs `(("guile" ,guile-next)
1101 ,@(alist-delete "guile" (package-inputs guile-newt))))))
1102
0791437f
RW
1103(define-public guile-mastodon
1104 (package
1105 (name "guile-mastodon")
1106 (version "0.0.1")
1107 (source (origin
1108 (method git-fetch)
1109 (uri (git-reference
1110 (url "https://framagit.org/prouby/guile-mastodon.git")
1111 (commit (string-append "v" version))))
1112 (file-name (git-file-name name version))
1113 (sha256
1114 (base32
1115 "1vblf3d1bbwna3l09p2ap5y8ycvl549bz6whgk78imyfmn28ygry"))))
1116 (build-system gnu-build-system)
1117 (native-inputs
1118 `(("autoconf" ,autoconf)
1119 ("automake" ,automake)
1120 ("pkg-config" ,pkg-config)))
1121 (inputs
1122 `(("guile" ,guile-2.2)
1123 ("gnutls" ,gnutls)
91f55717 1124 ("guile-json" ,guile-json-1)))
0791437f
RW
1125 (home-page "https://framagit.org/prouby/guile-mastodon")
1126 (synopsis "Guile Mastodon REST API module")
1127 (description "This package provides Guile modules to access the
1128@uref{https://docs.joinmastodon.org/api/, REST API of Mastodon}, a federated
1129microblogging service.")
1130 (license license:gpl3+)))
1131
0791437f 1132(define-public guile-parted
dbcd503c
MO
1133 (package
1134 (name "guile-parted")
a3246602 1135 (version "0.0.2")
dbcd503c
MO
1136 (source (origin
1137 (method git-fetch)
1138 (uri (git-reference
1139 (url "https://gitlab.com/mothacehe/guile-parted")
1140 (commit version)))
1141 (file-name (git-file-name name version))
1142 (sha256
1143 (base32
e5b95558
LC
1144 "01qmv6xnbbq3wih0dl9bscvca2d7zx7bjiqf35y6dkaqsp8nvdxf"))
1145 (modules '((guix build utils)))
1146 (snippet
1147 '(begin
1148 ;; Allow builds with Guile 3.0.
1149 (substitute* "configure.ac"
1150 (("^GUILE_PKG.*")
1151 "GUILE_PKG([3.0 2.2 2.0])\n"))
1152
1153 ;; Remove "guile.m4" since it contains an obsolete version
1154 ;; of 'GUILE_PKG' that doesn't work with development
1155 ;; versions such as 2.9.
1156 (delete-file "m4/guile.m4")
1157 #t))))
dbcd503c
MO
1158 (build-system gnu-build-system)
1159 (arguments
1160 '(#:make-flags
1161 '("GUILE_AUTO_COMPILE=0"))) ;to prevent guild warnings
1162 (inputs
1163 `(("guile" ,guile-2.2)
1164 ("parted" ,parted)))
1165 (propagated-inputs
1166 `(("guile-bytestructures" ,guile-bytestructures)))
1167 (native-inputs
1168 `(("autoconf" ,autoconf)
1169 ("automake" ,automake)
1170 ("pkg-config" ,pkg-config)))
1171 (synopsis "Guile bindings to GNU Parted")
1172 (description
1173 "This package provides bindings for GNU Parted library, a C library
1174allowing disk partition tables creation and manipulation. The bindings are
0791437f 1175written in pure Scheme by using Guile's foreign function interface.")
dbcd503c
MO
1176 (home-page "https://gitlab.com/mothacehe/guile-parted")
1177 (license license:gpl3+)))
0791437f 1178
e5b95558
LC
1179(define-public guile3.0-parted
1180 (package
1181 (inherit guile-parted)
1182 (name "guile3.0-parted")
1183 (inputs `(("guile" ,guile-next)
1184 ,@(alist-delete "guile" (package-inputs guile-parted))))
1185 (propagated-inputs
1186 `(("guile-bytestructures" ,guile3.0-bytestructures)))))
1187
0791437f
RW
1188(define-public guile-xosd
1189 (package
1190 (name "guile-xosd")
1191 (version "0.2.1")
1192 (source (origin
1193 (method url-fetch)
1194 (uri (string-append "https://github.com/alezost/" name
1195 "/releases/download/v" version
1196 "/" name "-" version ".tar.gz"))
1197 (sha256
1198 (base32
1199 "1ri5065c16kmgrf2pysn2ymxjqi5302lhpb07wkl1jr75ym8fn8p"))))
1200 (build-system gnu-build-system)
1201 (native-inputs
1202 `(("pkg-config" ,pkg-config)))
1203 (inputs
1204 `(("guile" ,guile-2.2)
1205 ("libx11" ,libx11)
1206 ("libxext" ,libxext)
1207 ("libxinerama" ,libxinerama)
1208 ("xosd" ,xosd)))
1209 (home-page "https://github.com/alezost/guile-xosd")
1210 (synopsis "XOSD bindings for Guile")
1211 (description
1212 "Guile-XOSD provides Guile bindings for @code{libxosd},
1213@uref{http://sourceforge.net/projects/libxosd/, the X On Screen Display
1214library}.")
1215 (license license:gpl3+)))
1216
1217(define-public guile-dbi
1218 (package
1219 (name "guile-dbi")
1220 (version "2.1.6")
1221 (source (origin
1222 (method url-fetch)
1223 (uri (string-append
1224 "http://download.gna.org/guile-dbi/guile-dbi-"
1225 version ".tar.gz"))
1226 (sha256
1227 (base32
1228 "116njrprhgrsv1qm904sp3b02rq01fx639r433d657gyhw3x159n"))))
1229 (build-system gnu-build-system)
1230 (arguments
1231 '(#:configure-flags
1232 (list (string-append
1233 "--with-guile-site-dir=" %output "/share/guile/site/2.2"))
1234 #:make-flags
406ef442
CB
1235 (list (string-append
1236 "LDFLAGS=-Wl,-rpath=" %output "/lib:"
1237 (assoc-ref %build-inputs "guile-dbd-sqlite3") "/lib" ":"
1238 (assoc-ref %build-inputs "guile-dbd-postgresql") "/lib"))
0791437f
RW
1239 #:phases
1240 (modify-phases %standard-phases
1241 (add-after 'install 'patch-extension-path
1242 (lambda* (#:key outputs #:allow-other-keys)
1243 (let* ((out (assoc-ref outputs "out"))
1244 (dbi.scm (string-append
1245 out "/share/guile/site/2.2/dbi/dbi.scm"))
1246 (ext (string-append out "/lib/libguile-dbi")))
1247 (substitute* dbi.scm (("libguile-dbi") ext))
1248 #t))))))
1249 (inputs
406ef442
CB
1250 `(("guile-dbd-sqlite3" ,guile-dbd-sqlite3)
1251 ("guile-dbd-postgresql" ,guile-dbd-postgresql))) ; only shared library, no scheme files
0791437f
RW
1252 (propagated-inputs
1253 `(("guile" ,guile-2.2)))
1254 (synopsis "Guile database abstraction layer")
1255 (home-page "http://home.gna.org/guile-dbi/guile-dbi.html")
1256 (description
1257 "guile-dbi is a library for Guile that provides a convenient interface to
1258SQL databases. Database programming with guile-dbi is generic in that the same
1259programming interface is presented regardless of which database system is used.
1260It currently supports MySQL, Postgres and SQLite3.")
1261 (license license:gpl2+)))
1262
1263(define guile-dbi-bootstrap
1264 (package
1265 (inherit guile-dbi)
1266 (name "guile-dbi-bootstrap")
1267 (inputs '())
1268 (arguments
1269 (substitute-keyword-arguments (package-arguments guile-dbi)
1270 ((#:make-flags _) '(list))))))
1271
1272(define-public guile-dbd-sqlite3
1273 (package
1274 (name "guile-dbd-sqlite3")
1275 (version "2.1.6")
1276 (source (origin
1277 (method url-fetch)
1278 (uri (string-append
1279 "http://download.gna.org/guile-dbi/guile-dbd-sqlite3-"
1280 version ".tar.gz"))
1281 (sha256
1282 (base32
1283 "0rg71jchxd2y8x496s8zmfmikr5g8zxi8zv2ar3f7a23pph92iw2"))))
1284 (build-system gnu-build-system)
1285 (native-inputs
1286 `(("pkg-config" ,pkg-config)
1287 ("guile-dbi-bootstrap" ,guile-dbi-bootstrap))) ; only required for headers
1288 (inputs
1289 `(("sqlite" ,sqlite)
1290 ("zlib" ,(@ (gnu packages compression) zlib))))
1291 (synopsis "Guile DBI driver for SQLite")
1292 (home-page "https://github.com/jkalbhenn/guile-dbd-sqlite3")
1293 (description
1294 "guile-dbi is a library for Guile that provides a convenient interface to
1295SQL databases. This package implements the interface for SQLite.")
1296 (license license:gpl2+)))
1297
406ef442
CB
1298(define-public guile-dbd-postgresql
1299 (let ((commit "e97589b6b018b206c901e4cc24db463407a4036b")
1300 (revision 0))
1301 (package
1302 (name "guile-dbd-postgresql")
1303 (version (string-append
1304 "2.1.6-" (number->string revision) "." (string-take commit 7)))
1305 (source
1306 (origin
1307 (method git-fetch)
1308 (uri (git-reference
1309 (url "https://github.com/opencog/guile-dbi.git")
1310 (commit commit)))
1311 (file-name (git-file-name name version))
1312 (sha256
1313 (base32 "0n1gv9a0kdys10a4qmnrwvg5sydwb03880asri4gqdchcj3fimni"))))
1314 (build-system gnu-build-system)
1315 (arguments
1316 '(#:phases
1317 (modify-phases %standard-phases
1318 (add-after 'unpack 'chdir
1319 (lambda _
1320 ;; The upstream Git repository contains all the code, so change
1321 ;; to the relevant directory.
1322 (chdir "guile-dbd-postgresql")
1323 #t))
1324 (add-after 'chdir 'patch-src/Makefile.am
1325 (lambda* (#:key inputs #:allow-other-keys)
1326 (substitute* "src/Makefile.am"
1327 (("/usr/include")
1328 (string-append (assoc-ref inputs "postgresql") "/include")))
1329 #t))
1330 (add-after 'patch-src/Makefile.am 'patch-src
1331 (lambda _
1332 (substitute* "src/guile-dbd-postgresql.c"
1333 (("postgresql/libpq-fe\\.h") "libpq-fe.h"))
1334 #t)))))
1335 (native-inputs
1336 `(("pkg-config" ,pkg-config)
1337 ("automake" ,automake)
1338 ("autoconf" ,autoconf)
1339 ("perl" ,perl)
1340 ("libtool" ,libtool)
1341 ("guile-dbi-bootstrap" ,guile-dbi-bootstrap)))
1342 (inputs
1343 `(("postgresql" ,postgresql)
1344 ("zlib" ,zlib)))
1345 (synopsis "Guile DBI driver for PostgreSQL")
1346 (home-page
1347 "https://github.com/opencog/guile-dbi/tree/master/guile-dbd-postgresql")
1348 (description
1349 "@code{guile-dbi} is a library for Guile that provides a convenient
1350interface to SQL databases. This package implements the interface for
1351PostgreSQL.")
1352 (license license:gpl2+))))
1353
0791437f
RW
1354(define-public guile-config
1355 (package
1356 (name "guile-config")
91e29547 1357 (version "0.3.1")
0791437f
RW
1358 (source
1359 (origin
1360 (method git-fetch)
1361 (uri (git-reference
1362 (url "https://gitlab.com/a-sassmannshausen/guile-config")
91e29547
AS
1363 (commit (string-append "v" version))))
1364 (file-name (git-file-name name version))
1365 (sha256 (base32
1366 "0gglsqwpw77gvrqcny8irpqfl7qdf2v8n9ggwrswanxalj4vcbvf"))))
0791437f
RW
1367 (build-system gnu-build-system)
1368 (native-inputs
1369 `(("autoconf" ,autoconf)
1370 ("automake" ,automake)
1371 ("pkg-config" ,pkg-config)
1372 ("texinfo" ,texinfo)))
1373 (inputs `(("guile" ,guile-2.2)))
1374 (synopsis
1375 "Guile application configuration parsing library.")
1376 (description
1377 "Guile Config is a library providing a declarative approach to
1378application configuration specification. The library provides clean
1379configuration declaration forms, and processors that take care of:
1380configuration file creation; configuration file parsing; command-line
1381parameter parsing using getopt-long; basic GNU command-line parameter
1382generation (--help, --usage, --version); automatic output generation for the
1383above command-line parameters.")
1384 (home-page
1385 "https://gitlab.com/a-sassmannshausen/guile-config")
1386 (license license:gpl3+)))
1387
0ac6b836
AS
1388(define-public guile3.0-config
1389 (package
1390 (inherit guile-config)
1391 (name "guile3.0-config")
1392 (inputs `(("guile" ,guile-next)
1393 ,@(alist-delete "guile" (package-inputs guile-config))))))
1394
0791437f
RW
1395(define-public guile-hall
1396 (package
1397 (name "guile-hall")
cfc4e498 1398 (version "0.2.1")
0791437f 1399 (source
feb11b08
RW
1400 (origin
1401 (method git-fetch)
1402 (uri (git-reference
1403 (url "https://gitlab.com/a-sassmannshausen/guile-hall")
1404 (commit (string-append "v" version))))
1405 (file-name (git-file-name name version))
1406 (sha256 (base32
cfc4e498 1407 "0dwx5iyg0dmdf64wq0b4w306bapr86jwnw35npgbjq4cqm8qbzqn"))))
0791437f
RW
1408 (build-system gnu-build-system)
1409 (arguments
63bf0afd
AS
1410 `(#:modules
1411 ((ice-9 match)
1412 (ice-9 ftw)
1413 ,@%gnu-build-system-modules)
1414 #:phases
1415 (modify-phases
1416 %standard-phases
1417 (add-after 'install 'hall-wrap-binaries
1418 (lambda* (#:key inputs outputs #:allow-other-keys)
1419 (let* ((compiled-dir
1420 (lambda (out version)
1421 (string-append
1422 out "/lib/guile/" version "/site-ccache")))
1423 (uncompiled-dir
1424 (lambda (out version)
1425 (string-append
1426 out "/share/guile/site"
1427 (if (string-null? version) "" "/") version)))
1428 (dep-path
1429 (lambda (env modules path)
1430 (list env ":" 'prefix
1431 (cons modules
1432 (map (lambda (input)
1433 (string-append
1434 (assoc-ref inputs input)
1435 path))
1436 ,''("guile-config"))))))
1437 (out (assoc-ref outputs "out"))
1438 (bin (string-append out "/bin/"))
1439 (site (uncompiled-dir out "")))
1440 (match (scandir site)
1441 (("." ".." version)
1442 (for-each
1443 (lambda (file)
1444 (wrap-program
1445 (string-append bin file)
1446 (dep-path
1447 "GUILE_LOAD_PATH"
1448 (uncompiled-dir out version)
1449 (uncompiled-dir "" version))
1450 (dep-path
1451 "GUILE_LOAD_COMPILED_PATH"
1452 (compiled-dir out version)
1453 (compiled-dir "" version))))
1454 ,''("hall"))
1455 #t))))))))
0791437f 1456 (native-inputs
63bf0afd
AS
1457 `(("autoconf" ,autoconf)
1458 ("automake" ,automake)
1459 ("pkg-config" ,pkg-config)
1460 ("texinfo" ,texinfo)))
0791437f
RW
1461 (inputs `(("guile" ,guile-2.2)))
1462 (propagated-inputs
3c3e6620 1463 `(("guile-config" ,guile-config)))
0791437f
RW
1464 (synopsis "Guile project tooling")
1465 (description
3c3e6620
RW
1466 "Hall is a command-line application and a set of Guile libraries that
1467allow you to quickly create and publish Guile projects. It allows you to
1468transparently support the GNU build system, manage a project hierarchy &
1469provides tight coupling to Guix.")
1470 (home-page "https://gitlab.com/a-sassmannshausen/guile-hall")
06085fac 1471 (license license:gpl3+)))
0791437f 1472
df18ea6f
AS
1473(define-public guile3.0-hall
1474 (package
1475 (inherit guile-hall)
1476 (name "guile3.0-hall")
1477 (inputs `(("guile" ,guile-next)
1478 ,@(alist-delete "guile" (package-inputs guile-hall))))
1479 (propagated-inputs
1480 `(("guile-config" ,guile3.0-config)
1481 ,@(alist-delete "guile-config"
1482 (package-propagated-inputs guile-hall))))))
1483
0791437f
RW
1484(define-public guile-ics
1485 (package
1486 (name "guile-ics")
1487 (version "0.2.0")
1488 (source (origin
1489 (method git-fetch)
1490 (uri (git-reference
1491 (url "https://github.com/artyom-poptsov/guile-ics")
1492 (commit (string-append "v" version))))
1493 (file-name (string-append name "-" version "-checkout"))
1494 (sha256
1495 (base32
1496 "0qjjvadr7gibdq9jvwkmlkb4afsw9n2shfj9phpiadinxk3p4m2g"))))
1497 (build-system gnu-build-system)
1498 (native-inputs
1499 `(("autoconf" ,autoconf-wrapper)
1500 ("automake" ,automake)
1501 ("texinfo" ,texinfo)
1502 ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'.
1503 ("gettext" ,gettext-minimal)
1504 ("pkg-config" ,pkg-config)))
1505 (inputs `(("guile" ,guile-2.2) ("which" ,which)))
1506 (propagated-inputs `(("guile-lib" ,guile-lib)))
1507 (home-page "https://github.com/artyom-poptsov/guile-ics")
1508 (synopsis "Guile parser library for the iCalendar format")
1509 (description
1510 "Guile-ICS is an iCalendar (RFC5545) format parser library written in
1511pure Scheme. The library can be used to read and write iCalendar data.
1512
1513The library is shipped with documentation in Info format and usage examples.")
1514 (license license:gpl3+)))
1515
1516(define-public guile-wisp
1517 (package
1518 (name "guile-wisp")
65610f73 1519 (version "1.0.2")
0791437f
RW
1520 (source (origin
1521 (method url-fetch)
1522 (uri (string-append "https://bitbucket.org/ArneBab/"
1523 "wisp/downloads/wisp-"
1524 version ".tar.gz"))
1525 (sha256
1526 (base32
65610f73 1527 "03pz7pj9jyallynhflp5s7qax8dj1fs8la434wrfgz7g1kgjnvf6"))))
0791437f
RW
1528 (build-system gnu-build-system)
1529 (arguments
1530 `(#:modules ((guix build gnu-build-system)
15218d4e 1531 ((guix build emacs-build-system) #:prefix emacs:)
0791437f 1532 (guix build utils)
15218d4e 1533 (guix build emacs-utils)
0791437f
RW
1534 (ice-9 rdelim)
1535 (ice-9 popen))
15218d4e
RW
1536 #:imported-modules (,@%gnu-build-system-modules
1537 (guix build emacs-build-system)
1538 (guix build emacs-utils))
0791437f
RW
1539 #:phases
1540 (modify-phases %standard-phases
1541 (add-before 'configure 'patch-/usr/bin/env
1542 (lambda _
1543 (substitute* "Makefile.in"
65610f73 1544 (("/usr/bin/env bash") (which "bash")))
0791437f
RW
1545 #t))
1546 ;; auto compilation breaks, but if we set HOME to /tmp,
1547 ;; that works ok
1548 (add-before 'check 'auto-compile-hacky-workaround
1549 (lambda _ (setenv "HOME" "/tmp") #t))
1550 (add-after 'install 'install-go-files
1551 (lambda* (#:key outputs inputs #:allow-other-keys)
1552 (let* ((out (assoc-ref outputs "out"))
1553 (effective (read-line
1554 (open-pipe* OPEN_READ
1555 "guile" "-c"
1556 "(display (effective-version))")))
1557 (module-dir (string-append out "/share/guile/site/"
1558 effective))
1559 (object-dir (string-append out "/lib/guile/" effective
1560 "/site-ccache"))
1561 (prefix (string-length module-dir)))
1562 ;; compile to the destination
1563 (for-each (lambda (file)
1564 (let* ((base (string-drop (string-drop-right file 4)
1565 prefix))
1566 (go (string-append object-dir base ".go")))
1567 (invoke "guild" "compile" "-L" module-dir
1568 file "-o" go)))
1569 (find-files module-dir "\\.scm$"))
15218d4e
RW
1570 #t)))
1571 (add-after 'install 'install-emacs-files
1572 (assoc-ref emacs:%standard-phases 'install))
1573 (add-after 'install-emacs-files 'compile-emacs-files
1574 (assoc-ref emacs:%standard-phases 'build))
1575 (add-after 'compile-emacs-files 'make-autoloads
1576 (assoc-ref emacs:%standard-phases 'make-autoloads)))))
17f90b67 1577 (home-page "https://www.draketo.de/english/wisp")
0791437f
RW
1578 (inputs
1579 `(("guile" ,guile-2.2)))
1580 (native-inputs
15218d4e
RW
1581 `(("emacs" ,emacs-minimal)
1582 ("python" ,python)
0791437f
RW
1583 ("pkg-config" ,pkg-config)))
1584 (synopsis "Whitespace to lisp syntax for Guile")
1585 (description "Wisp is a syntax for Guile which provides a Python-like
1586whitespace-significant language. It may be easier on the eyes for some
1587users and in some situations.")
1588 (license license:gpl3+)))
1589
b0b725ed
RW
1590(define-public guile3.0-wisp
1591 (package
1592 (inherit guile-wisp)
1593 (name "guile3.0-wisp")
1594 (inputs `(("guile" ,guile-3.0)))
1595 (arguments
1596 (substitute-keyword-arguments (package-arguments guile-wisp)
1597 ((#:phases phases)
1598 `(modify-phases ,phases
1599 (add-after 'unpack 'support-guile-3.0
1600 (lambda _
1601 (substitute* "configure"
1602 (("_guile_versions_to_search=\"2.2")
1603 "_guile_versions_to_search=\"3.0 2.2"))
1604 #t))))))))
1605
0791437f
RW
1606(define-public guile-sly
1607 (package
1608 (name "guile-sly")
1609 (version "0.1")
1610 (source (origin
1611 (method url-fetch)
1612 (uri (string-append "https://files.dthompson.us/sly/sly-"
1613 version ".tar.gz"))
1614 (sha256
1615 (base32
1616 "1svzlbz2vripmyq2kjh0rig16bsrnbkwbsm558pjln9l65mcl4qq"))
1617 (modules '((guix build utils)))
1618 (snippet
1619 '(begin
1620 (substitute* "configure"
1621 (("_guile_required_version=\"2.0.11\"")
1622 "_guile_required_version=\"2\"")
1623 (("ac_subst_vars='")
1624 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
1625 (substitute* (find-files "." "Makefile.in")
1626 (("moddir = .*$")
1627 (string-append
1628 "moddir = "
1629 "$(prefix)/share/guile/site/@GUILE_EFFECTIVE_VERSION@\n"))
1630 (("godir = .*$")
1631 (string-append
1632 "godir = "
1633 "$(prefix)/lib/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n")))
1634 #t))))
1635 (build-system gnu-build-system)
1636 (arguments
1637 '(#:configure-flags
1638 (list (string-append "--with-libfreeimage-prefix="
1639 (assoc-ref %build-inputs "freeimage"))
1640 (string-append "--with-libgslcblas-prefix="
1641 (assoc-ref %build-inputs "gsl")))))
1642 (native-inputs
1643 `(("pkg-config" ,pkg-config)))
1644 (propagated-inputs
1645 `(("guile-sdl" ,guile-sdl)
1646 ("guile-opengl" ,guile-opengl)))
1647 (inputs
1648 `(("guile" ,guile-2.2)
1649 ("gsl" ,gsl)
1650 ("freeimage" ,freeimage)
1651 ("mesa" ,mesa)))
1652 (synopsis "2D/3D game engine for GNU Guile")
1653 (description "Sly is a 2D/3D game engine written in Guile Scheme. Sly
1654features a functional reactive programming interface and live coding
1655capabilities.")
1656 (home-page "https://dthompson.us/projects/sly.html")
1657 (license license:gpl3+)))
1658
1659(define-public g-wrap
1660 (package
1661 (name "g-wrap")
1662 (version "1.9.15")
1663 (source (origin
1664 (method url-fetch)
1665 (uri (string-append "mirror://savannah/g-wrap/g-wrap-"
1666 version ".tar.gz"))
1667 (sha256
1668 (base32
1669 "0ak0bha37dfpj9kmyw1r8fj8nva639aw5xr66wr5gd3l1rqf5xhg"))))
1670 (build-system gnu-build-system)
1671 (native-inputs
1672 `(("pkg-config" ,pkg-config)))
1673 (propagated-inputs
1674 `(("guile" ,guile-2.2)
1675 ("guile-lib" ,guile-lib)))
1676 (inputs
1677 `(("libffi" ,libffi)))
1678 (arguments
1679 `(#:configure-flags '("--disable-Werror")
1680 #:phases
1681 (modify-phases %standard-phases
1682 (add-before 'configure 'pre-configure
1683 (lambda* (#:key outputs #:allow-other-keys)
1684 (let ((out (assoc-ref outputs "out")))
1685 (substitute* (find-files "." "^Makefile.in$")
1686 (("guilemoduledir =.*guile/site" all)
1687 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))
1688 #t))))))
1689 (synopsis "Generate C bindings for Guile")
1690 (description "G-Wrap is a tool and Guile library for generating function
1691wrappers for inter-language calls. It currently only supports generating Guile
1692wrappers for C functions. Given a definition of the types and prototypes for
1693a given C interface, G-Wrap will automatically generate the C code that
1694provides access to that interface and its types from the Scheme level.")
1695 (home-page "https://www.nongnu.org/g-wrap/index.html")
1696 (license license:lgpl2.1+)))
1697
1698(define-public guile-miniadapton
1699 (let ((commit "1b5749422304567c96ac5367f2221dda9eff5880")
1700 (revision "1"))
1701 (package
1702 (name "guile-miniadapton")
1703 (version (string-append "0-" revision "." (string-take commit 9)))
1704 (source (origin
1705 (method git-fetch)
1706 (uri (git-reference
1707 (url "https://github.com/fisherdj/miniAdapton.git")
1708 (commit commit)))
1709 (file-name (string-append name "-" version "-checkout"))
1710 (sha256
1711 (base32
1712 "09q51zkw2fypad5xixskfzw2cjhjgs5cswdp3i7cpp651rb3zndh"))))
1713 (build-system guile-build-system)
1714 (native-inputs
1715 `(("guile" ,guile-2.2)))
1716 (home-page "https://github.com/fisherdj/miniAdapton")
1717 (synopsis "Minimal implementation of incremental computation in Guile
1718Scheme")
1719 (description "This package provides a complete Scheme implementation of
1720miniAdapton, which implements the core functionality of the Adapton system for
1721incremental computation (also known as self-adjusting computation). Like
1722Adapton, miniAdapton allows programmers to safely combine mutation and
1723memoization. miniAdapton is built on top of an even simpler system,
1724microAdapton. Both miniAdapton and microAdapton are designed to be easy to
1725understand, extend, and port to host languages other than Scheme.")
1726 (license license:expat))))
1727
1728(define-public guile-reader
1729 (package
1730 (name "guile-reader")
1731 (version "0.6.2")
1732 (source (origin
1733 (method url-fetch)
1734 (uri (string-append "mirror://savannah/guile-reader/guile-reader-"
1735 version ".tar.gz"))
1736 (sha256
1737 (base32
1738 "0592s2s8ampqmqwilc4fvcild6rb9gy79di6vxv5kcdmv23abkgx"))))
1739 (build-system gnu-build-system)
1740 (native-inputs `(("pkgconfig" ,pkg-config)
1741 ("gperf" ,gperf-3.0)))
1742 (inputs `(("guile" ,guile-2.2)))
1743 (synopsis "Framework for building readers for GNU Guile")
1744 (description
1745 "Guile-Reader is a simple framework for building readers for GNU Guile.
1746
1747The idea is to make it easy to build procedures that extend Guile’s read
1748procedure. Readers supporting various syntax variants can easily be written,
1749possibly by re-using existing “token readers” of a standard Scheme
1750readers. For example, it is used to implement Skribilo’s R5RS-derived
1751document syntax.
1752
1753Guile-Reader’s approach is similar to Common Lisp’s “read table”, but
1754hopefully more powerful and flexible (for instance, one may instantiate as
1755many readers as needed).")
1756 (home-page "https://www.nongnu.org/guile-reader/")
1757 (license license:gpl3+)))
1758
0791437f
RW
1759(define-public guile-ncurses
1760 (package
1761 (name "guile-ncurses")
2b155e3a 1762 (version "3.0")
0791437f
RW
1763 (source (origin
1764 (method url-fetch)
1765 (uri (string-append "mirror://gnu/guile-ncurses/guile-ncurses-"
1766 version ".tar.gz"))
1767 (sha256
1768 (base32
2b155e3a 1769 "038xbffalhymg26lvmzgf7ljilxz2f2zmqg5r5nfzbipfbprwjhf"))))
0791437f
RW
1770 (build-system gnu-build-system)
1771 (inputs `(("ncurses" ,ncurses)
1772 ("guile" ,guile-2.2)))
1773 (native-inputs `(("pkg-config" ,pkg-config)))
1774 (arguments
1775 '(#:configure-flags (list "--with-ncursesw" ; Unicode support
1776 "--with-gnu-filesystem-hierarchy")
1777 #:phases
1778 (modify-phases %standard-phases
1779 (add-before 'build 'fix-libguile-ncurses-file-name
1780 (lambda* (#:key outputs #:allow-other-keys)
1781 (invoke "make" "install"
1782 "-C" "src/ncurses"
1783 "-j" (number->string
1784 (parallel-job-count)))
1785 (let* ((out (assoc-ref outputs "out"))
1786 (dir "src/ncurses")
1787 (files (find-files dir ".scm")))
1788 (substitute* files
1789 (("\"libguile-ncurses\"")
1790 (format #f "\"~a/lib/guile/2.2/libguile-ncurses\""
1791 out)))
1792 #t))))))
1793 (home-page "https://www.gnu.org/software/guile-ncurses/")
1794 (synopsis "Guile bindings to ncurses")
1795 (description
1796 "guile-ncurses provides Guile language bindings for the ncurses
1797library.")
1798 (license license:lgpl3+)))
1799
1800(define-public guile-ncurses/gpm
1801 (package
1802 (inherit guile-ncurses)
1803 (name "guile-ncurses-with-gpm")
1804 (inputs `(("ncurses" ,ncurses/gpm)
1805 ("guile" ,guile-2.2)))))
1806
1807(define-public guile-lib
1808 (package
1809 (name "guile-lib")
1810 (version "0.2.6.1")
1811 (source (origin
1812 (method url-fetch)
1813 (uri (string-append "mirror://savannah/guile-lib/guile-lib-"
1814 version ".tar.gz"))
1815 (sha256
1816 (base32
675f1940
LC
1817 "0aizxdif5dpch9cvs8zz5g8ds5s4xhfnwza2il5ji7fv2h7ks7bd"))
1818 (modules '((guix build utils)))
1819 (snippet
1820 '(begin
1821 ;; Work around miscompilation on Guile 3.0.0 at -O2:
1822 ;; <https://bugs.gnu.org/39251>.
1823 (substitute* "src/md5.scm"
1824 (("\\(define f-ash ash\\)")
1825 "(define f-ash (@ (guile) ash))\n")
1826 (("\\(define f-add \\+\\)")
1827 "(define f-add (@ (guile) +))\n"))
1828 #t))))
0791437f
RW
1829 (build-system gnu-build-system)
1830 (arguments
1831 '(#:make-flags
1832 '("GUILE_AUTO_COMPILE=0") ; to prevent guild errors
1833 #:phases
1834 (modify-phases %standard-phases
1835 (add-before 'configure 'patch-module-dir
1836 (lambda _
1837 (substitute* "src/Makefile.in"
1838 (("^moddir = ([[:graph:]]+)")
1839 "moddir = $(datadir)/guile/site/@GUILE_EFFECTIVE_VERSION@\n")
1840 (("^godir = ([[:graph:]]+)")
1841 "godir = \
1842$(libdir)/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n"))
1843 #t)))))
1844 (native-inputs `(("pkg-config" ,pkg-config)))
1845 (inputs `(("guile" ,guile-2.2)))
1846 (home-page "https://www.nongnu.org/guile-lib/")
1847 (synopsis "Collection of useful Guile Scheme modules")
1848 (description
1849 "Guile-Lib is intended as an accumulation place for pure-scheme Guile
1850modules, allowing for people to cooperate integrating their generic Guile
1851modules into a coherent library. Think \"a down-scaled, limited-scope CPAN
1852for Guile\".")
1853
1854 ;; The whole is under GPLv3+, but some modules are under laxer
1855 ;; distribution terms such as LGPL and public domain. See `COPYING' for
1856 ;; details.
1857 (license license:gpl3+)))
1858
1859(define-public guile2.0-lib
1860 (package
1861 (inherit guile-lib)
1862 (name "guile2.0-lib")
1863 (inputs `(("guile" ,guile-2.0)))))
1864
675f1940
LC
1865(define-public guile3.0-lib
1866 (package
1867 (inherit guile-lib)
1868 (name "guile3.0-lib")
1869 (inputs `(("guile" ,guile-3.0)))))
1870
0791437f
RW
1871(define-public guile-minikanren
1872 (package
1873 (name "guile-minikanren")
1874 (version "20150424.e844d85")
1875 (source (origin
1876 (method git-fetch)
1877 (uri (git-reference
1878 (url "https://github.com/ijp/minikanren.git")
1879 (commit "e844d85512f8c055d3f96143ee506007389a25e3")))
1880 (file-name (string-append name "-" version "-checkout"))
1881 (sha256
1882 (base32
1883 "0r50jlpzi940jlmxyy3ddqqwmj5r12gb4bcv0ssini9v8km13xz6"))))
1884 (build-system guile-build-system)
1885 (native-inputs
1886 `(("guile" ,guile-2.2)))
1887 (home-page "https://github.com/ijp/minikanren")
1888 (synopsis "MiniKanren declarative logic system, packaged for Guile")
1889 (description
1890 "MiniKanren is a relational programming extension to the Scheme
1891programming Language, written as a smaller version of Kanren suitable for
1892pedagogical purposes. It is featured in the book, The Reasoned Schemer,
1893written by Dan Friedman, William Byrd, and Oleg Kiselyov.
1894
1895This is Ian Price's r6rs packaged version of miniKanren, which deviates
1896slightly from miniKanren mainline.
1897
1898See http://minikanren.org/ for more on miniKanren generally.")
1899 (license license:expat)))
1900
1901(define-public guile2.0-minikanren
1902 (package
1903 (inherit guile-minikanren)
1904 (name "guile2.0-minikanren")
1905 (native-inputs `(("guile" ,guile-2.0)))))
1906
89a99d53
LC
1907(define-public guile3.0-minikanren
1908 (package
1909 (inherit guile-minikanren)
1910 (name "guile3.0-minikanren")
1911 (native-inputs `(("guile" ,guile-next)))))
1912
0791437f
RW
1913(define-public guile-irregex
1914 (package
1915 (name "guile-irregex")
1916 (version "0.9.6")
1917 (source (origin
1918 (method url-fetch)
1919 (uri (string-append
1920 "http://synthcode.com/scheme/irregex/irregex-"
1921 version ".tar.gz"))
1922 (sha256
1923 (base32
1924 "1ia3m7dp3lcxa048q0gqbiwwsyvn99baw6xkhb4bhhzn4k7bwyqq"))))
1925 (build-system guile-build-system)
1926 (arguments
1927 '(#:phases (modify-phases %standard-phases
1928 (add-after 'unpack 'move-files-around
1929 (lambda _
1930 ;; Move the relevant source files to src/ and create the
1931 ;; rx/ directory to match the expected module hierarchy.
1932 (mkdir-p "src/rx/source")
1933 (rename-file "irregex-guile.scm"
1934 "src/rx/irregex.scm")
1935 (rename-file "irregex.scm"
1936 "src/rx/source/irregex.scm")
1937 ;; Not really reachable via guile's packaging system,
1938 ;; but nice to have around.
1939 (rename-file "irregex-utils.scm"
1940 "src/rx/source/irregex-utils.scm")
1941 #t)))
1942 #:source-directory "src"))
1943 (native-inputs
1944 `(("guile" ,guile-2.2)))
1945 (home-page "http://synthcode.com/scheme/irregex")
1946 (synopsis "S-expression based regular expressions")
1947 (description
1948 "Irregex is an s-expression based alternative to your classic
1949string-based regular expressions. It implements SRFI 115 and is deeply
1950inspired by the SCSH regular expression system.")
1951 (license license:bsd-3)))
1952
1953(define-public guile2.0-irregex
1954 (package
1955 (inherit guile-irregex)
1956 (name "guile2.0-irregex")
1957 (native-inputs `(("guile" ,guile-2.0)))))
1958
89a99d53
LC
1959(define-public guile3.0-irregex
1960 (package
1961 (inherit guile-irregex)
1962 (name "guile3.0-irregex")
1963 (native-inputs `(("guile" ,guile-next)))))
1964
0791437f
RW
1965(define-public haunt
1966 (package
1967 (name "haunt")
1968 (version "0.2.4")
1969 (source (origin
1970 (method url-fetch)
1971 (uri (string-append "https://files.dthompson.us/haunt/haunt-"
1972 version ".tar.gz"))
1973 (sha256
1974 (base32
93d94134
LC
1975 "056z4znikk83nr5mr0x2ac3iinqbywa2bvb37mhr566a1q50isfc"))
1976 (modules '((guix build utils)))
1977 (snippet
1978 '(begin
1979 ;; Allow builds with Guile 3.0.
1980 (substitute* "configure"
1981 (("2\\.2 2\\.0")
1982 "3.0 2.2 2.0"))
1983 #t))))
0791437f
RW
1984 (build-system gnu-build-system)
1985 (arguments
1986 `(#:modules ((ice-9 match) (ice-9 ftw)
1987 ,@%gnu-build-system-modules)
1988 #:tests? #f ; test suite is non-deterministic :(
1989 #:phases (modify-phases %standard-phases
1990 (add-after 'install 'wrap-haunt
1991 (lambda* (#:key inputs outputs #:allow-other-keys)
1992 ;; Wrap the 'haunt' command to refer to the right
1993 ;; modules.
1994 (let* ((out (assoc-ref outputs "out"))
1995 (bin (string-append out "/bin"))
1996 (site (string-append
1997 out "/share/guile/site"))
93d94134
LC
1998 (guile-reader (assoc-ref inputs "guile-reader"))
1999 (deps `(,@(if guile-reader
2000 (list guile-reader)
2001 '())
2002 ,(assoc-ref inputs "guile-commonmark"))))
0791437f
RW
2003 (match (scandir site)
2004 (("." ".." version)
2005 (let ((modules (string-append site "/" version))
2006 (compiled-modules (string-append
2007 out "/lib/guile/" version
2008 "/site-ccache")))
2009 (wrap-program (string-append bin "/haunt")
2010 `("GUILE_LOAD_PATH" ":" prefix
2011 (,modules
2012 ,@(map (lambda (dep)
2013 (string-append dep
2014 "/share/guile/site/"
2015 version))
2016 deps)))
2017 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
2018 (,compiled-modules
2019 ,@(map (lambda (dep)
2020 (string-append dep "/lib/guile/"
2021 version
2022 "/site-ccache"))
2023 deps))))
2024 #t)))))))))
2025 (native-inputs
2026 `(("pkg-config" ,pkg-config)
2027 ("texinfo" ,texinfo)))
2028 (inputs
2029 `(("guile" ,guile-2.2)))
2030 (propagated-inputs
2031 `(("guile-reader" ,guile-reader)
2032 ("guile-commonmark" ,guile-commonmark)))
2033 (synopsis "Functional static site generator")
2034 (description "Haunt is a static site generator written in Guile
2035Scheme. Haunt features a functional build system and an extensible
2036interface for reading articles in any format.")
2037 (home-page "http://haunt.dthompson.us")
2038 (license license:gpl3+)))
2039
93d94134
LC
2040(define-public guile3.0-haunt
2041 (package
2042 (inherit haunt)
2043 (name "guile3.0-haunt")
2044 (inputs `(("guile" ,guile-3.0)))
2045 (propagated-inputs
2046 ;; XXX: Guile-Reader is currently unavailable for Guile 3.0 so strip it.
2047 `(("guile-commonmark" ,guile3.0-commonmark)))))
2048
0791437f
RW
2049(define-public guile2.0-haunt
2050 (package
2051 (inherit haunt)
2052 (name "guile2.0-haunt")
2053 (inputs `(("guile" ,guile-2.0)))))
2054
0791437f
RW
2055(define-public guile-redis
2056 (package
2057 (name "guile-redis")
f57bf15c 2058 (version "1.3.0")
0791437f
RW
2059 (home-page "https://github.com/aconchillo/guile-redis")
2060 (source (origin
29fde3bf
EF
2061 (method git-fetch)
2062 (uri (git-reference
2063 (url home-page)
2064 (commit version)))
2065 (file-name (git-file-name name version))
0791437f
RW
2066 (sha256
2067 (base32
29fde3bf 2068 "14izs8daxh7pb7vwpxi5g427qa31137jkaxrb1cy5rpjkwchy723"))))
0791437f
RW
2069 (build-system gnu-build-system)
2070 (native-inputs
2071 `(("autoconf" ,autoconf)
2072 ("automake" ,automake)
2073 ("pkg-config" ,pkg-config)
2074 ("guile" ,guile-2.2)))
2075 (synopsis "Redis client library for Guile")
2076 (description "Guile-redis provides a Scheme interface to the Redis
2077key-value cache and store.")
2078 (license license:lgpl3+)))
2079
2080(define-public guile2.0-redis
2081 (package
2082 (inherit guile-redis)
2083 (name "guile2.0-redis")
2084 (native-inputs `(("guile" ,guile-2.0)
2085 ,@(alist-delete "guile"
2086 (package-native-inputs guile-redis))))))
2087
0791437f
RW
2088(define-public guile-commonmark
2089 (package
2090 (name "guile-commonmark")
b552e307 2091 (version "0.1.2")
0791437f
RW
2092 (source (origin
2093 (method url-fetch)
2094 (uri (string-append "https://github.com/OrangeShark/" name
2095 "/releases/download/v" version
2096 "/" name "-" version ".tar.gz"))
2097 (sha256
2098 (base32
1fa34232
LC
2099 "17lrsdisa3kckh24q114vfmzdc4wkqa6ccwl4hdlrng5wpn1iman"))
2100 (modules '((guix build utils)))
2101 (snippet
2102 '(begin
2103 ;; Allow builds with Guile 3.0.
2104 (substitute* "configure"
2105 (("2\\.2 2\\.0")
2106 "3.0 2.2 2.0"))
2107 #t))))
0791437f
RW
2108 (build-system gnu-build-system)
2109 (inputs
2110 `(("guile" ,guile-2.2)))
2111 (native-inputs
2112 `(("pkg-config" ,pkg-config)))
2113 (synopsis "CommonMark parser for Guile")
2114 (description
2115 "guile-commonmark is a library for parsing CommonMark, a fully specified
2116variant of Markdown. The library is written in Guile Scheme and is designed
2117to transform a CommonMark document to SXML. guile-commonmark tries to closely
2118follow the @uref{http://commonmark.org/, CommonMark spec}, the main difference
2119is no support for parsing block and inline level HTML.")
2120 (home-page "https://github.com/OrangeShark/guile-commonmark")
2121 (license license:lgpl3+)))
2122
1fa34232
LC
2123(define-public guile3.0-commonmark
2124 (package
2125 (inherit guile-commonmark)
2126 (name "guile3.0-commonmark")
2127 (inputs `(("guile" ,guile-3.0)))))
2128
0791437f
RW
2129(define-public guile2.0-commonmark
2130 (package
2131 (inherit guile-commonmark)
2132 (name "guile2.0-commonmark")
2133 (inputs `(("guile" ,guile-2.0)))))
2134
0791437f
RW
2135(define-public mcron
2136 (package
2137 (name "mcron")
30ebff69 2138 (version "1.1.3")
0791437f
RW
2139 (source (origin
2140 (method url-fetch)
2141 (uri (string-append "mirror://gnu/mcron/mcron-"
2142 version ".tar.gz"))
2143 (sha256
2144 (base32
30ebff69 2145 "00kv7fgllzjpis0g1m9csycp4f6l11774m09dqy255cvmim2g743"))))
0791437f
RW
2146 (build-system gnu-build-system)
2147 (arguments
2148 '(#:phases (modify-phases %standard-phases
30ebff69
EF
2149 (add-after 'unpack 'fix-finding-guile
2150 (lambda _
2151 (substitute* "configure"
3de0d20b 2152 (("2\\.0") "3.0 2.2 2.0"))
30ebff69 2153 #t))
0791437f
RW
2154 (add-before 'check 'adjust-tests
2155 (lambda _
2156 (substitute* "tests/job-specifier.scm"
2157 ;; (getpw) fails with "entry not found" in the build
2158 ;; environment, so pass an argument.
2159 (("\\(getpw\\)")
2160 "(getpwnam (getuid))")
2161 ;; The build environment lacks an entry for root in
2162 ;; /etc/passwd.
2163 (("\\(getpw 0\\)")
2164 "(getpwnam \"nobody\")")
2165
2166 ;; FIXME: Skip the 4 faulty tests (see above).
2167 (("\\(test-equal \"next-year\"" all)
2168 (string-append "(test-skip 4)\n" all)))
2169 #t)))))
30ebff69 2170 (native-inputs `(("pkg-config" ,pkg-config)
0791437f 2171 ("tzdata" ,tzdata-for-tests)))
f61f424d 2172 (inputs `(("guile" ,guile-2.2)))
0791437f
RW
2173 (home-page "https://www.gnu.org/software/mcron/")
2174 (synopsis "Run jobs at scheduled times")
2175 (description
2176 "GNU Mcron is a complete replacement for Vixie cron. It is used to run
2177tasks on a schedule, such as every hour or every Monday. Mcron is written in
2178Guile, so its configuration can be written in Scheme; the original cron
2179format is also supported.")
2180 (license license:gpl3+)))
2181
3de0d20b
LC
2182(define-public guile3.0-mcron
2183 (package
2184 (inherit mcron)
2185 (name "guile3.0-mcron")
2186 (inputs `(("guile" ,guile-3.0)))))
2187
0791437f
RW
2188(define-public mcron2
2189 ;; This was mthl's mcron development branch, and it became mcron 1.1.
2190 (deprecated-package "mcron2" mcron))
6bb5f88e
RW
2191
2192(define-public guile-picture-language
d1a3a8e1
RW
2193 (let ((commit "91d10c96708d732145006dd2802acc4de08b632e")
2194 (revision "1"))
6bb5f88e
RW
2195 (package
2196 (name "guile-picture-language")
d1a3a8e1 2197 (version (git-version "0.0.1" revision commit))
6bb5f88e
RW
2198 (source (origin
2199 (method git-fetch)
2200 (uri (git-reference
2201 (url "https://git.elephly.net/software/guile-picture-language.git")
2202 (commit commit)))
f1d4d79f 2203 (file-name (git-file-name name version))
6bb5f88e
RW
2204 (sha256
2205 (base32
d1a3a8e1
RW
2206 "1ydvw9dvssdvlvhh1dr8inyzy2x6m41qgp8hsivca1xysr4gc23a"))))
2207 (build-system gnu-build-system)
6bb5f88e
RW
2208 (inputs
2209 `(("guile" ,guile-2.2)))
d1a3a8e1
RW
2210 (native-inputs
2211 `(("autoconf" ,autoconf)
2212 ("automake" ,automake)
2213 ("imagemagick" ,imagemagick)
2214 ("pkg-config" ,pkg-config)
2215 ("texinfo" ,texinfo)))
6bb5f88e
RW
2216 (home-page "https://git.elephly.net/software/guile-picture-language.git")
2217 (synopsis "Picture language for Guile")
2218 (description
2219 "This package provides a simple SVG-based picture language for Guile.
2220The picture values can directly be displayed in Geiser.")
2221 (license license:lgpl3+))))
5531782d 2222
4f408684
LC
2223(define-public guile3.0-picture-language
2224 (package
2225 (inherit guile-picture-language)
2226 (name "guile3.0-picture-language")
2227 (inputs `(("guile" ,guile-3.0)))))
2228
5531782d 2229(define-public guile-studio
223236f6
RW
2230 (package
2231 (name "guile-studio")
2232 (version "0.0.2")
2233 (source (origin
2234 (method git-fetch)
2235 (uri (git-reference
2236 (url "https://git.elephly.net/software/guile-studio.git")
2237 (commit version)))
2238 (file-name (git-file-name name version))
2239 (sha256
2240 (base32
2241 "10ls4ra148hd9ra7sin4kh9vv0am5pwk48p7dsjhrlg2l1hsh4hi"))))
2242 (build-system gnu-build-system)
2243 (arguments
2244 `(#:modules
2245 ((ice-9 match)
2246 (srfi srfi-1)
2247 ,@%gnu-build-system-modules)
2248 #:tests? #f ; there are none
2249 #:make-flags
2250 (list (string-append "ICONS_DIR="
2251 (assoc-ref %build-inputs "adwaita-icon-theme")
2252 "/share/icons/Adwaita/")
2253 (string-append "PICT_DIR="
2254 (assoc-ref %build-inputs "guile-picture-language"))
2255 (string-append "EMACS_DIR="
2256 (assoc-ref %build-inputs "emacs"))
2257 (string-append "GUILE_DIR="
2258 (assoc-ref %build-inputs "guile"))
2259 (string-join (cons "INPUTS="
2260 (filter-map
2261 (lambda (input)
2262 (match input
2263 ((label . pkg)
2264 (and (string-prefix? "emacs" label) pkg))))
2265 %build-inputs)))
2266 (string-append "PREFIX=" (assoc-ref %outputs "out")))
2267 #:phases
2268 (modify-phases %standard-phases
2269 (delete 'configure)
2270 (delete 'install))))
2271 (inputs
2272 `(("guile" ,guile-2.2)
2273 ("guile-picture-language" ,guile-picture-language)
2274 ("emacs" ,emacs)
2275 ("emacs-geiser" ,emacs-geiser)
2276 ("emacs-company" ,emacs-company)
2277 ("emacs-flycheck" ,emacs-flycheck)
2278 ("emacs-smart-mode-line" ,emacs-smart-mode-line)
2279 ("emacs-paren-face" ,emacs-paren-face)
2280 ("adwaita-icon-theme" ,adwaita-icon-theme)))
2281 (native-inputs
2282 `(("texinfo" ,texinfo)))
2283 (home-page "https://gnu.org/software/guile")
2284 (synopsis "IDE for Guile")
2285 (description
2286 "This is Emacs with a few settings that make working with Guile easier
5531782d
RW
2287for people new to Emacs. Features include: CUA mode, Geiser, tool bar icons
2288to evaluate Guile buffers, support for Guile's very own picture language, code
2289completion, a simple mode line, etc.")
223236f6 2290 (license license:gpl3+)))
9f8698ad
RW
2291
2292(define-public guile-stis-parser
2293 (let ((commit "6e85d37ffc333b722f4413a6c648263701eb75bd")
2294 (revision "1"))
2295 (package
2296 (name "guile-stis-parser")
2297 (version (git-version "0" revision commit))
2298 (source (origin
2299 (method git-fetch)
2300 (uri (git-reference
2301 (url "https://gitlab.com/tampe/stis-parser")
2302 (commit commit)))
29e76f07 2303 (file-name (git-file-name name version))
9f8698ad
RW
2304 (sha256
2305 (base32
2306 "0v4hvq7rlpbra1ni73lf8k6sdmjlflr50yi3p1f24g85h77pc7c0"))))
2307 (build-system gnu-build-system)
2308 (arguments
2309 `(#:parallel-build? #f ; not supported
2310 #:phases
2311 (modify-phases %standard-phases
2312 (add-after 'unpack 'chdir
2313 (lambda _ (chdir "modules") #t))
8318b3ed
RW
2314 (add-after 'chdir 'use-canonical-directory-for-go-files
2315 (lambda _
2316 (substitute* "Makefile.am"
2317 (("/ccache") "/site-ccache"))
2318 #t))
9f8698ad
RW
2319 (add-after 'chdir 'delete-broken-symlink
2320 (lambda _
2321 (delete-file "parser/stis-parser/lang/.#calc.scm")
2322 #t)))))
2323 (inputs
2324 `(("guile" ,guile-2.2)))
2325 (native-inputs
2326 `(("autoconf" ,autoconf)
2327 ("automake" ,automake)
2328 ("pkg-config" ,pkg-config)))
2329 (home-page "https://gitlab.com/tampe/stis-parser")
2330 (synopsis "Parser combinator framework")
2331 (description
2332 "This package provides a functional parser combinator library that
2333supports backtracking and a small logical framework. The idea is to build up
2334chunks that are memoized and there is no clear scanner/parser separation,
2335chunks can be expressions as well as simple tokens.")
2336 (license license:lgpl2.0+))))
12d73f9c
RW
2337
2338(define-public guile-persist
2339 (let ((commit "b14927b0368af51c024560aee5f55724aee35233")
2340 (revision "1"))
2341 (package
2342 (name "guile-persist")
2343 (version (git-version "0" revision commit))
2344 (source (origin
2345 (method git-fetch)
2346 (uri (git-reference
2347 (url "https://gitlab.com/tampe/guile-persist")
2348 (commit commit)))
2349 (file-name (git-file-name name version))
2350 (sha256
2351 (base32
85a411bc
LC
2352 "0z5nf377wh8yj6n3sx2ddn4bdx1qrqnw899dlqjhg0q69qzil522"))
2353 (modules '((guix build utils)))
2354 (snippet
2355 '(begin
2356 ;; Install .go files in the right place.
2357 (substitute* "Makefile.am"
2358 (("/ccache") "/site-ccache"))
2359 #t))))
12d73f9c
RW
2360 (build-system gnu-build-system)
2361 (arguments
2362 `(#:phases
2363 (modify-phases %standard-phases
2364 (add-after 'unpack 'patch-prefix
2365 (lambda* (#:key inputs outputs #:allow-other-keys)
2366 (substitute* "src/Makefile.am"
2367 (("/usr/local/lib/guile")
2368 (string-append (assoc-ref outputs "out") "/lib/guile"))
2369 (("/usr/local/include/guile")
2370 (string-append (assoc-ref inputs "guile") "/include/guile"))
2371 (("-L/usr/local/lib")
8f052528
RW
2372 (string-append "-L" (assoc-ref inputs "guile") "/lib"))
2373 ;; Use canonical directory for go files.
2374 (("/ccache") "/site-ccache"))
12d73f9c
RW
2375 #t))
2376 (add-after 'unpack 'patch-library-reference
2377 (lambda* (#:key outputs #:allow-other-keys)
2378 (let ((out (assoc-ref outputs "out")))
2379 (substitute* "persist/persistance.scm"
2380 (("\"libguile-persist\"")
2381 (format #f "\"~a/lib/guile/2.2/extensions/libguile-persist\"" out)))
2382 #t))))))
2383 (inputs
2384 `(("guile" ,guile-2.2)))
2385 (native-inputs
2386 `(("autoconf" ,autoconf)
2387 ("automake" ,automake)
2388 ("libtool" ,libtool)
2389 ("pkg-config" ,pkg-config)))
2390 (home-page "https://gitlab.com/tampe/guile-persist")
028053f2 2391 (synopsis "Persistence programming framework for Guile")
12d73f9c
RW
2392 (description
2393 "This is a serialization library for serializing objects like classes
2394and objects, closures and structs. This currently does not support
2395serializing continuations or delimited continuations.")
2396 (license license:lgpl2.0+))))
6d37301b
RW
2397
2398(define-public python-on-guile
5d5edb88
LC
2399 (let ((commit "00a51a23247f1edc4ae8eda72b30df5cd7d0015f")
2400 (revision "3"))
6d37301b
RW
2401 (package
2402 (name "python-on-guile")
2403 (version (git-version "0.1.0" revision commit))
2404 (source (origin
2405 (method git-fetch)
2406 (uri (git-reference
4088ae42 2407 (url "https://git.elephly.net/software/python-on-guile.git")
6d37301b
RW
2408 (commit commit)))
2409 (file-name (git-file-name name version))
2410 (sha256
2411 (base32
5d5edb88 2412 "03rpnqr08rqr3gay128g564rwk8w4jbj28ss6b46z1d4vjs4nk68"))))
6d37301b
RW
2413 (build-system gnu-build-system)
2414 (arguments
2415 `(#:parallel-build? #f ; not supported
83817158
LC
2416 #:make-flags '("GUILE_AUTO_COMPILE=0") ;to prevent guild warnings
2417
6d37301b
RW
2418 #:phases
2419 (modify-phases %standard-phases
2420 (add-after 'unpack 'chdir
83817158
LC
2421 (lambda _ (chdir "modules") #t))
2422 (add-after 'install 'wrap
2423 (lambda* (#:key outputs #:allow-other-keys)
2424 ;; Wrap the 'python' executable so it can find its
2425 ;; dependencies.
2426 (let ((out (assoc-ref outputs "out")))
2427 (wrap-program (string-append out "/bin/python")
2428 `("GUILE_LOAD_PATH" ":" prefix
2429 (,(getenv "GUILE_LOAD_PATH")))
2430 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
2431 (,(getenv "GUILE_LOAD_COMPILED_PATH"))))
2432 #t))))))
6d37301b
RW
2433 (inputs
2434 `(("guile" ,guile-2.2)))
2435 (propagated-inputs
2436 `(("guile-persist" ,guile-persist)
2437 ("guile-readline" ,guile-readline)
2438 ("guile-stis-parser" ,guile-stis-parser)))
2439 (native-inputs
2440 `(("autoconf" ,autoconf)
2441 ("automake" ,automake)
2442 ("libtool" ,libtool)
2443 ("pkg-config" ,pkg-config)))
2444 (home-page "https://gitlab.com/python-on-guile/python-on-guile/")
2445 (synopsis "Python implementation in Guile")
2446 (description
2447 "This package allows you to compile a Guile Python file to any target
2448from @code{tree-il}.")
2449 (license license:lgpl2.0+))))
b97b4624
RW
2450
2451(define-public guile-file-names
2452 (package
2453 (name "guile-file-names")
72a0706f 2454 (version "0.3")
b97b4624
RW
2455 (source (origin
2456 (method url-fetch)
2457 (uri (string-append "http://brandon.invergo.net/software/download/"
2458 "guile-file-names/guile-file-names-"
2459 version ".tar.gz"))
2460 (sha256
2461 (base32
72a0706f 2462 "01chizdxkhw6aqv629vxka9f5x3534ij7r0jqndawsg2vxm1r9sz"))))
b97b4624
RW
2463 (build-system gnu-build-system)
2464 (arguments
2465 `(#:phases
2466 (modify-phases %standard-phases
481eca80 2467 (add-after 'unpack 'fix-target-directory
b97b4624 2468 (lambda _
481eca80 2469 (substitute* "src/Makefile.in"
b97b4624
RW
2470 (("guilemoddir = \\$\\(GUILE_SITE\\)")
2471 "guilemoddir = $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
2472 #t)))))
2473 (inputs
2474 `(("guile" ,guile-2.2)))
2475 (native-inputs
2476 `(("pkg-config" ,pkg-config)))
2477 (home-page "https://gitlab.com/brandoninvergo/guile-file-names")
2478 (synopsis "Manipulate file names")
2479 (description
2480 "The @code{(file-names)} module provides tools for manipulating file
2481names. The module was built on the idea that doing anything more than a
2482non-trivial modification of a file name string is a pain (making sure all
2483slashes are present and accounted for, resolving @code{.} and @code{..}, etc).
2484Inevitably, you have to break the string up into chunks and operate on that
2485list of components. This module takes care of that for you.")
2486 (license license:lgpl3+)))
bdf2dd79
JN
2487
2488(define-public guile-gi
bb6c8f20
RW
2489 (package
2490 (name "guile-gi")
b5d4d5b9 2491 (version "0.2.1")
bb6c8f20
RW
2492 (source (origin
2493 (method url-fetch)
2494 (uri (string-append "http://lonelycactus.com/tarball/guile_gi-"
2495 version ".tar.gz"))
2496 (sha256
2497 (base32
b5d4d5b9 2498 "1ah5bmkzplsmkrk7v9vlxlqch7i91qv4cq2d2nar9xshbpcrj484"))))
bb6c8f20
RW
2499 (build-system gnu-build-system)
2500 (arguments
b5d4d5b9
RW
2501 `(#:configure-flags '("--with-gnu-filesystem-hierarchy")
2502 #:phases
2503 (modify-phases %standard-phases
2504 (add-before 'check 'start-xorg-server
2505 (lambda* (#:key inputs #:allow-other-keys)
2506 ;; The init_check test requires a running X server.
2507 (system (format #f "~a/bin/Xvfb :1 &"
2508 (assoc-ref inputs "xorg-server")))
2509 (setenv "DISPLAY" ":1")
2510 #t)))))
bb6c8f20
RW
2511 (native-inputs
2512 `(("gettext" ,gnu-gettext)
6153fa0a 2513 ("glib:bin" ,glib "bin") ; for glib-compile-resources
bb6c8f20 2514 ("libtool" ,libtool)
b5d4d5b9
RW
2515 ("pkg-config" ,pkg-config)
2516 ("xorg-server" ,xorg-server)))
bb6c8f20
RW
2517 (propagated-inputs
2518 `(("glib" ,glib)
2519 ("gobject-introspection" ,gobject-introspection)
2520 ("gssettings-desktop-schemas" ,gsettings-desktop-schemas)
2521 ("gtk+" ,gtk+)
2522 ("guile-lib" ,guile-lib)
2523 ("webkitgtk" ,webkitgtk)))
2524 (inputs `(("guile" ,guile-2.2)))
2525 (home-page "https://github.com/spk121/guile-gi")
2526 (synopsis "GObject bindings for Guile")
2527 (description
2528 "Guile-GI is a library for Guile that allows using GObject-based
bdf2dd79
JN
2529libraries, such as GTK+3. Its README comes with the disclaimer: This is
2530pre-alpha code.")
bb6c8f20 2531 (license license:gpl3+)))
dec4b3aa
LC
2532
2533(define-public guile-srfi-159
2534 (let ((commit "1bd98abda2ae4ef8f36761a167903e55c6bda7bb")
2535 (revision "0"))
2536 (package
2537 (name "guile-srfi-159")
2538 (version (git-version "0" revision commit))
2539 (home-page "https://bitbucket.org/bjoli/guile-srfi-159")
2540 (source (origin
2541 (method hg-fetch)
2542 (uri (hg-reference (changeset commit)
2543 (url home-page)))
2544 (sha256
2545 (base32
2546 "1zw6cmcy7xdbfiz3nz9arqnn7l2daidaps6ixkcrc9b6k51fdv3p"))
2547 (file-name (git-file-name name version))))
2548 (build-system guile-build-system)
2549 (arguments
2550 ;; The *-impl.scm files are actually included from module files; they
2551 ;; should not be compiled separately, but they must be installed.
2552 '(#:not-compiled-file-regexp "-impl\\.scm$"))
2553 (inputs
2554 `(("guile" ,guile-2.2)))
2555 (synopsis "Formatting combinators for Guile")
2556 (description
2557 "The @code{(srfi-159)} module and its sub-modules implement the
2558formatting combinators specified by
2559@uref{https://srfi.schemers.org/srfi-159/srfi-159.html, SRFI-159}. These are
2560more expressive and flexible than the traditional @code{format} procedure.")
2561 (license license:bsd-3))))
f0de9544
JN
2562
2563(define-public emacsy
48eb71ae
JN
2564 (package
2565 (name "emacsy")
2566 (version "0.4.1")
2567 (source (origin
2568 (method url-fetch)
2569 (uri (string-append
2570 "https://download.savannah.nongnu.org/releases/"
2571 name "/" name "-" version ".tar.gz"))
2572 (sha256
2573 (base32
2574 "1cpb85dl1nibd34c2x2h7vfmjpkgh353p5b1w20v6cs6gmvgg4np"))))
2575 (build-system gnu-build-system)
2576 (native-inputs
2577 `(("autoconf" ,autoconf)
2578 ("automake" ,automake)
2579 ("bzip2" ,bzip2)
2580 ("guile" ,guile-2.2)
2581 ("gettext" ,gnu-gettext)
2582 ("libtool" ,libtool)
2583 ("perl" ,perl)
2584 ("pkg-config" ,pkg-config)
2585 ("texinfo" ,texinfo)
1aa026aa 2586 ("texlive" ,(texlive-union (list texlive-generic-epsf)))))
114f02ba 2587 (inputs
48eb71ae
JN
2588 `(("dbus-glib" ,dbus-glib)
2589 ("guile" ,guile-2.2)
2590 ("guile-lib" ,guile-lib)
2591 ("guile-readline" ,guile-readline)
48eb71ae 2592 ("freeglut" ,freeglut)
48eb71ae 2593 ("webkitgtk" ,webkitgtk)))
114f02ba
AS
2594 (propagated-inputs
2595 `(("glib-networking" ,glib-networking)
2596 ("gssettings-desktop-schemas" ,gsettings-desktop-schemas)))
48eb71ae 2597 (arguments
114f02ba
AS
2598 `(#:modules ((guix build gnu-build-system)
2599 (guix build utils)
2600 (ice-9 popen)
2601 (ice-9 rdelim)
2602 (ice-9 regex)
2603 (ice-9 ftw)
2604 (srfi srfi-26))
2605 #:phases
48eb71ae
JN
2606 (modify-phases %standard-phases
2607 (add-before 'configure 'setenv
2608 (lambda _
2609 (setenv "GUILE_AUTO_COMPILE" "0")
114f02ba
AS
2610 #t))
2611 (add-after 'install 'wrap-binaries
2612 (lambda* (#:key inputs outputs #:allow-other-keys)
2613 (let* ((out (assoc-ref outputs "out"))
2614 (effective (read-line
2615 (open-pipe* OPEN_READ
2616 "guile" "-c"
2617 "(display (effective-version))")))
2618 (deps (map (cut assoc-ref inputs <>)
2619 '("guile-lib" "guile-readline")))
2620 (scm-path (map (cut string-append <> "/share/guile/site/"
2621 effective) `(,out ,@deps)))
2622 (go-path (map (cut string-append <> "/lib/guile/" effective
2623 "/site-ccache/") `(,out ,@deps)))
2624 (examples (filter (cut string-match "emacsy" <>)
2625 (scandir (string-append out "/bin/"))))
2626 (progs (map (cut string-append out "/bin/" <>)
2627 examples)))
2628 (map (cut wrap-program <>
2629 `("GUILE_LOAD_PATH" ":" prefix ,scm-path)
2630 `("GUILE_LOAD_COMPILED_PATH" ":" prefix ,go-path))
2631 progs)
2632 #t))))))
48eb71ae
JN
2633 (home-page "https://savannah.nongnu.org/projects/emacsy")
2634 (synopsis "Embeddable GNU Emacs-like library using Guile")
2635 (description
2636 "Emacsy is an embeddable Emacs-like library that uses GNU Guile
f0de9544
JN
2637as extension language. Emacsy can give a C program an Emacsy feel with
2638keymaps, minibuffer, recordable macros, history, tab completion, major
2639and minor modes, etc., and can also be used as a pure Guile library. It
48eb71ae
JN
2640comes with a simple counter example using FreeGLUT and browser examples
2641in C using Gtk+-3 and WebKitGtk.")
2642 (license license:gpl3+)))
2135610c 2643
c99f32b9
AS
2644(define-public emacsy-minimal
2645 (let ((commit "f3bf0dbd803d7805b6ae8303253507ad13922293"))
2646 (package
2647 (inherit emacsy)
2648 (name "emacsy-minimal")
2649 (version (git-version "v0.4.1" "19" commit))
2650 (source (origin
2651 (method git-fetch)
2652 (uri (git-reference
2653 (url "https://git.savannah.gnu.org/git/emacsy.git")
2654 (commit commit)))
2655 (file-name (git-file-name name version))
2656 (sha256
2657 (base32
2658 "0ivy28km1p7nlrf63xx3hvrpxf5ld5amk1wcan3k7sqv1kq9mqdb"))))
2659 (build-system gnu-build-system)
2660 (inputs
2661 `(("guile" ,guile-2.2)
2662 ("guile-lib" ,guile-lib)
2663 ("guile-readline" ,guile-readline)))
2664 (propagated-inputs '())
2665 (arguments
2666 `(#:configure-flags '("--without-examples")
2667 #:phases
2668 (modify-phases %standard-phases
2669 (add-before 'configure 'setenv
2670 (lambda _
2671 (setenv "GUILE_AUTO_COMPILE" "0")
2672 #t))))))))
2673
2135610c
LC
2674(define-public guile-jpeg
2675 (let ((commit "6a1673578b297c2c1b28e44a76bd5c49e76a5046")
2676 (revision "0"))
2677 (package
2678 (name "guile-jpeg")
2679 (version (git-version "0.0" revision commit))
2680 (home-page "https://gitlab.com/wingo/guile-jpeg")
2681 (source (origin
2682 (method git-fetch)
2683 (uri (git-reference (url home-page)
2684 (commit commit)))
2685 (sha256
2686 (base32
2687 "05z9m408w3h6aqb5k3r3qa7khir0k10rxwvsrzhkcq1hr5vbmr4m"))
2688 (file-name (git-file-name name version))
2689 (modules '((guix build utils)))
2690 (snippet
2691 '(begin
2692 ;; Install .go files in the right place.
2693 (substitute* "Makefile.am"
2694 (("/ccache") "/site-ccache"))
2695 #t))))
2696 (build-system gnu-build-system)
2697 (native-inputs
2698 `(("autoconf" ,autoconf)
2699 ("automake" ,automake)
2700 ("pkg-config" ,pkg-config)
2701 ("guile" ,guile-2.2)))
2702 (synopsis "JPEG file parsing library for Guile")
2703 (description
2704 "Guile-JPEG is a Scheme library to parse JPEG image files and to
2705perform geometrical transforms on JPEG images.")
2706 (license license:gpl3+))))
e8c2da41
AS
2707
2708(define-public nomad
2709 (package
2710 (name "nomad")
5f1553ce 2711 (version "0.1.2-alpha")
e8c2da41
AS
2712 (source (origin
2713 (method git-fetch)
2714 (uri (git-reference
2715 (url "https://git.savannah.gnu.org/git/nomad.git")
2716 (commit version)))
2717 (file-name (git-file-name name version))
2718 (sha256
2719 (base32
5f1553ce 2720 "1dnkr1hmvfkwgxd75dcf93pg39yfgawvdpzdhv991yhghv0qxc9h"))))
e8c2da41
AS
2721 (build-system gnu-build-system)
2722 (native-inputs
2723 `(("autoconf" ,autoconf)
2724 ("automake" ,automake)
2725 ("bash" ,bash)
2726 ("pkg-config" ,pkg-config)
2727 ("libtool" ,libtool)
2728 ("guile" ,guile-2.2)
5f1553ce
AS
2729 ("glib:bin" ,glib "bin")
2730 ("texinfo" ,texinfo)
2731 ("perl" ,perl)))
e8c2da41
AS
2732 (inputs
2733 `(("guile" ,guile-2.2)
2734 ("guile-lib" ,guile-lib)
2735 ("guile-gcrypt" ,guile-gcrypt)
2736 ("guile-readline" ,guile-readline)
2737 ("gnutls" ,gnutls)
2738 ("shroud" ,shroud)
2739 ("emacsy" ,emacsy-minimal)
2740 ("glib" ,glib)
2741 ("dbus-glib" ,dbus-glib)
2742 ("gtk+" ,gtk+)
2743 ("gtksourceview" ,gtksourceview)
2744 ("webkitgtk" ,webkitgtk)
2745 ("xorg-server" ,xorg-server)))
2746 (propagated-inputs
2747 `(("glib" ,glib)
2748 ("glib-networking" ,glib-networking)
2749 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)))
2750 (arguments
2751 `(#:modules ((guix build gnu-build-system)
2752 (guix build utils)
2753 (ice-9 popen)
2754 (ice-9 rdelim)
2755 (srfi srfi-26))
2756 #:phases
2757 (modify-phases %standard-phases
2758 (add-before 'check 'start-xorg-server
2759 (lambda* (#:key inputs #:allow-other-keys)
2760 ;; The test suite requires a running X server.
2761 (system (format #f "~a/bin/Xvfb :1 &"
2762 (assoc-ref inputs "xorg-server")))
2763 (setenv "DISPLAY" ":1")
2764 #t))
2765 (add-after 'install 'wrap-binaries
2766 (lambda* (#:key inputs outputs #:allow-other-keys)
2767 (let* ((out (assoc-ref outputs "out"))
2768 (gio-deps (map (cut assoc-ref inputs <>) '("glib-networking"
2769 "glib")))
2770 (gio-mod-path (map (cut string-append <> "/lib/gio/modules")
2771 gio-deps))
2772 (effective (read-line (open-pipe*
2773 OPEN_READ
2774 "guile" "-c"
2775 "(display (effective-version))")))
2776 (deps (map (cut assoc-ref inputs <>)
2777 '("emacsy" "guile-lib" "guile-readline"
2778 "shroud")))
2779 (scm-path (map (cut string-append <>
2780 "/share/guile/site/" effective)
2781 `(,out ,@deps)))
2782 (go-path (map (cut string-append <>
2783 "/lib/guile/" effective "/site-ccache")
2784 `(,out ,@deps)))
2785 (progs (map (cut string-append out "/bin/" <>)
2786 '("nomad"))))
2787 (map (cut wrap-program <>
2788 `("GIO_EXTRA_MODULES" ":" prefix ,gio-mod-path)
2789 `("GUILE_LOAD_PATH" ":" prefix ,scm-path)
2790 `("GUILE_LOAD_COMPILED_PATH" ":"
2791 prefix ,go-path))
2792 progs)
2793 #t))))))
2794 (home-page "https://savannah.nongnu.org/projects/nomad/")
2795 (synopsis "Extensible Web Browser in Guile Scheme")
2796 (description "Nomad is an Emacs-like Web Browser built using Webkitgtk and
2797Emacsy. It has a small C layer and most browser features are fully
2798programmable in Guile. It has hooks, keymaps, and self documentation
2799features.")
2800 (license license:gpl3+)))
248965c9
RW
2801
2802(define-public guile-cv
2803 (package
2804 (name "guile-cv")
2805 (version "0.2.1")
2806 (source (origin
2807 (method url-fetch)
2808 (uri (string-append "mirror://gnu/guile-cv/guile-cv-"
2809 version ".tar.gz"))
2810 (sha256
2811 (base32
2812 "0qdf0s2h1xj5lbhnc1pfw69i3zg08pqy2y6869b92ydfis8r82j9"))))
2813 (build-system gnu-build-system)
2814 (arguments
2815 `(#:phases
2816 (modify-phases %standard-phases
2817 (add-after 'unpack 'prepare-build
2818 (lambda* (#:key inputs outputs #:allow-other-keys)
2819 (substitute* "configure"
2820 (("SITEDIR=\"\\$datadir/guile-cv\"")
2821 "SITEDIR=\"$datadir/guile/site/$GUILE_EFFECTIVE_VERSION\"")
2822 (("SITECCACHEDIR=\"\\$libdir/guile-cv/")
2823 "SITECCACHEDIR=\"$libdir/"))
2824 (substitute* "cv/init.scm"
2825 (("\\(dynamic-link \"libvigra_c\"\\)")
2826 (string-append "(dynamic-link \""
2827 (assoc-ref inputs "vigra-c")
2828 "/lib/libvigra_c\")"))
2829 (("\\(dynamic-link \"libguile-cv\"\\)")
2830 (format #f "~s"
2831 `(dynamic-link
2832 (format #f "~alibguile-cv"
2833 (if (getenv "GUILE_CV_UNINSTALLED")
2834 ""
2835 ,(format #f "~a/lib/"
2836 (assoc-ref outputs "out"))))))))
2837 (setenv "GUILE_CV_UNINSTALLED" "1")
2838 ;; Only needed to satisfy the configure script.
2839 (setenv "LD_LIBRARY_PATH"
2840 (string-append (assoc-ref inputs "vigra-c") "/lib"))
2841 #t)))))
2842 (inputs
2843 `(("vigra" ,vigra)
2844 ("vigra-c" ,vigra-c)
2845 ("guile" ,guile-2.2)))
2846 (native-inputs
2847 `(("texlive" ,(texlive-union (list texlive-booktabs
2848 texlive-lm
2849 texlive-siunitx
2850 texlive-standalone
2851 texlive-xcolor
2852 texlive-fonts-iwona)))
2853 ("pkg-config" ,pkg-config)))
2854 (propagated-inputs
2855 `(("guile-lib" ,guile-lib)))
2856 (home-page "https://www.gnu.org/software/guile-cv/")
2857 (synopsis "Computer vision library for Guile")
2858 (description "Guile-CV is a Computer Vision functional programming library
2859for the Guile Scheme language. It is based on Vigra (Vision with Generic
2860Algorithms), a C++ image processing and analysis library. Guile-CV contains
2861bindings to Vigra C (a C wrapper to most of the Vigra functionality) and is
2862enriched with pure Guile Scheme algorithms, all accessible through a nice,
2863clean and easy to use high level API.")
2864 (license license:gpl3+)))
7ff157c1
RW
2865
2866(define-public guile-ffi-fftw
353fb48f
RW
2867 (let ((commit "294ad9e7491dcb40026d2fec9be2af05263be1c0")
2868 (revision "2"))
7ff157c1
RW
2869 (package
2870 (name "guile-ffi-fftw")
2871 (version (git-version "0" revision commit))
2872 (source (origin
2873 (method git-fetch)
2874 (uri (git-reference
2875 (url "https://github.com/lloda/guile-ffi-fftw.git")
2876 (commit commit)))
2877 (file-name (git-file-name "guile-ffi-fftw" version))
2878 (sha256
2879 (base32
353fb48f 2880 "08j40a5p6a8pgvhffmzb5rfdnrav2mksy3gfjkdqy93jfj1z5afg"))))
7ff157c1
RW
2881 (build-system guile-build-system)
2882 (arguments
2883 `(#:source-directory "mod"
2884 #:phases
2885 (modify-phases %standard-phases
2886 (add-after 'unpack 'prepare-build
2887 (lambda* (#:key inputs #:allow-other-keys)
2888 (substitute* "mod/ffi/fftw.scm"
2889 (("\\(getenv \"GUILE_FFI_FFTW_LIBFFTW3_PATH\"\\)")
2890 (format #f "\"~a/lib\"" (assoc-ref inputs "fftw"))))
2891 #t))
2892 (add-after 'build 'check
2893 (lambda _
2894 (invoke "guile" "-L" "mod"
2895 "-s" "test/test-ffi-fftw.scm"))))))
2896 (inputs
2897 `(("fftw" ,fftw)
2898 ("guile" ,guile-2.2)))
2899 (home-page "https://github.com/lloda/guile-ffi-fftw/")
2900 (synopsis "Access FFTW through Guile's FFI")
2901 (description "This is a minimal set of Guile FFI bindings for the FFTW
2902library's ‘guru interface’. It provides two functions: @code{fftw-dft! rank
2903sign in out} and @code{fftw-dft rank sign in}. These bindings being minimal,
2904there is no support for computing & reusing plans, or split r/i transforms, or
2905anything other than straight complex DFTs.")
353fb48f 2906 (license license:lgpl3+))))
f9ec89f4
TS
2907
2908(define-public srfi-64-driver
2909 (package
2910 (name "srfi-64-driver")
2911 (version "0.1")
2912 (source (origin
2913 (method url-fetch)
2914 (uri (string-append "https://files.ngyro.com/srfi-64-driver/"
2915 "srfi-64-driver-" version ".tar.gz"))
2916 (sha256
2917 (base32
2918 "188b6mb7sjjg0a8zldikinglf40ky8mg8rwh5768gjmch6gkk3ph"))))
2919 (build-system gnu-build-system)
2920 (arguments
2921 `(#:tests? #f
2922 #:phases
2923 (modify-phases %standard-phases
2924 (delete 'build))))
2925 (native-inputs
2926 `(("pkg-config" ,pkg-config)))
2927 (inputs
2928 `(("guile" ,guile-2.2)))
2929 (home-page "https://ngyro.com/software/srfi-64-driver.html")
2930 (synopsis "Automake test driver for SRFI 64 test suites")
2931 (description "This package provides an Automake test driver that can
2932run SRFI 64 test suites. It gives Automake insight into the individual
2933tests being run, resulting clearer and more specific output.")
2934 (license license:gpl3+)))
f6bf4b2c
TS
2935
2936(define-public guile-semver
2937 (package
2938 (name "guile-semver")
2939 (version "0.1.0")
2940 (source (origin
2941 (method url-fetch)
2942 (uri (string-append "https://files.ngyro.com/guile-semver/"
2943 "guile-semver-" version ".tar.gz"))
2944 (sha256
2945 (base32
2946 "06b66rj7nyhr6i3dpkwvfw1xb10w2pngrsw2hxfxkznwsbh9byfz"))))
2947 (build-system gnu-build-system)
2948 (native-inputs
2949 `(("pkg-config" ,pkg-config)
2950 ("srfi-64-driver" ,srfi-64-driver)))
2951 (inputs
2952 `(("guile" ,guile-2.2)))
2953 (home-page "https://ngyro.com/software/guile-semver.html")
2954 (synopsis "Semantic Versioning (SemVer) for Guile")
2955 (description "This Guile library provides tools for reading,
2956comparing, and writing Semantic Versions. It also includes ranges in
2957the style of the Node Package Manager (NPM).")
2958 (license license:gpl3+)))
d67fa5c8
LC
2959
2960(define-public guile-hashing
2961 (package
2962 (name "guile-hashing")
2963 (version "1.2.0")
2964 (home-page "https://github.com/weinholt/hashing")
2965 (source (origin
2966 (method git-fetch)
2967 (uri (git-reference
2968 (url home-page)
2969 (commit (string-append "v" version))))
2970 (file-name (git-file-name name version))
2971 (sha256
2972 (base32
2973 "1362d3lmpv7slmv1zmr9wy8panq9sjr9787gc2hagd646mpsfpkl"))))
2974 (build-system guile-build-system)
2975 (arguments
2976 `(#:modules ((guix build guile-build-system)
2977 (guix build utils)
2978 (srfi srfi-26)
2979 (ice-9 ftw))
2980 #:implicit-inputs? #f ;needs nothing but Guile
2981 #:phases (modify-phases %standard-phases
2982 (add-before 'build 'move-sls-files
2983 (lambda _
2984 ;; Move the source under hashing/ in order to match
2985 ;; module names, and rename .sls files to .scm.
2986 (define (target file)
2987 (string-append "hashing/" file))
2988
2989 (define (sls->scm sls)
2990 (string-append (string-drop-right sls 4)
2991 ".scm"))
2992
2993 (mkdir "hashing")
2994 (for-each (lambda (file)
2995 (rename-file file (sls->scm file)))
2996 (find-files "." "\\.sls$"))
2997 (for-each (lambda (file)
2998 (rename-file file (target file)))
2999 (scandir "." (cut string-suffix? ".scm" <>)))
3000 (rename-file "private" "hashing/private")
3001 #t)))))
3002 (native-inputs
3003 `(("guile" ,guile-2.2)))
3004 (synopsis "Cryprographic hash functions implemented in Scheme")
3005 (description
3006 "The @code{(hashing @dots{})} modules implement cryptographic hash
3007functions in pure R6RS Scheme: CRC, HMAC, MD5, SHA-1, and SHA-2 (SHA-256,
3008SHA-512).")
3009 (license license:expat)))
f918a8d9
LC
3010
3011(define-public guile3.0-hashing
3012 (package
3013 (inherit guile-hashing)
3014 (name "guile3.0-hashing")
3015 (native-inputs
3016 `(("guile" ,guile-next)))))