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