gnu: guile-squee: Add "guile3.0-squee" variant.
[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>
195e1c1b 6;;; Copyright © 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
0791437f 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
945a73d8
CB
670(define-public guile3.0-squee
671 (package
672 (inherit guile-squee)
673 (name "guile3.0-squee")
674 (inputs `(("guile" ,guile-next)
675 ,@(alist-delete "guile" (package-inputs guile-squee))))))
676
0791437f
RW
677(define-public guile-colorized
678 (package
679 (name "guile-colorized")
680 (version "0.1")
1340ce28
TGR
681 (source
682 (origin
683 (method git-fetch)
684 (uri (git-reference
55f4282e 685 (url "https://gitlab.com/NalaGinrut/guile-colorized.git")
1340ce28
TGR
686 (commit (string-append "v" version))))
687 (file-name (git-file-name name version))
688 (sha256
689 (base32 "10mv8c63159r3qvwwdvsgnsvdg7nc2ghak85zapwqpv4ywrqp9zc"))))
0791437f
RW
690 (build-system guile-build-system)
691 (native-inputs
692 `(("guile" ,guile-2.2)))
55f4282e 693 (home-page "https://gitlab.com/NalaGinrut/guile-colorized")
0791437f
RW
694 (synopsis "Colorized REPL for Guile")
695 (description
696 "Guile-colorized provides you with a colorized REPL for GNU Guile.")
697 (license license:gpl3+)))
698
fc870a0d
LC
699(define-public guile3.0-colorized
700 (package
701 (inherit guile-colorized)
702 (name "guile3.0-colorized")
703 (native-inputs `(("guile" ,guile-next)))))
704
0791437f
RW
705(define-public guile-pfds
706 (package
707 (name "guile-pfds")
708 (version "0.3")
709 (home-page "https://github.com/ijp/pfds")
710 (source (origin
711 (method git-fetch)
712 (uri (git-reference
713 (url home-page)
714 (commit (string-append "v" version))))
715 (sha256
716 (base32
717 "19y33wg94pf0n98dkfqd1zbw93fgky4sawxsxl6s3vyqwl0yi5vh"))
718 (file-name (string-append name "-" version "-checkout"))))
719 (build-system guile-build-system)
720 (arguments
721 '(#:source-directory "src"
722 #:phases (modify-phases %standard-phases
723 (add-after 'unpack 'move-files-around
724 (lambda _
725 ;; Move files under a pfds/ directory to reflect the
726 ;; module hierarchy.
727 (mkdir-p "src/pfds")
728 (for-each (lambda (file)
729 (rename-file file
730 (string-append "src/pfds/"
731 file)))
732 '("bbtrees.sls"
733 "deques"
734 "deques.sls"
735 "dlists.sls"
736 "fingertrees.sls"
737 "hamts.sls"
738 "heaps.sls"
739 "private"
740 "psqs.sls"
741 "queues"
742 "queues.sls"
743 "sequences.sls"
744 "sets.sls"))
745
746 ;; In Guile <= 2.2.4, there's no way to tell 'guild
747 ;; compile' to accept the ".sls" extension. So...
748 (for-each (lambda (file)
749 (rename-file file
750 (string-append
751 (string-drop-right file 4)
752 ".scm")))
753 (find-files "." "\\.sls$"))
754 #t)))))
755 (native-inputs
756 `(("guile" ,guile-2.2)))
757 (synopsis "Purely functional data structures for Guile")
758 (description
759 "This package provides purely functional data structures written in R6RS
760Scheme and compiled for Guile. It has been tested with Racket, Guile 2,
761Vicare Scheme and IronScheme. Right now it contains:
762
763@itemize
764@item queues
765@item deques
766@item bbtrees
767@item sets
768@item dlists
769@item priority search queues (PSQs)
770@item finger trees
771@item sequences
772@item heaps
773@item hash array mapped tries (HAMTs).
774@end itemize\n")
775 (license license:bsd-3)))
776
77c95ee6
RW
777(define-public guile3.0-pfds
778 (package
779 (inherit guile-pfds)
780 (name "guile3.0-pfds")
781 (native-inputs `(("guile" ,guile-3.0)))
782 (arguments
0dd1e277
RW
783 (substitute-keyword-arguments (package-arguments guile-pfds)
784 ((#:phases phases)
785 `(modify-phases ,phases
786 (add-after 'unpack 'work-around-guile-bug
787 (lambda _
788 ;; See bug #39210.
789 (substitute* '("fingertrees.sls"
790 "queues/private/condition.sls"
791 "deques/private/condition.sls")
792 (("&assertion") "&violation"))
793 #t))))))))
77c95ee6 794
0791437f
RW
795(define-public guile-aa-tree
796 (package
797 (name "guile-aa-tree")
798 (version "3.1.1")
799 (source (origin
800 (method url-fetch)
801 (uri (string-append "mirror://savannah/guile-aa-tree/guile-aa-tree-"
802 version ".tar.gz"))
803 (sha256
804 (base32
805 "0044c105r3q9vpl17pv3phl1b79kjm1llhkakqgiasixyav01blh"))))
806 (build-system guile-build-system)
807 (native-inputs `(("guile" ,guile-2.2)))
808 ;; https://savannah.nongnu.org/projects/guile-aa-tree
809 (home-page "https://qlfiles.net/guile-aa-tree/")
810 (synopsis "AA tree data structure for Guile")
811 (description
812 "This package provides an implementation of @dfn{AA trees}, a
813self-balancing binary tree data structure, for Guile. It ensure @math{O(log
814n)} worst case performance for core operations. The module provides
815non-mutating insert, delete, and search operations, with support for
816convenient nested tree operations.")
817 (license license:gpl3+)))
818
819(define-public guile-simple-zmq
820 (let ((commit "68bedb6679716214fb9d3472da57544526f7a618")
821 (revision "3"))
822 (package
823 (name "guile-simple-zmq")
824 (version (git-version "0.0.0" revision commit))
825 (source
826 (origin
827 (method git-fetch)
828 (uri (git-reference
829 (url "https://github.com/jerry40/guile-simple-zmq")
830 (commit commit)))
831 (sha256
832 (base32
833 "1ad3xg69qqviy1f6dnlw0ysmfdbmp1jq65rfqb8nfd8dsrq2syli"))
834 (file-name (git-file-name name version))))
835 (build-system guile-build-system)
836 (arguments
837 `(#:source-directory "src"
838 #:phases (modify-phases %standard-phases
839 (add-after 'unpack 'set-libzmq-file-name
840 (lambda* (#:key inputs #:allow-other-keys)
841 (substitute* "src/simple-zmq.scm"
842 (("\\(dynamic-link \"libzmq\"\\)")
843 (format #f "(dynamic-link \"~a/lib/libzmq.so\")"
844 (assoc-ref inputs "zeromq"))))
845 #t)))))
846 (native-inputs
847 `(("guile" ,guile-2.2)))
848 (inputs
849 `(("zeromq" ,zeromq)))
850 (home-page "https://github.com/jerry40/guile-simple-zmq")
851 (synopsis "Guile wrapper over ZeroMQ library")
852 (description
853 "This package provides a Guile programming interface to the ZeroMQ
854messaging library.")
855 (license license:gpl3+))))
856
015bb1c8
LC
857(define-public guile3.0-simple-zmq
858 (package
859 (inherit guile-simple-zmq)
860 (name "guile3.0-simple-zmq")
861 (native-inputs `(("guile" ,guile-next)))))
862
0791437f
RW
863(define-public jupyter-guile-kernel
864 (let ((commit "a7db9245a886e104138474df46c3e88b95cff629")
865 (revision "1"))
866 (package
867 (name "jupyter-guile-kernel")
868 (version (git-version "0.0.0" revision commit))
869 (source
870 (origin
871 (method git-fetch)
872 (uri (git-reference
873 (url "https://github.com/jerry40/guile-kernel")
874 (commit commit)))
f1d4d79f 875 (file-name (git-file-name name version))
0791437f
RW
876 (sha256
877 (base32
878 "0aj04853bqm47ivfcmrgpb7w3wkis847kc7qrwsa5zcn9h38qh2f"))))
879 (build-system guile-build-system)
880 (arguments
881 '(#:phases (modify-phases %standard-phases
882 (add-after 'unpack 'set-openssl-file-name
883 (lambda* (#:key inputs #:allow-other-keys)
884 ;; Record the absolute file name of the 'openssl'
885 ;; command.
886 (substitute* "src/hmac.scm"
887 (("openssl")
888 (string-append (assoc-ref inputs "openssl")
889 "/bin/openssl")))
890 #t))
891
892 ;; XXX: The code uses 'include' to include its own source
893 ;; files, and "-L src" isn't enough in this case.
894 (add-before 'build 'chdir
895 (lambda _ (chdir "src") #t))
896 (add-after 'build 'chdir-back
897 (lambda _ (chdir "..") #t))
898
899 (add-after 'install 'install-kernel
900 (lambda* (#:key inputs outputs #:allow-other-keys)
901 (let* ((out (assoc-ref outputs "out"))
902 (json (assoc-ref inputs "guile-json"))
903 (zmq (assoc-ref inputs "guile-simple-zmq"))
904 (deps (list json zmq))
905 (dir (string-append
906 out "/share/jupyter/kernels/guile"))
907 (effective (target-guile-effective-version)))
908 ;; Install kernel.
909 (install-file "src/kernel.json" dir)
910
911 ;; Fix hard-coded file name in the kernel.
912 (substitute* (string-append dir "/kernel.json")
913 (("/home/.*/guile-jupyter-kernel.scm")
914 (string-append out "/share/guile/site/"
915 (target-guile-effective-version)
916 "/guile-jupyter-kernel.scm"))
917 (("\"guile\"")
918 (string-append "\"" (assoc-ref inputs "guile")
919 "/bin/guile\""))
920 (("-s")
921 ;; Add '-L' and '-C' flags so that the kernel
922 ;; finds its dependencies.
923 (let ((-L (map (lambda (item)
924 (string-append "\"" item
925 "/share/guile/site/"
926 effective "\""))
927 deps))
928 (-C (map (lambda (item)
929 (string-append "\"" item
930 "/lib/guile/"
931 effective
932 "/site-ccache\""))
933 deps)))
934 (string-append "--no-auto-compile\""
935 (string-join -L ", \"-L\", "
936 'prefix)
937 (string-join -C ", \"-C\", "
938 'prefix)
939 ", \"-s"))))
940 #t))))))
941 (inputs
942 `(("openssl" ,openssl)
943 ("guile" ,guile-2.2)
91f55717 944 ("guile-json" ,guile-json-1)
0791437f
RW
945 ("guile-simple-zmq" ,guile-simple-zmq)))
946 (synopsis "Guile kernel for the Jupyter Notebook")
947 (description
948 "This package provides a Guile 2.x kernel for the Jupyter Notebook. It
949allows users to interact with the Guile REPL through Jupyter.")
950 (home-page "https://github.com/jerry40/guile-kernel")
951 (license license:gpl3+))))
952
953(define-public guile-sparql
954 (package
955 (name "guile-sparql")
956 (version "0.0.7")
957 (source (origin
958 (method url-fetch)
959 (uri (string-append
960 "https://github.com/roelj/guile-sparql/releases/download/"
961 version "/guile-sparql-" version ".tar.gz"))
962 (sha256
963 (base32 "1drnvhsgl0gc5crmb16yyw1j98nkhwwcgssv9vgm36ng43nnzffd"))))
964 (build-system gnu-build-system)
965 (arguments `(#:tests? #f)) ; There are no tests.
966 (native-inputs
967 `(("pkg-config" ,pkg-config)))
968 (inputs
969 `(("guile" ,guile-2.2)))
970 (home-page "https://github.com/roelj/guile-sparql")
971 (synopsis "SPARQL module for Guile")
972 (description "This package provides the functionality to query a SPARQL
973endpoint. Additionally, it provides an interface to write SPARQL queries
974using S-expressions.")
975 (license license:gpl3+)))
976
977(define-public guile-debbugs
978 (package
979 (name "guile-debbugs")
5144f542 980 (version "0.0.3")
0791437f
RW
981 (source (origin
982 (method url-fetch)
983 (uri (string-append "mirror://gnu/guile-debbugs/guile-debbugs-"
984 version ".tar.gz"))
985 (sha256
986 (base32
5144f542 987 "1cc63nw3xdfjrfk8c58r6d5lidmfq5cpqcy32yd5xp81yccprvn9"))))
0791437f 988 (build-system gnu-build-system)
5144f542
RW
989 (propagated-inputs
990 `(("guile-email" ,guile-email)))
0791437f
RW
991 (native-inputs
992 `(("guile" ,guile-2.2)
993 ("pkg-config" ,pkg-config)))
994 (home-page "https://savannah.gnu.org/projects/guile-debbugs/")
995 (synopsis "Guile interface to the Debbugs bug tracking service")
996 (description
997 "This package provides a Guile library to communicate with a Debbugs bug
998tracker's SOAP service, such as @url{https://bugs.gnu.org}.")
999 (license license:gpl3+)))
1000
1001(define-public guile-email
50771f5b
AI
1002 (package
1003 (name "guile-email")
223cb7c6 1004 (version "0.2.2")
50771f5b
AI
1005 (source
1006 (origin
1007 (method url-fetch)
1008 (uri (string-append
db18d87a
AI
1009 "https://guile-email.systemreboot.net/releases/guile-email-"
1010 version ".tar.lz"))
50771f5b
AI
1011 (sha256
1012 (base32
223cb7c6 1013 "1rc8r0fgvflnyq5ckl7ii8sghpsgpkzxa8vskjr1ak2kyar6m35k"))))
50771f5b
AI
1014 (build-system gnu-build-system)
1015 (native-inputs
1016 `(("pkg-config" ,pkg-config)
db18d87a 1017 ("lzip" ,lzip)))
50771f5b
AI
1018 (inputs
1019 `(("guile" ,guile-2.2)))
db18d87a 1020 (arguments
2c33a849 1021 '(#:make-flags '("GUILE_AUTO_COMPILE=0"))) ; to prevent guild warnings
db18d87a 1022 (home-page "https://guile-email.systemreboot.net")
50771f5b 1023 (synopsis "Guile email parser")
db18d87a
AI
1024 (description "guile-email is a collection of email utilities implemented
1025in pure guile. It supports parsing MIME (Multipurpose Internet Mail
1026Extensions) compliant email messages and reading emails from the mbox
1027format.")
50771f5b 1028 (license license:agpl3+)))
0791437f 1029
0791437f 1030(define-public guile-newt
442a11f6
MO
1031 (package
1032 (name "guile-newt")
1033 (version "0.0.1")
1034 (source (origin
1035 (method git-fetch)
1036 (uri (git-reference
1037 (url "https://gitlab.com/mothacehe/guile-newt")
1038 (commit version)))
1039 (file-name (git-file-name name version))
1040 (sha256
1041 (base32
e7fc7746
LC
1042 "1w7qy4dw1f4bx622l6hw8mv49sf1ha8kch8j4nganyk8fj0wn695"))
1043 (modules '((guix build utils)))
1044 (snippet
1045 '(begin
1046 ;; Allow builds with Guile 3.0.
1047 (substitute* "configure.ac"
1048 (("^GUILE_PKG.*")
1049 "GUILE_PKG([3.0 2.2 2.0])\n"))
1050
1051 ;; Remove "guile.m4" since it contains an obsolete version
1052 ;; of 'GUILE_PKG' that doesn't work with development
1053 ;; versions such as 2.9.
1054 (delete-file "m4/guile.m4")
1055 #t))))
442a11f6
MO
1056 (build-system gnu-build-system)
1057 (arguments
1058 '(#:make-flags
1059 '("GUILE_AUTO_COMPILE=0"))) ;to prevent guild warnings
1060 (inputs
1061 `(("guile" ,guile-2.2)
1062 ("newt" ,newt)))
1063 (native-inputs
1064 `(("autoconf" ,autoconf)
1065 ("automake" ,automake)
1066 ("pkg-config" ,pkg-config)))
1067 (synopsis "Guile bindings to Newt")
1068 (description
1069 "This package provides bindings for Newt, a programming library for
0791437f
RW
1070color text mode, widget based user interfaces. The bindings are written in pure
1071Scheme by using Guile’s foreign function interface.")
442a11f6
MO
1072 (home-page "https://gitlab.com/mothacehe/guile-newt")
1073 (license license:gpl3+)))
0791437f 1074
e7fc7746
LC
1075(define-public guile3.0-newt
1076 (package
1077 (inherit guile-newt)
1078 (name "guile3.0-newt")
1079 (inputs `(("guile" ,guile-next)
1080 ,@(alist-delete "guile" (package-inputs guile-newt))))))
1081
0791437f
RW
1082(define-public guile-mastodon
1083 (package
1084 (name "guile-mastodon")
1085 (version "0.0.1")
1086 (source (origin
1087 (method git-fetch)
1088 (uri (git-reference
1089 (url "https://framagit.org/prouby/guile-mastodon.git")
1090 (commit (string-append "v" version))))
1091 (file-name (git-file-name name version))
1092 (sha256
1093 (base32
1094 "1vblf3d1bbwna3l09p2ap5y8ycvl549bz6whgk78imyfmn28ygry"))))
1095 (build-system gnu-build-system)
1096 (native-inputs
1097 `(("autoconf" ,autoconf)
1098 ("automake" ,automake)
1099 ("pkg-config" ,pkg-config)))
1100 (inputs
1101 `(("guile" ,guile-2.2)
1102 ("gnutls" ,gnutls)
91f55717 1103 ("guile-json" ,guile-json-1)))
0791437f
RW
1104 (home-page "https://framagit.org/prouby/guile-mastodon")
1105 (synopsis "Guile Mastodon REST API module")
1106 (description "This package provides Guile modules to access the
1107@uref{https://docs.joinmastodon.org/api/, REST API of Mastodon}, a federated
1108microblogging service.")
1109 (license license:gpl3+)))
1110
0791437f 1111(define-public guile-parted
dbcd503c
MO
1112 (package
1113 (name "guile-parted")
a3246602 1114 (version "0.0.2")
dbcd503c
MO
1115 (source (origin
1116 (method git-fetch)
1117 (uri (git-reference
1118 (url "https://gitlab.com/mothacehe/guile-parted")
1119 (commit version)))
1120 (file-name (git-file-name name version))
1121 (sha256
1122 (base32
e5b95558
LC
1123 "01qmv6xnbbq3wih0dl9bscvca2d7zx7bjiqf35y6dkaqsp8nvdxf"))
1124 (modules '((guix build utils)))
1125 (snippet
1126 '(begin
1127 ;; Allow builds with Guile 3.0.
1128 (substitute* "configure.ac"
1129 (("^GUILE_PKG.*")
1130 "GUILE_PKG([3.0 2.2 2.0])\n"))
1131
1132 ;; Remove "guile.m4" since it contains an obsolete version
1133 ;; of 'GUILE_PKG' that doesn't work with development
1134 ;; versions such as 2.9.
1135 (delete-file "m4/guile.m4")
1136 #t))))
dbcd503c
MO
1137 (build-system gnu-build-system)
1138 (arguments
1139 '(#:make-flags
1140 '("GUILE_AUTO_COMPILE=0"))) ;to prevent guild warnings
1141 (inputs
1142 `(("guile" ,guile-2.2)
1143 ("parted" ,parted)))
1144 (propagated-inputs
1145 `(("guile-bytestructures" ,guile-bytestructures)))
1146 (native-inputs
1147 `(("autoconf" ,autoconf)
1148 ("automake" ,automake)
1149 ("pkg-config" ,pkg-config)))
1150 (synopsis "Guile bindings to GNU Parted")
1151 (description
1152 "This package provides bindings for GNU Parted library, a C library
1153allowing disk partition tables creation and manipulation. The bindings are
0791437f 1154written in pure Scheme by using Guile's foreign function interface.")
dbcd503c
MO
1155 (home-page "https://gitlab.com/mothacehe/guile-parted")
1156 (license license:gpl3+)))
0791437f 1157
e5b95558
LC
1158(define-public guile3.0-parted
1159 (package
1160 (inherit guile-parted)
1161 (name "guile3.0-parted")
1162 (inputs `(("guile" ,guile-next)
1163 ,@(alist-delete "guile" (package-inputs guile-parted))))
1164 (propagated-inputs
1165 `(("guile-bytestructures" ,guile3.0-bytestructures)))))
1166
0791437f
RW
1167(define-public guile-xosd
1168 (package
1169 (name "guile-xosd")
1170 (version "0.2.1")
1171 (source (origin
1172 (method url-fetch)
1173 (uri (string-append "https://github.com/alezost/" name
1174 "/releases/download/v" version
1175 "/" name "-" version ".tar.gz"))
1176 (sha256
1177 (base32
1178 "1ri5065c16kmgrf2pysn2ymxjqi5302lhpb07wkl1jr75ym8fn8p"))))
1179 (build-system gnu-build-system)
1180 (native-inputs
1181 `(("pkg-config" ,pkg-config)))
1182 (inputs
1183 `(("guile" ,guile-2.2)
1184 ("libx11" ,libx11)
1185 ("libxext" ,libxext)
1186 ("libxinerama" ,libxinerama)
1187 ("xosd" ,xosd)))
1188 (home-page "https://github.com/alezost/guile-xosd")
1189 (synopsis "XOSD bindings for Guile")
1190 (description
1191 "Guile-XOSD provides Guile bindings for @code{libxosd},
1192@uref{http://sourceforge.net/projects/libxosd/, the X On Screen Display
1193library}.")
1194 (license license:gpl3+)))
1195
1196(define-public guile-dbi
1197 (package
1198 (name "guile-dbi")
1199 (version "2.1.6")
1200 (source (origin
1201 (method url-fetch)
1202 (uri (string-append
1203 "http://download.gna.org/guile-dbi/guile-dbi-"
1204 version ".tar.gz"))
1205 (sha256
1206 (base32
1207 "116njrprhgrsv1qm904sp3b02rq01fx639r433d657gyhw3x159n"))))
1208 (build-system gnu-build-system)
1209 (arguments
1210 '(#:configure-flags
1211 (list (string-append
1212 "--with-guile-site-dir=" %output "/share/guile/site/2.2"))
1213 #:make-flags
406ef442
CB
1214 (list (string-append
1215 "LDFLAGS=-Wl,-rpath=" %output "/lib:"
1216 (assoc-ref %build-inputs "guile-dbd-sqlite3") "/lib" ":"
1217 (assoc-ref %build-inputs "guile-dbd-postgresql") "/lib"))
0791437f
RW
1218 #:phases
1219 (modify-phases %standard-phases
1220 (add-after 'install 'patch-extension-path
1221 (lambda* (#:key outputs #:allow-other-keys)
1222 (let* ((out (assoc-ref outputs "out"))
1223 (dbi.scm (string-append
1224 out "/share/guile/site/2.2/dbi/dbi.scm"))
1225 (ext (string-append out "/lib/libguile-dbi")))
1226 (substitute* dbi.scm (("libguile-dbi") ext))
1227 #t))))))
1228 (inputs
406ef442
CB
1229 `(("guile-dbd-sqlite3" ,guile-dbd-sqlite3)
1230 ("guile-dbd-postgresql" ,guile-dbd-postgresql))) ; only shared library, no scheme files
0791437f
RW
1231 (propagated-inputs
1232 `(("guile" ,guile-2.2)))
1233 (synopsis "Guile database abstraction layer")
1234 (home-page "http://home.gna.org/guile-dbi/guile-dbi.html")
1235 (description
1236 "guile-dbi is a library for Guile that provides a convenient interface to
1237SQL databases. Database programming with guile-dbi is generic in that the same
1238programming interface is presented regardless of which database system is used.
1239It currently supports MySQL, Postgres and SQLite3.")
1240 (license license:gpl2+)))
1241
1242(define guile-dbi-bootstrap
1243 (package
1244 (inherit guile-dbi)
1245 (name "guile-dbi-bootstrap")
1246 (inputs '())
1247 (arguments
1248 (substitute-keyword-arguments (package-arguments guile-dbi)
1249 ((#:make-flags _) '(list))))))
1250
1251(define-public guile-dbd-sqlite3
1252 (package
1253 (name "guile-dbd-sqlite3")
1254 (version "2.1.6")
1255 (source (origin
1256 (method url-fetch)
1257 (uri (string-append
1258 "http://download.gna.org/guile-dbi/guile-dbd-sqlite3-"
1259 version ".tar.gz"))
1260 (sha256
1261 (base32
1262 "0rg71jchxd2y8x496s8zmfmikr5g8zxi8zv2ar3f7a23pph92iw2"))))
1263 (build-system gnu-build-system)
1264 (native-inputs
1265 `(("pkg-config" ,pkg-config)
1266 ("guile-dbi-bootstrap" ,guile-dbi-bootstrap))) ; only required for headers
1267 (inputs
1268 `(("sqlite" ,sqlite)
1269 ("zlib" ,(@ (gnu packages compression) zlib))))
1270 (synopsis "Guile DBI driver for SQLite")
1271 (home-page "https://github.com/jkalbhenn/guile-dbd-sqlite3")
1272 (description
1273 "guile-dbi is a library for Guile that provides a convenient interface to
1274SQL databases. This package implements the interface for SQLite.")
1275 (license license:gpl2+)))
1276
406ef442
CB
1277(define-public guile-dbd-postgresql
1278 (let ((commit "e97589b6b018b206c901e4cc24db463407a4036b")
1279 (revision 0))
1280 (package
1281 (name "guile-dbd-postgresql")
1282 (version (string-append
1283 "2.1.6-" (number->string revision) "." (string-take commit 7)))
1284 (source
1285 (origin
1286 (method git-fetch)
1287 (uri (git-reference
1288 (url "https://github.com/opencog/guile-dbi.git")
1289 (commit commit)))
1290 (file-name (git-file-name name version))
1291 (sha256
1292 (base32 "0n1gv9a0kdys10a4qmnrwvg5sydwb03880asri4gqdchcj3fimni"))))
1293 (build-system gnu-build-system)
1294 (arguments
1295 '(#:phases
1296 (modify-phases %standard-phases
1297 (add-after 'unpack 'chdir
1298 (lambda _
1299 ;; The upstream Git repository contains all the code, so change
1300 ;; to the relevant directory.
1301 (chdir "guile-dbd-postgresql")
1302 #t))
1303 (add-after 'chdir 'patch-src/Makefile.am
1304 (lambda* (#:key inputs #:allow-other-keys)
1305 (substitute* "src/Makefile.am"
1306 (("/usr/include")
1307 (string-append (assoc-ref inputs "postgresql") "/include")))
1308 #t))
1309 (add-after 'patch-src/Makefile.am 'patch-src
1310 (lambda _
1311 (substitute* "src/guile-dbd-postgresql.c"
1312 (("postgresql/libpq-fe\\.h") "libpq-fe.h"))
1313 #t)))))
1314 (native-inputs
1315 `(("pkg-config" ,pkg-config)
1316 ("automake" ,automake)
1317 ("autoconf" ,autoconf)
1318 ("perl" ,perl)
1319 ("libtool" ,libtool)
1320 ("guile-dbi-bootstrap" ,guile-dbi-bootstrap)))
1321 (inputs
1322 `(("postgresql" ,postgresql)
1323 ("zlib" ,zlib)))
1324 (synopsis "Guile DBI driver for PostgreSQL")
1325 (home-page
1326 "https://github.com/opencog/guile-dbi/tree/master/guile-dbd-postgresql")
1327 (description
1328 "@code{guile-dbi} is a library for Guile that provides a convenient
1329interface to SQL databases. This package implements the interface for
1330PostgreSQL.")
1331 (license license:gpl2+))))
1332
0791437f
RW
1333(define-public guile-config
1334 (package
1335 (name "guile-config")
91e29547 1336 (version "0.3.1")
0791437f
RW
1337 (source
1338 (origin
1339 (method git-fetch)
1340 (uri (git-reference
1341 (url "https://gitlab.com/a-sassmannshausen/guile-config")
91e29547
AS
1342 (commit (string-append "v" version))))
1343 (file-name (git-file-name name version))
1344 (sha256 (base32
1345 "0gglsqwpw77gvrqcny8irpqfl7qdf2v8n9ggwrswanxalj4vcbvf"))))
0791437f
RW
1346 (build-system gnu-build-system)
1347 (native-inputs
1348 `(("autoconf" ,autoconf)
1349 ("automake" ,automake)
1350 ("pkg-config" ,pkg-config)
1351 ("texinfo" ,texinfo)))
1352 (inputs `(("guile" ,guile-2.2)))
1353 (synopsis
1354 "Guile application configuration parsing library.")
1355 (description
1356 "Guile Config is a library providing a declarative approach to
1357application configuration specification. The library provides clean
1358configuration declaration forms, and processors that take care of:
1359configuration file creation; configuration file parsing; command-line
1360parameter parsing using getopt-long; basic GNU command-line parameter
1361generation (--help, --usage, --version); automatic output generation for the
1362above command-line parameters.")
1363 (home-page
1364 "https://gitlab.com/a-sassmannshausen/guile-config")
1365 (license license:gpl3+)))
1366
0ac6b836
AS
1367(define-public guile3.0-config
1368 (package
1369 (inherit guile-config)
1370 (name "guile3.0-config")
1371 (inputs `(("guile" ,guile-next)
1372 ,@(alist-delete "guile" (package-inputs guile-config))))))
1373
0791437f
RW
1374(define-public guile-hall
1375 (package
1376 (name "guile-hall")
cfc4e498 1377 (version "0.2.1")
0791437f 1378 (source
feb11b08
RW
1379 (origin
1380 (method git-fetch)
1381 (uri (git-reference
1382 (url "https://gitlab.com/a-sassmannshausen/guile-hall")
1383 (commit (string-append "v" version))))
1384 (file-name (git-file-name name version))
1385 (sha256 (base32
cfc4e498 1386 "0dwx5iyg0dmdf64wq0b4w306bapr86jwnw35npgbjq4cqm8qbzqn"))))
0791437f
RW
1387 (build-system gnu-build-system)
1388 (arguments
63bf0afd
AS
1389 `(#:modules
1390 ((ice-9 match)
1391 (ice-9 ftw)
1392 ,@%gnu-build-system-modules)
1393 #:phases
1394 (modify-phases
1395 %standard-phases
1396 (add-after 'install 'hall-wrap-binaries
1397 (lambda* (#:key inputs outputs #:allow-other-keys)
1398 (let* ((compiled-dir
1399 (lambda (out version)
1400 (string-append
1401 out "/lib/guile/" version "/site-ccache")))
1402 (uncompiled-dir
1403 (lambda (out version)
1404 (string-append
1405 out "/share/guile/site"
1406 (if (string-null? version) "" "/") version)))
1407 (dep-path
1408 (lambda (env modules path)
1409 (list env ":" 'prefix
1410 (cons modules
1411 (map (lambda (input)
1412 (string-append
1413 (assoc-ref inputs input)
1414 path))
1415 ,''("guile-config"))))))
1416 (out (assoc-ref outputs "out"))
1417 (bin (string-append out "/bin/"))
1418 (site (uncompiled-dir out "")))
1419 (match (scandir site)
1420 (("." ".." version)
1421 (for-each
1422 (lambda (file)
1423 (wrap-program
1424 (string-append bin file)
1425 (dep-path
1426 "GUILE_LOAD_PATH"
1427 (uncompiled-dir out version)
1428 (uncompiled-dir "" version))
1429 (dep-path
1430 "GUILE_LOAD_COMPILED_PATH"
1431 (compiled-dir out version)
1432 (compiled-dir "" version))))
1433 ,''("hall"))
1434 #t))))))))
0791437f 1435 (native-inputs
63bf0afd
AS
1436 `(("autoconf" ,autoconf)
1437 ("automake" ,automake)
1438 ("pkg-config" ,pkg-config)
1439 ("texinfo" ,texinfo)))
0791437f
RW
1440 (inputs `(("guile" ,guile-2.2)))
1441 (propagated-inputs
3c3e6620 1442 `(("guile-config" ,guile-config)))
0791437f
RW
1443 (synopsis "Guile project tooling")
1444 (description
3c3e6620
RW
1445 "Hall is a command-line application and a set of Guile libraries that
1446allow you to quickly create and publish Guile projects. It allows you to
1447transparently support the GNU build system, manage a project hierarchy &
1448provides tight coupling to Guix.")
1449 (home-page "https://gitlab.com/a-sassmannshausen/guile-hall")
06085fac 1450 (license license:gpl3+)))
0791437f 1451
df18ea6f
AS
1452(define-public guile3.0-hall
1453 (package
1454 (inherit guile-hall)
1455 (name "guile3.0-hall")
1456 (inputs `(("guile" ,guile-next)
1457 ,@(alist-delete "guile" (package-inputs guile-hall))))
1458 (propagated-inputs
1459 `(("guile-config" ,guile3.0-config)
1460 ,@(alist-delete "guile-config"
1461 (package-propagated-inputs guile-hall))))))
1462
0791437f
RW
1463(define-public guile-ics
1464 (package
1465 (name "guile-ics")
1466 (version "0.2.0")
1467 (source (origin
1468 (method git-fetch)
1469 (uri (git-reference
1470 (url "https://github.com/artyom-poptsov/guile-ics")
1471 (commit (string-append "v" version))))
1472 (file-name (string-append name "-" version "-checkout"))
1473 (sha256
1474 (base32
6713589d
LC
1475 "0qjjvadr7gibdq9jvwkmlkb4afsw9n2shfj9phpiadinxk3p4m2g"))
1476 (modules '((guix build utils)))
1477 (snippet
1478 '(begin
1479 ;; Allow builds with Guile 3.0.
1480 (substitute* "configure.ac"
1481 (("^GUILE_PKG.*")
1482 "GUILE_PKG([3.0 2.2 2.0])\n"))
1483 #t))))
0791437f
RW
1484 (build-system gnu-build-system)
1485 (native-inputs
1486 `(("autoconf" ,autoconf-wrapper)
1487 ("automake" ,automake)
1488 ("texinfo" ,texinfo)
1489 ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'.
1490 ("gettext" ,gettext-minimal)
1491 ("pkg-config" ,pkg-config)))
1492 (inputs `(("guile" ,guile-2.2) ("which" ,which)))
1493 (propagated-inputs `(("guile-lib" ,guile-lib)))
1494 (home-page "https://github.com/artyom-poptsov/guile-ics")
1495 (synopsis "Guile parser library for the iCalendar format")
1496 (description
1497 "Guile-ICS is an iCalendar (RFC5545) format parser library written in
1498pure Scheme. The library can be used to read and write iCalendar data.
1499
1500The library is shipped with documentation in Info format and usage examples.")
1501 (license license:gpl3+)))
1502
6713589d
LC
1503(define-public guile3.0-ics
1504 (package
1505 (inherit guile-ics)
1506 (name "guile3.0-ics")
1507 (inputs `(("guile" ,guile-3.0)
1508 ,@(alist-delete "guile" (package-inputs guile-ics))))
1509 (propagated-inputs `(("guile-lib" ,guile3.0-lib)))))
1510
0791437f
RW
1511(define-public guile-wisp
1512 (package
1513 (name "guile-wisp")
65610f73 1514 (version "1.0.2")
0791437f
RW
1515 (source (origin
1516 (method url-fetch)
1517 (uri (string-append "https://bitbucket.org/ArneBab/"
1518 "wisp/downloads/wisp-"
1519 version ".tar.gz"))
1520 (sha256
1521 (base32
65610f73 1522 "03pz7pj9jyallynhflp5s7qax8dj1fs8la434wrfgz7g1kgjnvf6"))))
0791437f
RW
1523 (build-system gnu-build-system)
1524 (arguments
1525 `(#:modules ((guix build gnu-build-system)
15218d4e 1526 ((guix build emacs-build-system) #:prefix emacs:)
0791437f 1527 (guix build utils)
15218d4e 1528 (guix build emacs-utils)
0791437f
RW
1529 (ice-9 rdelim)
1530 (ice-9 popen))
15218d4e
RW
1531 #:imported-modules (,@%gnu-build-system-modules
1532 (guix build emacs-build-system)
1533 (guix build emacs-utils))
0791437f
RW
1534 #:phases
1535 (modify-phases %standard-phases
1536 (add-before 'configure 'patch-/usr/bin/env
1537 (lambda _
1538 (substitute* "Makefile.in"
65610f73 1539 (("/usr/bin/env bash") (which "bash")))
0791437f
RW
1540 #t))
1541 ;; auto compilation breaks, but if we set HOME to /tmp,
1542 ;; that works ok
1543 (add-before 'check 'auto-compile-hacky-workaround
1544 (lambda _ (setenv "HOME" "/tmp") #t))
1545 (add-after 'install 'install-go-files
1546 (lambda* (#:key outputs inputs #:allow-other-keys)
1547 (let* ((out (assoc-ref outputs "out"))
1548 (effective (read-line
1549 (open-pipe* OPEN_READ
1550 "guile" "-c"
1551 "(display (effective-version))")))
1552 (module-dir (string-append out "/share/guile/site/"
1553 effective))
1554 (object-dir (string-append out "/lib/guile/" effective
1555 "/site-ccache"))
1556 (prefix (string-length module-dir)))
1557 ;; compile to the destination
1558 (for-each (lambda (file)
1559 (let* ((base (string-drop (string-drop-right file 4)
1560 prefix))
1561 (go (string-append object-dir base ".go")))
1562 (invoke "guild" "compile" "-L" module-dir
1563 file "-o" go)))
1564 (find-files module-dir "\\.scm$"))
15218d4e
RW
1565 #t)))
1566 (add-after 'install 'install-emacs-files
1567 (assoc-ref emacs:%standard-phases 'install))
1568 (add-after 'install-emacs-files 'compile-emacs-files
1569 (assoc-ref emacs:%standard-phases 'build))
1570 (add-after 'compile-emacs-files 'make-autoloads
1571 (assoc-ref emacs:%standard-phases 'make-autoloads)))))
17f90b67 1572 (home-page "https://www.draketo.de/english/wisp")
0791437f
RW
1573 (inputs
1574 `(("guile" ,guile-2.2)))
1575 (native-inputs
15218d4e
RW
1576 `(("emacs" ,emacs-minimal)
1577 ("python" ,python)
0791437f
RW
1578 ("pkg-config" ,pkg-config)))
1579 (synopsis "Whitespace to lisp syntax for Guile")
1580 (description "Wisp is a syntax for Guile which provides a Python-like
1581whitespace-significant language. It may be easier on the eyes for some
1582users and in some situations.")
1583 (license license:gpl3+)))
1584
b0b725ed
RW
1585(define-public guile3.0-wisp
1586 (package
1587 (inherit guile-wisp)
1588 (name "guile3.0-wisp")
1589 (inputs `(("guile" ,guile-3.0)))
1590 (arguments
1591 (substitute-keyword-arguments (package-arguments guile-wisp)
1592 ((#:phases phases)
1593 `(modify-phases ,phases
1594 (add-after 'unpack 'support-guile-3.0
1595 (lambda _
1596 (substitute* "configure"
1597 (("_guile_versions_to_search=\"2.2")
1598 "_guile_versions_to_search=\"3.0 2.2"))
1599 #t))))))))
1600
0791437f
RW
1601(define-public guile-sly
1602 (package
1603 (name "guile-sly")
1604 (version "0.1")
1605 (source (origin
1606 (method url-fetch)
1607 (uri (string-append "https://files.dthompson.us/sly/sly-"
1608 version ".tar.gz"))
1609 (sha256
1610 (base32
1611 "1svzlbz2vripmyq2kjh0rig16bsrnbkwbsm558pjln9l65mcl4qq"))
1612 (modules '((guix build utils)))
1613 (snippet
1614 '(begin
1615 (substitute* "configure"
1616 (("_guile_required_version=\"2.0.11\"")
1617 "_guile_required_version=\"2\"")
1618 (("ac_subst_vars='")
1619 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
1620 (substitute* (find-files "." "Makefile.in")
1621 (("moddir = .*$")
1622 (string-append
1623 "moddir = "
1624 "$(prefix)/share/guile/site/@GUILE_EFFECTIVE_VERSION@\n"))
1625 (("godir = .*$")
1626 (string-append
1627 "godir = "
1628 "$(prefix)/lib/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n")))
1629 #t))))
1630 (build-system gnu-build-system)
1631 (arguments
1632 '(#:configure-flags
1633 (list (string-append "--with-libfreeimage-prefix="
1634 (assoc-ref %build-inputs "freeimage"))
1635 (string-append "--with-libgslcblas-prefix="
1636 (assoc-ref %build-inputs "gsl")))))
1637 (native-inputs
1638 `(("pkg-config" ,pkg-config)))
1639 (propagated-inputs
1640 `(("guile-sdl" ,guile-sdl)
1641 ("guile-opengl" ,guile-opengl)))
1642 (inputs
1643 `(("guile" ,guile-2.2)
1644 ("gsl" ,gsl)
1645 ("freeimage" ,freeimage)
1646 ("mesa" ,mesa)))
1647 (synopsis "2D/3D game engine for GNU Guile")
1648 (description "Sly is a 2D/3D game engine written in Guile Scheme. Sly
1649features a functional reactive programming interface and live coding
1650capabilities.")
1651 (home-page "https://dthompson.us/projects/sly.html")
1652 (license license:gpl3+)))
1653
1654(define-public g-wrap
1655 (package
1656 (name "g-wrap")
1657 (version "1.9.15")
1658 (source (origin
1659 (method url-fetch)
1660 (uri (string-append "mirror://savannah/g-wrap/g-wrap-"
1661 version ".tar.gz"))
1662 (sha256
1663 (base32
1664 "0ak0bha37dfpj9kmyw1r8fj8nva639aw5xr66wr5gd3l1rqf5xhg"))))
1665 (build-system gnu-build-system)
1666 (native-inputs
1667 `(("pkg-config" ,pkg-config)))
1668 (propagated-inputs
1669 `(("guile" ,guile-2.2)
1670 ("guile-lib" ,guile-lib)))
1671 (inputs
1672 `(("libffi" ,libffi)))
1673 (arguments
1674 `(#:configure-flags '("--disable-Werror")
1675 #:phases
1676 (modify-phases %standard-phases
1677 (add-before 'configure 'pre-configure
1678 (lambda* (#:key outputs #:allow-other-keys)
1679 (let ((out (assoc-ref outputs "out")))
1680 (substitute* (find-files "." "^Makefile.in$")
1681 (("guilemoduledir =.*guile/site" all)
1682 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))
1683 #t))))))
1684 (synopsis "Generate C bindings for Guile")
1685 (description "G-Wrap is a tool and Guile library for generating function
1686wrappers for inter-language calls. It currently only supports generating Guile
1687wrappers for C functions. Given a definition of the types and prototypes for
1688a given C interface, G-Wrap will automatically generate the C code that
1689provides access to that interface and its types from the Scheme level.")
1690 (home-page "https://www.nongnu.org/g-wrap/index.html")
1691 (license license:lgpl2.1+)))
1692
1693(define-public guile-miniadapton
1694 (let ((commit "1b5749422304567c96ac5367f2221dda9eff5880")
1695 (revision "1"))
1696 (package
1697 (name "guile-miniadapton")
1698 (version (string-append "0-" revision "." (string-take commit 9)))
1699 (source (origin
1700 (method git-fetch)
1701 (uri (git-reference
1702 (url "https://github.com/fisherdj/miniAdapton.git")
1703 (commit commit)))
1704 (file-name (string-append name "-" version "-checkout"))
1705 (sha256
1706 (base32
1707 "09q51zkw2fypad5xixskfzw2cjhjgs5cswdp3i7cpp651rb3zndh"))))
1708 (build-system guile-build-system)
1709 (native-inputs
1710 `(("guile" ,guile-2.2)))
1711 (home-page "https://github.com/fisherdj/miniAdapton")
1712 (synopsis "Minimal implementation of incremental computation in Guile
1713Scheme")
1714 (description "This package provides a complete Scheme implementation of
1715miniAdapton, which implements the core functionality of the Adapton system for
1716incremental computation (also known as self-adjusting computation). Like
1717Adapton, miniAdapton allows programmers to safely combine mutation and
1718memoization. miniAdapton is built on top of an even simpler system,
1719microAdapton. Both miniAdapton and microAdapton are designed to be easy to
1720understand, extend, and port to host languages other than Scheme.")
1721 (license license:expat))))
1722
1723(define-public guile-reader
1724 (package
1725 (name "guile-reader")
1726 (version "0.6.2")
1727 (source (origin
1728 (method url-fetch)
1729 (uri (string-append "mirror://savannah/guile-reader/guile-reader-"
1730 version ".tar.gz"))
1731 (sha256
1732 (base32
1733 "0592s2s8ampqmqwilc4fvcild6rb9gy79di6vxv5kcdmv23abkgx"))))
1734 (build-system gnu-build-system)
1735 (native-inputs `(("pkgconfig" ,pkg-config)
1736 ("gperf" ,gperf-3.0)))
1737 (inputs `(("guile" ,guile-2.2)))
1738 (synopsis "Framework for building readers for GNU Guile")
1739 (description
1740 "Guile-Reader is a simple framework for building readers for GNU Guile.
1741
1742The idea is to make it easy to build procedures that extend Guile’s read
1743procedure. Readers supporting various syntax variants can easily be written,
1744possibly by re-using existing “token readers” of a standard Scheme
1745readers. For example, it is used to implement Skribilo’s R5RS-derived
1746document syntax.
1747
1748Guile-Reader’s approach is similar to Common Lisp’s “read table”, but
1749hopefully more powerful and flexible (for instance, one may instantiate as
1750many readers as needed).")
1751 (home-page "https://www.nongnu.org/guile-reader/")
1752 (license license:gpl3+)))
1753
0791437f
RW
1754(define-public guile-ncurses
1755 (package
1756 (name "guile-ncurses")
2b155e3a 1757 (version "3.0")
0791437f
RW
1758 (source (origin
1759 (method url-fetch)
1760 (uri (string-append "mirror://gnu/guile-ncurses/guile-ncurses-"
1761 version ".tar.gz"))
1762 (sha256
1763 (base32
2b155e3a 1764 "038xbffalhymg26lvmzgf7ljilxz2f2zmqg5r5nfzbipfbprwjhf"))))
0791437f
RW
1765 (build-system gnu-build-system)
1766 (inputs `(("ncurses" ,ncurses)
1767 ("guile" ,guile-2.2)))
1768 (native-inputs `(("pkg-config" ,pkg-config)))
1769 (arguments
1770 '(#:configure-flags (list "--with-ncursesw" ; Unicode support
1771 "--with-gnu-filesystem-hierarchy")
1772 #:phases
1773 (modify-phases %standard-phases
1774 (add-before 'build 'fix-libguile-ncurses-file-name
1775 (lambda* (#:key outputs #:allow-other-keys)
1776 (invoke "make" "install"
1777 "-C" "src/ncurses"
1778 "-j" (number->string
1779 (parallel-job-count)))
1780 (let* ((out (assoc-ref outputs "out"))
1781 (dir "src/ncurses")
1782 (files (find-files dir ".scm")))
1783 (substitute* files
1784 (("\"libguile-ncurses\"")
1785 (format #f "\"~a/lib/guile/2.2/libguile-ncurses\""
1786 out)))
1787 #t))))))
1788 (home-page "https://www.gnu.org/software/guile-ncurses/")
1789 (synopsis "Guile bindings to ncurses")
1790 (description
1791 "guile-ncurses provides Guile language bindings for the ncurses
1792library.")
1793 (license license:lgpl3+)))
1794
1795(define-public guile-ncurses/gpm
1796 (package
1797 (inherit guile-ncurses)
1798 (name "guile-ncurses-with-gpm")
1799 (inputs `(("ncurses" ,ncurses/gpm)
1800 ("guile" ,guile-2.2)))))
1801
1802(define-public guile-lib
1803 (package
1804 (name "guile-lib")
1805 (version "0.2.6.1")
1806 (source (origin
1807 (method url-fetch)
1808 (uri (string-append "mirror://savannah/guile-lib/guile-lib-"
1809 version ".tar.gz"))
1810 (sha256
1811 (base32
675f1940
LC
1812 "0aizxdif5dpch9cvs8zz5g8ds5s4xhfnwza2il5ji7fv2h7ks7bd"))
1813 (modules '((guix build utils)))
1814 (snippet
1815 '(begin
1816 ;; Work around miscompilation on Guile 3.0.0 at -O2:
1817 ;; <https://bugs.gnu.org/39251>.
1818 (substitute* "src/md5.scm"
1819 (("\\(define f-ash ash\\)")
1820 "(define f-ash (@ (guile) ash))\n")
1821 (("\\(define f-add \\+\\)")
1822 "(define f-add (@ (guile) +))\n"))
1823 #t))))
0791437f
RW
1824 (build-system gnu-build-system)
1825 (arguments
1826 '(#:make-flags
1827 '("GUILE_AUTO_COMPILE=0") ; to prevent guild errors
1828 #:phases
1829 (modify-phases %standard-phases
1830 (add-before 'configure 'patch-module-dir
1831 (lambda _
1832 (substitute* "src/Makefile.in"
1833 (("^moddir = ([[:graph:]]+)")
1834 "moddir = $(datadir)/guile/site/@GUILE_EFFECTIVE_VERSION@\n")
1835 (("^godir = ([[:graph:]]+)")
1836 "godir = \
1837$(libdir)/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n"))
1838 #t)))))
1839 (native-inputs `(("pkg-config" ,pkg-config)))
1840 (inputs `(("guile" ,guile-2.2)))
1841 (home-page "https://www.nongnu.org/guile-lib/")
1842 (synopsis "Collection of useful Guile Scheme modules")
1843 (description
1844 "Guile-Lib is intended as an accumulation place for pure-scheme Guile
1845modules, allowing for people to cooperate integrating their generic Guile
1846modules into a coherent library. Think \"a down-scaled, limited-scope CPAN
1847for Guile\".")
1848
1849 ;; The whole is under GPLv3+, but some modules are under laxer
1850 ;; distribution terms such as LGPL and public domain. See `COPYING' for
1851 ;; details.
1852 (license license:gpl3+)))
1853
1854(define-public guile2.0-lib
1855 (package
1856 (inherit guile-lib)
1857 (name "guile2.0-lib")
1858 (inputs `(("guile" ,guile-2.0)))))
1859
675f1940
LC
1860(define-public guile3.0-lib
1861 (package
1862 (inherit guile-lib)
1863 (name "guile3.0-lib")
1864 (inputs `(("guile" ,guile-3.0)))))
1865
0791437f
RW
1866(define-public guile-minikanren
1867 (package
1868 (name "guile-minikanren")
1869 (version "20150424.e844d85")
1870 (source (origin
1871 (method git-fetch)
1872 (uri (git-reference
1873 (url "https://github.com/ijp/minikanren.git")
1874 (commit "e844d85512f8c055d3f96143ee506007389a25e3")))
1875 (file-name (string-append name "-" version "-checkout"))
1876 (sha256
1877 (base32
1878 "0r50jlpzi940jlmxyy3ddqqwmj5r12gb4bcv0ssini9v8km13xz6"))))
1879 (build-system guile-build-system)
1880 (native-inputs
1881 `(("guile" ,guile-2.2)))
1882 (home-page "https://github.com/ijp/minikanren")
1883 (synopsis "MiniKanren declarative logic system, packaged for Guile")
1884 (description
1885 "MiniKanren is a relational programming extension to the Scheme
1886programming Language, written as a smaller version of Kanren suitable for
1887pedagogical purposes. It is featured in the book, The Reasoned Schemer,
1888written by Dan Friedman, William Byrd, and Oleg Kiselyov.
1889
1890This is Ian Price's r6rs packaged version of miniKanren, which deviates
1891slightly from miniKanren mainline.
1892
1893See http://minikanren.org/ for more on miniKanren generally.")
1894 (license license:expat)))
1895
1896(define-public guile2.0-minikanren
1897 (package
1898 (inherit guile-minikanren)
1899 (name "guile2.0-minikanren")
1900 (native-inputs `(("guile" ,guile-2.0)))))
1901
89a99d53
LC
1902(define-public guile3.0-minikanren
1903 (package
1904 (inherit guile-minikanren)
1905 (name "guile3.0-minikanren")
1906 (native-inputs `(("guile" ,guile-next)))))
1907
0791437f
RW
1908(define-public guile-irregex
1909 (package
1910 (name "guile-irregex")
1911 (version "0.9.6")
1912 (source (origin
1913 (method url-fetch)
1914 (uri (string-append
1915 "http://synthcode.com/scheme/irregex/irregex-"
1916 version ".tar.gz"))
1917 (sha256
1918 (base32
1919 "1ia3m7dp3lcxa048q0gqbiwwsyvn99baw6xkhb4bhhzn4k7bwyqq"))))
1920 (build-system guile-build-system)
1921 (arguments
1922 '(#:phases (modify-phases %standard-phases
1923 (add-after 'unpack 'move-files-around
1924 (lambda _
1925 ;; Move the relevant source files to src/ and create the
1926 ;; rx/ directory to match the expected module hierarchy.
1927 (mkdir-p "src/rx/source")
1928 (rename-file "irregex-guile.scm"
1929 "src/rx/irregex.scm")
1930 (rename-file "irregex.scm"
1931 "src/rx/source/irregex.scm")
1932 ;; Not really reachable via guile's packaging system,
1933 ;; but nice to have around.
1934 (rename-file "irregex-utils.scm"
1935 "src/rx/source/irregex-utils.scm")
1936 #t)))
1937 #:source-directory "src"))
1938 (native-inputs
1939 `(("guile" ,guile-2.2)))
1940 (home-page "http://synthcode.com/scheme/irregex")
1941 (synopsis "S-expression based regular expressions")
1942 (description
1943 "Irregex is an s-expression based alternative to your classic
1944string-based regular expressions. It implements SRFI 115 and is deeply
1945inspired by the SCSH regular expression system.")
1946 (license license:bsd-3)))
1947
1948(define-public guile2.0-irregex
1949 (package
1950 (inherit guile-irregex)
1951 (name "guile2.0-irregex")
1952 (native-inputs `(("guile" ,guile-2.0)))))
1953
89a99d53
LC
1954(define-public guile3.0-irregex
1955 (package
1956 (inherit guile-irregex)
1957 (name "guile3.0-irregex")
1958 (native-inputs `(("guile" ,guile-next)))))
1959
0791437f
RW
1960(define-public haunt
1961 (package
1962 (name "haunt")
1963 (version "0.2.4")
1964 (source (origin
1965 (method url-fetch)
1966 (uri (string-append "https://files.dthompson.us/haunt/haunt-"
1967 version ".tar.gz"))
1968 (sha256
1969 (base32
93d94134
LC
1970 "056z4znikk83nr5mr0x2ac3iinqbywa2bvb37mhr566a1q50isfc"))
1971 (modules '((guix build utils)))
1972 (snippet
1973 '(begin
1974 ;; Allow builds with Guile 3.0.
1975 (substitute* "configure"
1976 (("2\\.2 2\\.0")
1977 "3.0 2.2 2.0"))
1978 #t))))
0791437f
RW
1979 (build-system gnu-build-system)
1980 (arguments
1981 `(#:modules ((ice-9 match) (ice-9 ftw)
1982 ,@%gnu-build-system-modules)
1983 #:tests? #f ; test suite is non-deterministic :(
1984 #:phases (modify-phases %standard-phases
1985 (add-after 'install 'wrap-haunt
1986 (lambda* (#:key inputs outputs #:allow-other-keys)
1987 ;; Wrap the 'haunt' command to refer to the right
1988 ;; modules.
1989 (let* ((out (assoc-ref outputs "out"))
1990 (bin (string-append out "/bin"))
1991 (site (string-append
1992 out "/share/guile/site"))
93d94134
LC
1993 (guile-reader (assoc-ref inputs "guile-reader"))
1994 (deps `(,@(if guile-reader
1995 (list guile-reader)
1996 '())
1997 ,(assoc-ref inputs "guile-commonmark"))))
0791437f
RW
1998 (match (scandir site)
1999 (("." ".." version)
2000 (let ((modules (string-append site "/" version))
2001 (compiled-modules (string-append
2002 out "/lib/guile/" version
2003 "/site-ccache")))
2004 (wrap-program (string-append bin "/haunt")
2005 `("GUILE_LOAD_PATH" ":" prefix
2006 (,modules
2007 ,@(map (lambda (dep)
2008 (string-append dep
2009 "/share/guile/site/"
2010 version))
2011 deps)))
2012 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
2013 (,compiled-modules
2014 ,@(map (lambda (dep)
2015 (string-append dep "/lib/guile/"
2016 version
2017 "/site-ccache"))
2018 deps))))
2019 #t)))))))))
2020 (native-inputs
2021 `(("pkg-config" ,pkg-config)
2022 ("texinfo" ,texinfo)))
2023 (inputs
2024 `(("guile" ,guile-2.2)))
2025 (propagated-inputs
2026 `(("guile-reader" ,guile-reader)
2027 ("guile-commonmark" ,guile-commonmark)))
2028 (synopsis "Functional static site generator")
2029 (description "Haunt is a static site generator written in Guile
2030Scheme. Haunt features a functional build system and an extensible
2031interface for reading articles in any format.")
2032 (home-page "http://haunt.dthompson.us")
2033 (license license:gpl3+)))
2034
93d94134
LC
2035(define-public guile3.0-haunt
2036 (package
2037 (inherit haunt)
2038 (name "guile3.0-haunt")
2039 (inputs `(("guile" ,guile-3.0)))
2040 (propagated-inputs
2041 ;; XXX: Guile-Reader is currently unavailable for Guile 3.0 so strip it.
2042 `(("guile-commonmark" ,guile3.0-commonmark)))))
2043
0791437f
RW
2044(define-public guile2.0-haunt
2045 (package
2046 (inherit haunt)
2047 (name "guile2.0-haunt")
2048 (inputs `(("guile" ,guile-2.0)))))
2049
0791437f
RW
2050(define-public guile-redis
2051 (package
2052 (name "guile-redis")
f57bf15c 2053 (version "1.3.0")
0791437f
RW
2054 (home-page "https://github.com/aconchillo/guile-redis")
2055 (source (origin
29fde3bf
EF
2056 (method git-fetch)
2057 (uri (git-reference
2058 (url home-page)
2059 (commit version)))
2060 (file-name (git-file-name name version))
0791437f
RW
2061 (sha256
2062 (base32
29fde3bf 2063 "14izs8daxh7pb7vwpxi5g427qa31137jkaxrb1cy5rpjkwchy723"))))
0791437f
RW
2064 (build-system gnu-build-system)
2065 (native-inputs
2066 `(("autoconf" ,autoconf)
2067 ("automake" ,automake)
2068 ("pkg-config" ,pkg-config)
2069 ("guile" ,guile-2.2)))
2070 (synopsis "Redis client library for Guile")
2071 (description "Guile-redis provides a Scheme interface to the Redis
2072key-value cache and store.")
2073 (license license:lgpl3+)))
2074
2075(define-public guile2.0-redis
2076 (package
2077 (inherit guile-redis)
2078 (name "guile2.0-redis")
2079 (native-inputs `(("guile" ,guile-2.0)
2080 ,@(alist-delete "guile"
2081 (package-native-inputs guile-redis))))))
2082
0791437f
RW
2083(define-public guile-commonmark
2084 (package
2085 (name "guile-commonmark")
b552e307 2086 (version "0.1.2")
0791437f
RW
2087 (source (origin
2088 (method url-fetch)
2089 (uri (string-append "https://github.com/OrangeShark/" name
2090 "/releases/download/v" version
2091 "/" name "-" version ".tar.gz"))
2092 (sha256
2093 (base32
1fa34232
LC
2094 "17lrsdisa3kckh24q114vfmzdc4wkqa6ccwl4hdlrng5wpn1iman"))
2095 (modules '((guix build utils)))
2096 (snippet
2097 '(begin
2098 ;; Allow builds with Guile 3.0.
2099 (substitute* "configure"
2100 (("2\\.2 2\\.0")
2101 "3.0 2.2 2.0"))
2102 #t))))
0791437f
RW
2103 (build-system gnu-build-system)
2104 (inputs
2105 `(("guile" ,guile-2.2)))
2106 (native-inputs
2107 `(("pkg-config" ,pkg-config)))
2108 (synopsis "CommonMark parser for Guile")
2109 (description
2110 "guile-commonmark is a library for parsing CommonMark, a fully specified
2111variant of Markdown. The library is written in Guile Scheme and is designed
2112to transform a CommonMark document to SXML. guile-commonmark tries to closely
2113follow the @uref{http://commonmark.org/, CommonMark spec}, the main difference
2114is no support for parsing block and inline level HTML.")
2115 (home-page "https://github.com/OrangeShark/guile-commonmark")
2116 (license license:lgpl3+)))
2117
1fa34232
LC
2118(define-public guile3.0-commonmark
2119 (package
2120 (inherit guile-commonmark)
2121 (name "guile3.0-commonmark")
2122 (inputs `(("guile" ,guile-3.0)))))
2123
0791437f
RW
2124(define-public guile2.0-commonmark
2125 (package
2126 (inherit guile-commonmark)
2127 (name "guile2.0-commonmark")
2128 (inputs `(("guile" ,guile-2.0)))))
2129
0791437f
RW
2130(define-public mcron
2131 (package
2132 (name "mcron")
30ebff69 2133 (version "1.1.3")
0791437f
RW
2134 (source (origin
2135 (method url-fetch)
2136 (uri (string-append "mirror://gnu/mcron/mcron-"
2137 version ".tar.gz"))
2138 (sha256
2139 (base32
30ebff69 2140 "00kv7fgllzjpis0g1m9csycp4f6l11774m09dqy255cvmim2g743"))))
0791437f
RW
2141 (build-system gnu-build-system)
2142 (arguments
2143 '(#:phases (modify-phases %standard-phases
30ebff69
EF
2144 (add-after 'unpack 'fix-finding-guile
2145 (lambda _
2146 (substitute* "configure"
3de0d20b 2147 (("2\\.0") "3.0 2.2 2.0"))
30ebff69 2148 #t))
0791437f
RW
2149 (add-before 'check 'adjust-tests
2150 (lambda _
2151 (substitute* "tests/job-specifier.scm"
2152 ;; (getpw) fails with "entry not found" in the build
2153 ;; environment, so pass an argument.
2154 (("\\(getpw\\)")
2155 "(getpwnam (getuid))")
2156 ;; The build environment lacks an entry for root in
2157 ;; /etc/passwd.
2158 (("\\(getpw 0\\)")
2159 "(getpwnam \"nobody\")")
2160
2161 ;; FIXME: Skip the 4 faulty tests (see above).
2162 (("\\(test-equal \"next-year\"" all)
2163 (string-append "(test-skip 4)\n" all)))
2164 #t)))))
30ebff69 2165 (native-inputs `(("pkg-config" ,pkg-config)
0791437f 2166 ("tzdata" ,tzdata-for-tests)))
f61f424d 2167 (inputs `(("guile" ,guile-2.2)))
0791437f
RW
2168 (home-page "https://www.gnu.org/software/mcron/")
2169 (synopsis "Run jobs at scheduled times")
2170 (description
2171 "GNU Mcron is a complete replacement for Vixie cron. It is used to run
2172tasks on a schedule, such as every hour or every Monday. Mcron is written in
2173Guile, so its configuration can be written in Scheme; the original cron
2174format is also supported.")
2175 (license license:gpl3+)))
2176
3de0d20b
LC
2177(define-public guile3.0-mcron
2178 (package
2179 (inherit mcron)
2180 (name "guile3.0-mcron")
2181 (inputs `(("guile" ,guile-3.0)))))
2182
0791437f
RW
2183(define-public mcron2
2184 ;; This was mthl's mcron development branch, and it became mcron 1.1.
2185 (deprecated-package "mcron2" mcron))
6bb5f88e
RW
2186
2187(define-public guile-picture-language
d1a3a8e1
RW
2188 (let ((commit "91d10c96708d732145006dd2802acc4de08b632e")
2189 (revision "1"))
6bb5f88e
RW
2190 (package
2191 (name "guile-picture-language")
d1a3a8e1 2192 (version (git-version "0.0.1" revision commit))
6bb5f88e
RW
2193 (source (origin
2194 (method git-fetch)
2195 (uri (git-reference
2196 (url "https://git.elephly.net/software/guile-picture-language.git")
2197 (commit commit)))
f1d4d79f 2198 (file-name (git-file-name name version))
6bb5f88e
RW
2199 (sha256
2200 (base32
d1a3a8e1
RW
2201 "1ydvw9dvssdvlvhh1dr8inyzy2x6m41qgp8hsivca1xysr4gc23a"))))
2202 (build-system gnu-build-system)
6bb5f88e
RW
2203 (inputs
2204 `(("guile" ,guile-2.2)))
d1a3a8e1
RW
2205 (native-inputs
2206 `(("autoconf" ,autoconf)
2207 ("automake" ,automake)
2208 ("imagemagick" ,imagemagick)
2209 ("pkg-config" ,pkg-config)
2210 ("texinfo" ,texinfo)))
6bb5f88e
RW
2211 (home-page "https://git.elephly.net/software/guile-picture-language.git")
2212 (synopsis "Picture language for Guile")
2213 (description
2214 "This package provides a simple SVG-based picture language for Guile.
2215The picture values can directly be displayed in Geiser.")
2216 (license license:lgpl3+))))
5531782d 2217
4f408684
LC
2218(define-public guile3.0-picture-language
2219 (package
2220 (inherit guile-picture-language)
2221 (name "guile3.0-picture-language")
2222 (inputs `(("guile" ,guile-3.0)))))
2223
5531782d 2224(define-public guile-studio
223236f6
RW
2225 (package
2226 (name "guile-studio")
2227 (version "0.0.2")
2228 (source (origin
2229 (method git-fetch)
2230 (uri (git-reference
2231 (url "https://git.elephly.net/software/guile-studio.git")
2232 (commit version)))
2233 (file-name (git-file-name name version))
2234 (sha256
2235 (base32
2236 "10ls4ra148hd9ra7sin4kh9vv0am5pwk48p7dsjhrlg2l1hsh4hi"))))
2237 (build-system gnu-build-system)
2238 (arguments
2239 `(#:modules
2240 ((ice-9 match)
2241 (srfi srfi-1)
2242 ,@%gnu-build-system-modules)
2243 #:tests? #f ; there are none
2244 #:make-flags
2245 (list (string-append "ICONS_DIR="
2246 (assoc-ref %build-inputs "adwaita-icon-theme")
2247 "/share/icons/Adwaita/")
2248 (string-append "PICT_DIR="
2249 (assoc-ref %build-inputs "guile-picture-language"))
2250 (string-append "EMACS_DIR="
2251 (assoc-ref %build-inputs "emacs"))
2252 (string-append "GUILE_DIR="
2253 (assoc-ref %build-inputs "guile"))
2254 (string-join (cons "INPUTS="
2255 (filter-map
2256 (lambda (input)
2257 (match input
2258 ((label . pkg)
2259 (and (string-prefix? "emacs" label) pkg))))
2260 %build-inputs)))
2261 (string-append "PREFIX=" (assoc-ref %outputs "out")))
2262 #:phases
2263 (modify-phases %standard-phases
2264 (delete 'configure)
2265 (delete 'install))))
2266 (inputs
2267 `(("guile" ,guile-2.2)
2268 ("guile-picture-language" ,guile-picture-language)
2269 ("emacs" ,emacs)
2270 ("emacs-geiser" ,emacs-geiser)
2271 ("emacs-company" ,emacs-company)
2272 ("emacs-flycheck" ,emacs-flycheck)
2273 ("emacs-smart-mode-line" ,emacs-smart-mode-line)
2274 ("emacs-paren-face" ,emacs-paren-face)
2275 ("adwaita-icon-theme" ,adwaita-icon-theme)))
2276 (native-inputs
2277 `(("texinfo" ,texinfo)))
2278 (home-page "https://gnu.org/software/guile")
2279 (synopsis "IDE for Guile")
2280 (description
2281 "This is Emacs with a few settings that make working with Guile easier
5531782d
RW
2282for people new to Emacs. Features include: CUA mode, Geiser, tool bar icons
2283to evaluate Guile buffers, support for Guile's very own picture language, code
2284completion, a simple mode line, etc.")
223236f6 2285 (license license:gpl3+)))
9f8698ad
RW
2286
2287(define-public guile-stis-parser
2288 (let ((commit "6e85d37ffc333b722f4413a6c648263701eb75bd")
2289 (revision "1"))
2290 (package
2291 (name "guile-stis-parser")
2292 (version (git-version "0" revision commit))
2293 (source (origin
2294 (method git-fetch)
2295 (uri (git-reference
2296 (url "https://gitlab.com/tampe/stis-parser")
2297 (commit commit)))
29e76f07 2298 (file-name (git-file-name name version))
9f8698ad
RW
2299 (sha256
2300 (base32
2301 "0v4hvq7rlpbra1ni73lf8k6sdmjlflr50yi3p1f24g85h77pc7c0"))))
2302 (build-system gnu-build-system)
2303 (arguments
2304 `(#:parallel-build? #f ; not supported
2305 #:phases
2306 (modify-phases %standard-phases
2307 (add-after 'unpack 'chdir
2308 (lambda _ (chdir "modules") #t))
8318b3ed
RW
2309 (add-after 'chdir 'use-canonical-directory-for-go-files
2310 (lambda _
2311 (substitute* "Makefile.am"
2312 (("/ccache") "/site-ccache"))
2313 #t))
9f8698ad
RW
2314 (add-after 'chdir 'delete-broken-symlink
2315 (lambda _
2316 (delete-file "parser/stis-parser/lang/.#calc.scm")
2317 #t)))))
2318 (inputs
2319 `(("guile" ,guile-2.2)))
2320 (native-inputs
2321 `(("autoconf" ,autoconf)
2322 ("automake" ,automake)
2323 ("pkg-config" ,pkg-config)))
2324 (home-page "https://gitlab.com/tampe/stis-parser")
2325 (synopsis "Parser combinator framework")
2326 (description
2327 "This package provides a functional parser combinator library that
2328supports backtracking and a small logical framework. The idea is to build up
2329chunks that are memoized and there is no clear scanner/parser separation,
2330chunks can be expressions as well as simple tokens.")
2331 (license license:lgpl2.0+))))
12d73f9c
RW
2332
2333(define-public guile-persist
2334 (let ((commit "b14927b0368af51c024560aee5f55724aee35233")
2335 (revision "1"))
2336 (package
2337 (name "guile-persist")
2338 (version (git-version "0" revision commit))
2339 (source (origin
2340 (method git-fetch)
2341 (uri (git-reference
2342 (url "https://gitlab.com/tampe/guile-persist")
2343 (commit commit)))
2344 (file-name (git-file-name name version))
2345 (sha256
2346 (base32
85a411bc
LC
2347 "0z5nf377wh8yj6n3sx2ddn4bdx1qrqnw899dlqjhg0q69qzil522"))
2348 (modules '((guix build utils)))
2349 (snippet
2350 '(begin
2351 ;; Install .go files in the right place.
2352 (substitute* "Makefile.am"
2353 (("/ccache") "/site-ccache"))
2354 #t))))
12d73f9c
RW
2355 (build-system gnu-build-system)
2356 (arguments
2357 `(#:phases
2358 (modify-phases %standard-phases
2359 (add-after 'unpack 'patch-prefix
2360 (lambda* (#:key inputs outputs #:allow-other-keys)
2361 (substitute* "src/Makefile.am"
2362 (("/usr/local/lib/guile")
2363 (string-append (assoc-ref outputs "out") "/lib/guile"))
2364 (("/usr/local/include/guile")
2365 (string-append (assoc-ref inputs "guile") "/include/guile"))
2366 (("-L/usr/local/lib")
8f052528
RW
2367 (string-append "-L" (assoc-ref inputs "guile") "/lib"))
2368 ;; Use canonical directory for go files.
2369 (("/ccache") "/site-ccache"))
12d73f9c
RW
2370 #t))
2371 (add-after 'unpack 'patch-library-reference
2372 (lambda* (#:key outputs #:allow-other-keys)
2373 (let ((out (assoc-ref outputs "out")))
2374 (substitute* "persist/persistance.scm"
2375 (("\"libguile-persist\"")
2376 (format #f "\"~a/lib/guile/2.2/extensions/libguile-persist\"" out)))
2377 #t))))))
2378 (inputs
2379 `(("guile" ,guile-2.2)))
2380 (native-inputs
2381 `(("autoconf" ,autoconf)
2382 ("automake" ,automake)
2383 ("libtool" ,libtool)
2384 ("pkg-config" ,pkg-config)))
2385 (home-page "https://gitlab.com/tampe/guile-persist")
028053f2 2386 (synopsis "Persistence programming framework for Guile")
12d73f9c
RW
2387 (description
2388 "This is a serialization library for serializing objects like classes
2389and objects, closures and structs. This currently does not support
2390serializing continuations or delimited continuations.")
2391 (license license:lgpl2.0+))))
6d37301b
RW
2392
2393(define-public python-on-guile
5d5edb88
LC
2394 (let ((commit "00a51a23247f1edc4ae8eda72b30df5cd7d0015f")
2395 (revision "3"))
6d37301b
RW
2396 (package
2397 (name "python-on-guile")
2398 (version (git-version "0.1.0" revision commit))
2399 (source (origin
2400 (method git-fetch)
2401 (uri (git-reference
4088ae42 2402 (url "https://git.elephly.net/software/python-on-guile.git")
6d37301b
RW
2403 (commit commit)))
2404 (file-name (git-file-name name version))
2405 (sha256
2406 (base32
5d5edb88 2407 "03rpnqr08rqr3gay128g564rwk8w4jbj28ss6b46z1d4vjs4nk68"))))
6d37301b
RW
2408 (build-system gnu-build-system)
2409 (arguments
2410 `(#:parallel-build? #f ; not supported
83817158
LC
2411 #:make-flags '("GUILE_AUTO_COMPILE=0") ;to prevent guild warnings
2412
6d37301b
RW
2413 #:phases
2414 (modify-phases %standard-phases
2415 (add-after 'unpack 'chdir
83817158
LC
2416 (lambda _ (chdir "modules") #t))
2417 (add-after 'install 'wrap
2418 (lambda* (#:key outputs #:allow-other-keys)
2419 ;; Wrap the 'python' executable so it can find its
2420 ;; dependencies.
2421 (let ((out (assoc-ref outputs "out")))
2422 (wrap-program (string-append out "/bin/python")
2423 `("GUILE_LOAD_PATH" ":" prefix
2424 (,(getenv "GUILE_LOAD_PATH")))
2425 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
2426 (,(getenv "GUILE_LOAD_COMPILED_PATH"))))
2427 #t))))))
6d37301b
RW
2428 (inputs
2429 `(("guile" ,guile-2.2)))
2430 (propagated-inputs
2431 `(("guile-persist" ,guile-persist)
2432 ("guile-readline" ,guile-readline)
2433 ("guile-stis-parser" ,guile-stis-parser)))
2434 (native-inputs
2435 `(("autoconf" ,autoconf)
2436 ("automake" ,automake)
2437 ("libtool" ,libtool)
2438 ("pkg-config" ,pkg-config)))
2439 (home-page "https://gitlab.com/python-on-guile/python-on-guile/")
2440 (synopsis "Python implementation in Guile")
2441 (description
2442 "This package allows you to compile a Guile Python file to any target
2443from @code{tree-il}.")
2444 (license license:lgpl2.0+))))
b97b4624
RW
2445
2446(define-public guile-file-names
2447 (package
2448 (name "guile-file-names")
72a0706f 2449 (version "0.3")
b97b4624
RW
2450 (source (origin
2451 (method url-fetch)
2452 (uri (string-append "http://brandon.invergo.net/software/download/"
2453 "guile-file-names/guile-file-names-"
2454 version ".tar.gz"))
2455 (sha256
2456 (base32
72a0706f 2457 "01chizdxkhw6aqv629vxka9f5x3534ij7r0jqndawsg2vxm1r9sz"))))
b97b4624
RW
2458 (build-system gnu-build-system)
2459 (arguments
2460 `(#:phases
2461 (modify-phases %standard-phases
481eca80 2462 (add-after 'unpack 'fix-target-directory
b97b4624 2463 (lambda _
481eca80 2464 (substitute* "src/Makefile.in"
b97b4624
RW
2465 (("guilemoddir = \\$\\(GUILE_SITE\\)")
2466 "guilemoddir = $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
2467 #t)))))
2468 (inputs
2469 `(("guile" ,guile-2.2)))
2470 (native-inputs
2471 `(("pkg-config" ,pkg-config)))
2472 (home-page "https://gitlab.com/brandoninvergo/guile-file-names")
2473 (synopsis "Manipulate file names")
2474 (description
2475 "The @code{(file-names)} module provides tools for manipulating file
2476names. The module was built on the idea that doing anything more than a
2477non-trivial modification of a file name string is a pain (making sure all
2478slashes are present and accounted for, resolving @code{.} and @code{..}, etc).
2479Inevitably, you have to break the string up into chunks and operate on that
2480list of components. This module takes care of that for you.")
2481 (license license:lgpl3+)))
bdf2dd79
JN
2482
2483(define-public guile-gi
bb6c8f20
RW
2484 (package
2485 (name "guile-gi")
195e1c1b 2486 (version "0.2.2")
bb6c8f20
RW
2487 (source (origin
2488 (method url-fetch)
2489 (uri (string-append "http://lonelycactus.com/tarball/guile_gi-"
2490 version ".tar.gz"))
2491 (sha256
2492 (base32
195e1c1b 2493 "1v82kz8mz7wgq6w5llaz8a2wwdnl8vk2667dpjwjxscl0qyxsy6y"))))
bb6c8f20
RW
2494 (build-system gnu-build-system)
2495 (arguments
b5d4d5b9
RW
2496 `(#:configure-flags '("--with-gnu-filesystem-hierarchy")
2497 #:phases
2498 (modify-phases %standard-phases
2499 (add-before 'check 'start-xorg-server
2500 (lambda* (#:key inputs #:allow-other-keys)
2501 ;; The init_check test requires a running X server.
2502 (system (format #f "~a/bin/Xvfb :1 &"
2503 (assoc-ref inputs "xorg-server")))
2504 (setenv "DISPLAY" ":1")
2505 #t)))))
bb6c8f20
RW
2506 (native-inputs
2507 `(("gettext" ,gnu-gettext)
6153fa0a 2508 ("glib:bin" ,glib "bin") ; for glib-compile-resources
bb6c8f20 2509 ("libtool" ,libtool)
b5d4d5b9
RW
2510 ("pkg-config" ,pkg-config)
2511 ("xorg-server" ,xorg-server)))
bb6c8f20
RW
2512 (propagated-inputs
2513 `(("glib" ,glib)
2514 ("gobject-introspection" ,gobject-introspection)
2515 ("gssettings-desktop-schemas" ,gsettings-desktop-schemas)
2516 ("gtk+" ,gtk+)
2517 ("guile-lib" ,guile-lib)
2518 ("webkitgtk" ,webkitgtk)))
2519 (inputs `(("guile" ,guile-2.2)))
2520 (home-page "https://github.com/spk121/guile-gi")
2521 (synopsis "GObject bindings for Guile")
2522 (description
2523 "Guile-GI is a library for Guile that allows using GObject-based
bdf2dd79
JN
2524libraries, such as GTK+3. Its README comes with the disclaimer: This is
2525pre-alpha code.")
bb6c8f20 2526 (license license:gpl3+)))
dec4b3aa 2527
bfb51f5e
RW
2528(define-public guile3.0-gi
2529 (package
2530 (inherit guile-gi)
2531 (name "guile3.0-gi")
2532 (native-inputs
2533 `(("guile" ,guile-3.0)
2534 ,@(package-native-inputs guile-gi)))))
2535
dec4b3aa
LC
2536(define-public guile-srfi-159
2537 (let ((commit "1bd98abda2ae4ef8f36761a167903e55c6bda7bb")
2538 (revision "0"))
2539 (package
2540 (name "guile-srfi-159")
2541 (version (git-version "0" revision commit))
2542 (home-page "https://bitbucket.org/bjoli/guile-srfi-159")
2543 (source (origin
2544 (method hg-fetch)
2545 (uri (hg-reference (changeset commit)
2546 (url home-page)))
2547 (sha256
2548 (base32
2549 "1zw6cmcy7xdbfiz3nz9arqnn7l2daidaps6ixkcrc9b6k51fdv3p"))
2550 (file-name (git-file-name name version))))
2551 (build-system guile-build-system)
2552 (arguments
2553 ;; The *-impl.scm files are actually included from module files; they
2554 ;; should not be compiled separately, but they must be installed.
2555 '(#:not-compiled-file-regexp "-impl\\.scm$"))
2556 (inputs
2557 `(("guile" ,guile-2.2)))
2558 (synopsis "Formatting combinators for Guile")
2559 (description
2560 "The @code{(srfi-159)} module and its sub-modules implement the
2561formatting combinators specified by
2562@uref{https://srfi.schemers.org/srfi-159/srfi-159.html, SRFI-159}. These are
2563more expressive and flexible than the traditional @code{format} procedure.")
2564 (license license:bsd-3))))
f0de9544
JN
2565
2566(define-public emacsy
48eb71ae
JN
2567 (package
2568 (name "emacsy")
2569 (version "0.4.1")
2570 (source (origin
2571 (method url-fetch)
2572 (uri (string-append
2573 "https://download.savannah.nongnu.org/releases/"
2574 name "/" name "-" version ".tar.gz"))
2575 (sha256
2576 (base32
2577 "1cpb85dl1nibd34c2x2h7vfmjpkgh353p5b1w20v6cs6gmvgg4np"))))
2578 (build-system gnu-build-system)
2579 (native-inputs
2580 `(("autoconf" ,autoconf)
2581 ("automake" ,automake)
2582 ("bzip2" ,bzip2)
2583 ("guile" ,guile-2.2)
2584 ("gettext" ,gnu-gettext)
2585 ("libtool" ,libtool)
2586 ("perl" ,perl)
2587 ("pkg-config" ,pkg-config)
2588 ("texinfo" ,texinfo)
1aa026aa 2589 ("texlive" ,(texlive-union (list texlive-generic-epsf)))))
114f02ba 2590 (inputs
48eb71ae
JN
2591 `(("dbus-glib" ,dbus-glib)
2592 ("guile" ,guile-2.2)
2593 ("guile-lib" ,guile-lib)
2594 ("guile-readline" ,guile-readline)
48eb71ae 2595 ("freeglut" ,freeglut)
48eb71ae 2596 ("webkitgtk" ,webkitgtk)))
114f02ba
AS
2597 (propagated-inputs
2598 `(("glib-networking" ,glib-networking)
2599 ("gssettings-desktop-schemas" ,gsettings-desktop-schemas)))
48eb71ae 2600 (arguments
114f02ba
AS
2601 `(#:modules ((guix build gnu-build-system)
2602 (guix build utils)
2603 (ice-9 popen)
2604 (ice-9 rdelim)
2605 (ice-9 regex)
2606 (ice-9 ftw)
2607 (srfi srfi-26))
2608 #:phases
48eb71ae
JN
2609 (modify-phases %standard-phases
2610 (add-before 'configure 'setenv
2611 (lambda _
2612 (setenv "GUILE_AUTO_COMPILE" "0")
114f02ba
AS
2613 #t))
2614 (add-after 'install 'wrap-binaries
2615 (lambda* (#:key inputs outputs #:allow-other-keys)
2616 (let* ((out (assoc-ref outputs "out"))
2617 (effective (read-line
2618 (open-pipe* OPEN_READ
2619 "guile" "-c"
2620 "(display (effective-version))")))
2621 (deps (map (cut assoc-ref inputs <>)
2622 '("guile-lib" "guile-readline")))
2623 (scm-path (map (cut string-append <> "/share/guile/site/"
2624 effective) `(,out ,@deps)))
2625 (go-path (map (cut string-append <> "/lib/guile/" effective
2626 "/site-ccache/") `(,out ,@deps)))
2627 (examples (filter (cut string-match "emacsy" <>)
2628 (scandir (string-append out "/bin/"))))
2629 (progs (map (cut string-append out "/bin/" <>)
2630 examples)))
2631 (map (cut wrap-program <>
2632 `("GUILE_LOAD_PATH" ":" prefix ,scm-path)
2633 `("GUILE_LOAD_COMPILED_PATH" ":" prefix ,go-path))
2634 progs)
2635 #t))))))
48eb71ae
JN
2636 (home-page "https://savannah.nongnu.org/projects/emacsy")
2637 (synopsis "Embeddable GNU Emacs-like library using Guile")
2638 (description
2639 "Emacsy is an embeddable Emacs-like library that uses GNU Guile
f0de9544
JN
2640as extension language. Emacsy can give a C program an Emacsy feel with
2641keymaps, minibuffer, recordable macros, history, tab completion, major
2642and minor modes, etc., and can also be used as a pure Guile library. It
48eb71ae
JN
2643comes with a simple counter example using FreeGLUT and browser examples
2644in C using Gtk+-3 and WebKitGtk.")
2645 (license license:gpl3+)))
2135610c 2646
c99f32b9
AS
2647(define-public emacsy-minimal
2648 (let ((commit "f3bf0dbd803d7805b6ae8303253507ad13922293"))
2649 (package
2650 (inherit emacsy)
2651 (name "emacsy-minimal")
2652 (version (git-version "v0.4.1" "19" commit))
2653 (source (origin
2654 (method git-fetch)
2655 (uri (git-reference
2656 (url "https://git.savannah.gnu.org/git/emacsy.git")
2657 (commit commit)))
2658 (file-name (git-file-name name version))
2659 (sha256
2660 (base32
2661 "0ivy28km1p7nlrf63xx3hvrpxf5ld5amk1wcan3k7sqv1kq9mqdb"))))
2662 (build-system gnu-build-system)
2663 (inputs
2664 `(("guile" ,guile-2.2)
2665 ("guile-lib" ,guile-lib)
2666 ("guile-readline" ,guile-readline)))
2667 (propagated-inputs '())
2668 (arguments
2669 `(#:configure-flags '("--without-examples")
2670 #:phases
2671 (modify-phases %standard-phases
2672 (add-before 'configure 'setenv
2673 (lambda _
2674 (setenv "GUILE_AUTO_COMPILE" "0")
2675 #t))))))))
2676
2135610c
LC
2677(define-public guile-jpeg
2678 (let ((commit "6a1673578b297c2c1b28e44a76bd5c49e76a5046")
2679 (revision "0"))
2680 (package
2681 (name "guile-jpeg")
2682 (version (git-version "0.0" revision commit))
2683 (home-page "https://gitlab.com/wingo/guile-jpeg")
2684 (source (origin
2685 (method git-fetch)
2686 (uri (git-reference (url home-page)
2687 (commit commit)))
2688 (sha256
2689 (base32
2690 "05z9m408w3h6aqb5k3r3qa7khir0k10rxwvsrzhkcq1hr5vbmr4m"))
2691 (file-name (git-file-name name version))
2692 (modules '((guix build utils)))
2693 (snippet
2694 '(begin
2695 ;; Install .go files in the right place.
2696 (substitute* "Makefile.am"
2697 (("/ccache") "/site-ccache"))
2698 #t))))
2699 (build-system gnu-build-system)
2700 (native-inputs
2701 `(("autoconf" ,autoconf)
2702 ("automake" ,automake)
2703 ("pkg-config" ,pkg-config)
2704 ("guile" ,guile-2.2)))
2705 (synopsis "JPEG file parsing library for Guile")
2706 (description
2707 "Guile-JPEG is a Scheme library to parse JPEG image files and to
2708perform geometrical transforms on JPEG images.")
2709 (license license:gpl3+))))
e8c2da41
AS
2710
2711(define-public nomad
2712 (package
2713 (name "nomad")
5f1553ce 2714 (version "0.1.2-alpha")
e8c2da41
AS
2715 (source (origin
2716 (method git-fetch)
2717 (uri (git-reference
2718 (url "https://git.savannah.gnu.org/git/nomad.git")
2719 (commit version)))
2720 (file-name (git-file-name name version))
2721 (sha256
2722 (base32
5f1553ce 2723 "1dnkr1hmvfkwgxd75dcf93pg39yfgawvdpzdhv991yhghv0qxc9h"))))
e8c2da41
AS
2724 (build-system gnu-build-system)
2725 (native-inputs
2726 `(("autoconf" ,autoconf)
2727 ("automake" ,automake)
2728 ("bash" ,bash)
2729 ("pkg-config" ,pkg-config)
2730 ("libtool" ,libtool)
2731 ("guile" ,guile-2.2)
5f1553ce
AS
2732 ("glib:bin" ,glib "bin")
2733 ("texinfo" ,texinfo)
2734 ("perl" ,perl)))
e8c2da41
AS
2735 (inputs
2736 `(("guile" ,guile-2.2)
2737 ("guile-lib" ,guile-lib)
2738 ("guile-gcrypt" ,guile-gcrypt)
2739 ("guile-readline" ,guile-readline)
2740 ("gnutls" ,gnutls)
2741 ("shroud" ,shroud)
2742 ("emacsy" ,emacsy-minimal)
2743 ("glib" ,glib)
2744 ("dbus-glib" ,dbus-glib)
2745 ("gtk+" ,gtk+)
2746 ("gtksourceview" ,gtksourceview)
2747 ("webkitgtk" ,webkitgtk)
2748 ("xorg-server" ,xorg-server)))
2749 (propagated-inputs
2750 `(("glib" ,glib)
2751 ("glib-networking" ,glib-networking)
2752 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)))
2753 (arguments
2754 `(#:modules ((guix build gnu-build-system)
2755 (guix build utils)
2756 (ice-9 popen)
2757 (ice-9 rdelim)
2758 (srfi srfi-26))
2759 #:phases
2760 (modify-phases %standard-phases
2761 (add-before 'check 'start-xorg-server
2762 (lambda* (#:key inputs #:allow-other-keys)
2763 ;; The test suite requires a running X server.
2764 (system (format #f "~a/bin/Xvfb :1 &"
2765 (assoc-ref inputs "xorg-server")))
2766 (setenv "DISPLAY" ":1")
2767 #t))
2768 (add-after 'install 'wrap-binaries
2769 (lambda* (#:key inputs outputs #:allow-other-keys)
2770 (let* ((out (assoc-ref outputs "out"))
2771 (gio-deps (map (cut assoc-ref inputs <>) '("glib-networking"
2772 "glib")))
2773 (gio-mod-path (map (cut string-append <> "/lib/gio/modules")
2774 gio-deps))
2775 (effective (read-line (open-pipe*
2776 OPEN_READ
2777 "guile" "-c"
2778 "(display (effective-version))")))
2779 (deps (map (cut assoc-ref inputs <>)
2780 '("emacsy" "guile-lib" "guile-readline"
2781 "shroud")))
2782 (scm-path (map (cut string-append <>
2783 "/share/guile/site/" effective)
2784 `(,out ,@deps)))
2785 (go-path (map (cut string-append <>
2786 "/lib/guile/" effective "/site-ccache")
2787 `(,out ,@deps)))
2788 (progs (map (cut string-append out "/bin/" <>)
2789 '("nomad"))))
2790 (map (cut wrap-program <>
2791 `("GIO_EXTRA_MODULES" ":" prefix ,gio-mod-path)
2792 `("GUILE_LOAD_PATH" ":" prefix ,scm-path)
2793 `("GUILE_LOAD_COMPILED_PATH" ":"
2794 prefix ,go-path))
2795 progs)
2796 #t))))))
2797 (home-page "https://savannah.nongnu.org/projects/nomad/")
2798 (synopsis "Extensible Web Browser in Guile Scheme")
2799 (description "Nomad is an Emacs-like Web Browser built using Webkitgtk and
2800Emacsy. It has a small C layer and most browser features are fully
2801programmable in Guile. It has hooks, keymaps, and self documentation
2802features.")
2803 (license license:gpl3+)))
248965c9
RW
2804
2805(define-public guile-cv
2806 (package
2807 (name "guile-cv")
2808 (version "0.2.1")
2809 (source (origin
2810 (method url-fetch)
2811 (uri (string-append "mirror://gnu/guile-cv/guile-cv-"
2812 version ".tar.gz"))
2813 (sha256
2814 (base32
2815 "0qdf0s2h1xj5lbhnc1pfw69i3zg08pqy2y6869b92ydfis8r82j9"))))
2816 (build-system gnu-build-system)
2817 (arguments
2818 `(#:phases
2819 (modify-phases %standard-phases
2820 (add-after 'unpack 'prepare-build
2821 (lambda* (#:key inputs outputs #:allow-other-keys)
2822 (substitute* "configure"
2823 (("SITEDIR=\"\\$datadir/guile-cv\"")
2824 "SITEDIR=\"$datadir/guile/site/$GUILE_EFFECTIVE_VERSION\"")
2825 (("SITECCACHEDIR=\"\\$libdir/guile-cv/")
2826 "SITECCACHEDIR=\"$libdir/"))
2827 (substitute* "cv/init.scm"
2828 (("\\(dynamic-link \"libvigra_c\"\\)")
2829 (string-append "(dynamic-link \""
2830 (assoc-ref inputs "vigra-c")
2831 "/lib/libvigra_c\")"))
2832 (("\\(dynamic-link \"libguile-cv\"\\)")
2833 (format #f "~s"
2834 `(dynamic-link
2835 (format #f "~alibguile-cv"
2836 (if (getenv "GUILE_CV_UNINSTALLED")
2837 ""
2838 ,(format #f "~a/lib/"
2839 (assoc-ref outputs "out"))))))))
2840 (setenv "GUILE_CV_UNINSTALLED" "1")
2841 ;; Only needed to satisfy the configure script.
2842 (setenv "LD_LIBRARY_PATH"
2843 (string-append (assoc-ref inputs "vigra-c") "/lib"))
2844 #t)))))
2845 (inputs
2846 `(("vigra" ,vigra)
2847 ("vigra-c" ,vigra-c)
2848 ("guile" ,guile-2.2)))
2849 (native-inputs
2850 `(("texlive" ,(texlive-union (list texlive-booktabs
2851 texlive-lm
2852 texlive-siunitx
2853 texlive-standalone
2854 texlive-xcolor
2855 texlive-fonts-iwona)))
2856 ("pkg-config" ,pkg-config)))
2857 (propagated-inputs
2858 `(("guile-lib" ,guile-lib)))
2859 (home-page "https://www.gnu.org/software/guile-cv/")
2860 (synopsis "Computer vision library for Guile")
2861 (description "Guile-CV is a Computer Vision functional programming library
2862for the Guile Scheme language. It is based on Vigra (Vision with Generic
2863Algorithms), a C++ image processing and analysis library. Guile-CV contains
2864bindings to Vigra C (a C wrapper to most of the Vigra functionality) and is
2865enriched with pure Guile Scheme algorithms, all accessible through a nice,
2866clean and easy to use high level API.")
2867 (license license:gpl3+)))
7ff157c1
RW
2868
2869(define-public guile-ffi-fftw
353fb48f
RW
2870 (let ((commit "294ad9e7491dcb40026d2fec9be2af05263be1c0")
2871 (revision "2"))
7ff157c1
RW
2872 (package
2873 (name "guile-ffi-fftw")
2874 (version (git-version "0" revision commit))
2875 (source (origin
2876 (method git-fetch)
2877 (uri (git-reference
2878 (url "https://github.com/lloda/guile-ffi-fftw.git")
2879 (commit commit)))
2880 (file-name (git-file-name "guile-ffi-fftw" version))
2881 (sha256
2882 (base32
353fb48f 2883 "08j40a5p6a8pgvhffmzb5rfdnrav2mksy3gfjkdqy93jfj1z5afg"))))
7ff157c1
RW
2884 (build-system guile-build-system)
2885 (arguments
2886 `(#:source-directory "mod"
2887 #:phases
2888 (modify-phases %standard-phases
2889 (add-after 'unpack 'prepare-build
2890 (lambda* (#:key inputs #:allow-other-keys)
2891 (substitute* "mod/ffi/fftw.scm"
2892 (("\\(getenv \"GUILE_FFI_FFTW_LIBFFTW3_PATH\"\\)")
2893 (format #f "\"~a/lib\"" (assoc-ref inputs "fftw"))))
2894 #t))
2895 (add-after 'build 'check
2896 (lambda _
2897 (invoke "guile" "-L" "mod"
2898 "-s" "test/test-ffi-fftw.scm"))))))
2899 (inputs
2900 `(("fftw" ,fftw)
2901 ("guile" ,guile-2.2)))
2902 (home-page "https://github.com/lloda/guile-ffi-fftw/")
2903 (synopsis "Access FFTW through Guile's FFI")
2904 (description "This is a minimal set of Guile FFI bindings for the FFTW
2905library's ‘guru interface’. It provides two functions: @code{fftw-dft! rank
2906sign in out} and @code{fftw-dft rank sign in}. These bindings being minimal,
2907there is no support for computing & reusing plans, or split r/i transforms, or
2908anything other than straight complex DFTs.")
353fb48f 2909 (license license:lgpl3+))))
f9ec89f4
TS
2910
2911(define-public srfi-64-driver
2912 (package
2913 (name "srfi-64-driver")
2914 (version "0.1")
2915 (source (origin
2916 (method url-fetch)
2917 (uri (string-append "https://files.ngyro.com/srfi-64-driver/"
2918 "srfi-64-driver-" version ".tar.gz"))
2919 (sha256
2920 (base32
2921 "188b6mb7sjjg0a8zldikinglf40ky8mg8rwh5768gjmch6gkk3ph"))))
2922 (build-system gnu-build-system)
2923 (arguments
2924 `(#:tests? #f
2925 #:phases
2926 (modify-phases %standard-phases
2927 (delete 'build))))
2928 (native-inputs
2929 `(("pkg-config" ,pkg-config)))
2930 (inputs
2931 `(("guile" ,guile-2.2)))
2932 (home-page "https://ngyro.com/software/srfi-64-driver.html")
2933 (synopsis "Automake test driver for SRFI 64 test suites")
2934 (description "This package provides an Automake test driver that can
2935run SRFI 64 test suites. It gives Automake insight into the individual
2936tests being run, resulting clearer and more specific output.")
2937 (license license:gpl3+)))
f6bf4b2c
TS
2938
2939(define-public guile-semver
2940 (package
2941 (name "guile-semver")
85ced665 2942 (version "0.1.1")
f6bf4b2c
TS
2943 (source (origin
2944 (method url-fetch)
2945 (uri (string-append "https://files.ngyro.com/guile-semver/"
2946 "guile-semver-" version ".tar.gz"))
2947 (sha256
2948 (base32
85ced665 2949 "109p4n39ln44cxvwdccf9kgb96qx54makvd2ir521ssz6wchjyag"))))
f6bf4b2c
TS
2950 (build-system gnu-build-system)
2951 (native-inputs
85ced665 2952 `(("pkg-config" ,pkg-config)))
f6bf4b2c
TS
2953 (inputs
2954 `(("guile" ,guile-2.2)))
2955 (home-page "https://ngyro.com/software/guile-semver.html")
2956 (synopsis "Semantic Versioning (SemVer) for Guile")
2957 (description "This Guile library provides tools for reading,
2958comparing, and writing Semantic Versions. It also includes ranges in
2959the style of the Node Package Manager (NPM).")
2960 (license license:gpl3+)))
d67fa5c8
LC
2961
2962(define-public guile-hashing
2963 (package
2964 (name "guile-hashing")
2965 (version "1.2.0")
2966 (home-page "https://github.com/weinholt/hashing")
2967 (source (origin
2968 (method git-fetch)
2969 (uri (git-reference
2970 (url home-page)
2971 (commit (string-append "v" version))))
2972 (file-name (git-file-name name version))
2973 (sha256
2974 (base32
2975 "1362d3lmpv7slmv1zmr9wy8panq9sjr9787gc2hagd646mpsfpkl"))))
2976 (build-system guile-build-system)
2977 (arguments
2978 `(#:modules ((guix build guile-build-system)
2979 (guix build utils)
2980 (srfi srfi-26)
2981 (ice-9 ftw))
2982 #:implicit-inputs? #f ;needs nothing but Guile
2983 #:phases (modify-phases %standard-phases
2984 (add-before 'build 'move-sls-files
2985 (lambda _
2986 ;; Move the source under hashing/ in order to match
2987 ;; module names, and rename .sls files to .scm.
2988 (define (target file)
2989 (string-append "hashing/" file))
2990
2991 (define (sls->scm sls)
2992 (string-append (string-drop-right sls 4)
2993 ".scm"))
2994
2995 (mkdir "hashing")
2996 (for-each (lambda (file)
2997 (rename-file file (sls->scm file)))
2998 (find-files "." "\\.sls$"))
2999 (for-each (lambda (file)
3000 (rename-file file (target file)))
3001 (scandir "." (cut string-suffix? ".scm" <>)))
3002 (rename-file "private" "hashing/private")
3003 #t)))))
3004 (native-inputs
3005 `(("guile" ,guile-2.2)))
3006 (synopsis "Cryprographic hash functions implemented in Scheme")
3007 (description
3008 "The @code{(hashing @dots{})} modules implement cryptographic hash
3009functions in pure R6RS Scheme: CRC, HMAC, MD5, SHA-1, and SHA-2 (SHA-256,
3010SHA-512).")
3011 (license license:expat)))
f918a8d9
LC
3012
3013(define-public guile3.0-hashing
3014 (package
3015 (inherit guile-hashing)
3016 (name "guile3.0-hashing")
3017 (native-inputs
3018 `(("guile" ,guile-next)))))
ef2b1d2c
RW
3019
3020(define-public guile-webutils
3021 (let ((commit "8541904f761066dc9c27b1153e9a838be9a55299")
3022 (revision "0"))
3023 (package
3024 (name "guile-webutils")
3025 (version (git-version "0.1" revision commit))
3026 (source (origin
3027 (method git-fetch)
3028 (uri (git-reference
3029 (url "https://notabug.org/cwebber/guile-webutils.git")
3030 (commit commit)))
3031 (file-name (git-file-name name version))
3032 (sha256
3033 (base32
3034 "1s9n3hbxd7lfpdi0x8wr0cfvlsf6g62ird9gbspxdrp5p05rbi64"))))
3035 (build-system gnu-build-system)
3036 (native-inputs
3037 `(("autoconf" ,autoconf)
3038 ("automake" ,automake)
3039 ("pkg-config" ,pkg-config)
3040 ("texinfo" ,texinfo)))
3041 (inputs
3042 `(("guile" ,guile-2.2)))
3043 (propagated-inputs
3044 `(("guile-irregex" ,guile-irregex)
3045 ("guile-gcrypt" ,guile-gcrypt)))
3046 (home-page "https://notabug.org/cwebber/guile-webutils")
3047 (synopsis "Web application authoring utilities for Guile")
3048 (description
3049 "This package provides tooling to write web applications in Guile, such
3050as signed sessions, multipart message support, etc.")
3051 (license license:gpl3+))))
5479cef8
RW
3052
3053(define-public guile-lens
3054 (let ((commit "14b15d07255f9d3f55d40a3b750d13c9ee3a154f")
3055 (revision "0"))
3056 (package
3057 (name "guile-lens")
3058 (version (git-version "0.1" revision commit))
3059 (source (origin
3060 (method git-fetch)
3061 (uri (git-reference
3062 (url "https://gitlab.com/a-sassmannshausen/guile-lens.git")
3063 (commit commit)))
3064 (file-name (git-file-name name version))
3065 (sha256
3066 (base32
3067 "0w8jzqyla56yrgj7acsgd4nspyir6zgp3vgxid4xmwhg9wmf1ida"))))
3068 (build-system gnu-build-system)
3069 (arguments
3070 '(#:phases
3071 (modify-phases %standard-phases
3072 (add-after 'unpack 'run-hall
3073 (lambda _
3074 (setenv "HOME" "/tmp") ; for ~/.hall
3075 (invoke "hall" "dist" "-x"))))))
3076 (native-inputs
3077 `(("autoconf" ,autoconf)
3078 ("automake" ,automake)
3079 ("guile" ,guile-2.2)
3080 ("guile-hall" ,guile-hall)
3081 ("pkg-config" ,pkg-config)
3082 ("texinfo" ,texinfo)))
3083 (home-page "https://gitlab.com/a-sassmannshausen/guile-lens.git")
3084 (synopsis "Composable lenses for data structures in Guile")
3085 (description
3086 "Guile-Lens is a library implementing lenses in Guile. The library is
3087currently a re-implementation of the lentes library for Clojure. Lenses
3088provide composable procedures, which can be used to focus, apply functions
3089over, or update a value in arbitrary data structures.")
3090 (license license:gpl3+))))