tests: Make the STORE test more robust in a "pure" environment.
[jackhill/guix/guix.git] / gnu / packages / guile-xyz.scm
CommitLineData
0791437f 1;;; GNU Guix --- Functional package management for GNU
475c3278 2;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
0791437f
RW
3;;; Copyright © 2014, 2015, 2018 Mark H Weaver <mhw@netris.org>
4;;; Copyright © 2015, 2017 Christopher Allan Webber <cwebber@dustycloud.org>
5;;; Copyright © 2016 Alex Sassmannshausen <alex@pompo.co>
76171095 6;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
0791437f 7;;; Copyright © 2016 Erik Edrosa <erik.edrosa@gmail.com>
3968722b 8;;; Copyright © 2016, 2019, 2020, 2021 Eraim Flashner <efraim@flashner.co.il>
0791437f
RW
9;;; Copyright © 2016, 2017 Alex Kost <alezost@gmail.com>
10;;; Copyright © 2016, 2017 Adonay "adfeno" Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno@openmailbox.org>
11;;; Copyright © 2016 Amirouche <amirouche@hypermove.net>
bdf2dd79 12;;; Copyright © 2016, 2019 Jan Nieuwenhuizen <janneke@gnu.org>
0791437f
RW
13;;; Copyright © 2017 Andy Wingo <wingo@igalia.com>
14;;; Copyright © 2017 David Thompson <davet@gnu.org>
f6145358 15;;; Copyright © 2017, 2018, 2019, 2020 Mathieu Othacehe <m.othacehe@gmail.com>
0791437f 16;;; Copyright © 2017 Theodoros Foradis <theodoros@foradis.org>
3c986a7d 17;;; Copyright © 2017 Nikita <nikita@n0.is>
0791437f
RW
18;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
19;;; Copyright © 2018 Maxim Cournoyer <maxim.cournoyer@gmail.com>
69bb61f1 20;;; Copyright © 2018, 2019, 2020 Arun Isaac <arunisaac@systemreboot.net>
0791437f
RW
21;;; Copyright © 2018 Pierre-Antoine Rouby <pierre-antoine.rouby@inria.fr>
22;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
cd81199c 23;;; Copyright © 2019 swedebugia <swedebugia@riseup.net>
be789065 24;;; Copyright © 2019, 2020 Amar Singh <nly@disroot.org>
f9ec89f4 25;;; Copyright © 2019 Timothy Sample <samplet@ngyro.com>
3c566eba 26;;; Copyright © 2019, 2020 Martin Becze <mjbecze@riseup.net>
8ffc20ef 27;;; Copyright © 2020 Evan Straw <evan.straw99@gmail.com>
b7e1e556 28;;; Copyright © 2020 Jack Hill <jackhill@jackhill.us>
c08f235b 29;;; Copyright © 2020 Julien Lepiler <julien@lepiller.eu>
3a71dac0 30;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
d282a82c 31;;; Copyright © 2020 Masaya Tojo <masaya@tojo.tokyo>
c984b70c 32;;; Copyright © 2020 Jesse Gibbons <jgibbons2357@gmail.com>
a987f128 33;;; Copyright © 2020 Mike Rosset <mike.rosset@gmail.com>
d22d129d 34;;; Copyright © 2020 Leo Prikler <leo.prikler@student.tugraz.at>
ff9f2463 35;;; Copyright © 2020, 2021 pukkamustard <pukkamustard@posteo.net>
3968722b 36;;; Copyright © 2021 Bonface Munyoki Kilyungi <me@bonfacemunyoki.com>
aa059897 37;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
0791437f
RW
38;;;
39;;; This file is part of GNU Guix.
40;;;
41;;; GNU Guix is free software; you can redistribute it and/or modify it
42;;; under the terms of the GNU General Public License as published by
43;;; the Free Software Foundation; either version 3 of the License, or (at
44;;; your option) any later version.
45;;;
46;;; GNU Guix is distributed in the hope that it will be useful, but
47;;; WITHOUT ANY WARRANTY; without even the implied warranty of
48;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
49;;; GNU General Public License for more details.
50;;;
51;;; You should have received a copy of the GNU General Public License
52;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
53
54(define-module (gnu packages guile-xyz)
55 #:use-module ((guix licenses) #:prefix license:)
56 #:use-module (gnu packages)
7ff157c1 57 #:use-module (gnu packages algebra)
0791437f
RW
58 #:use-module (gnu packages aspell)
59 #:use-module (gnu packages autotools)
465a951c 60 #:use-module (gnu packages avahi)
0791437f
RW
61 #:use-module (gnu packages base)
62 #:use-module (gnu packages bash)
63 #:use-module (gnu packages compression)
f53c1005 64 #:use-module (gnu packages crypto)
406ef442 65 #:use-module (gnu packages databases)
0791437f 66 #:use-module (gnu packages disk)
15218d4e 67 #:use-module (gnu packages emacs)
5531782d 68 #:use-module (gnu packages emacs-xyz)
0791437f
RW
69 #:use-module (gnu packages gawk)
70 #:use-module (gnu packages gettext)
71 #:use-module (gnu packages gl)
bdf2dd79 72 #:use-module (gnu packages glib)
5531782d 73 #:use-module (gnu packages gnome)
e8c2da41 74 #:use-module (gnu packages gnupg)
0791437f 75 #:use-module (gnu packages gperf)
a987f128 76 #:use-module (gnu packages gstreamer)
bdf2dd79 77 #:use-module (gnu packages gtk)
0791437f
RW
78 #:use-module (gnu packages guile)
79 #:use-module (gnu packages hurd)
80 #:use-module (gnu packages image)
d1a3a8e1 81 #:use-module (gnu packages imagemagick)
0791437f
RW
82 #:use-module (gnu packages libffi)
83 #:use-module (gnu packages libunistring)
84 #:use-module (gnu packages linux)
85 #:use-module (gnu packages man)
86 #:use-module (gnu packages maths)
559feb66 87 #:use-module (gnu packages mes)
0791437f
RW
88 #:use-module (gnu packages multiprecision)
89 #:use-module (gnu packages ncurses)
90 #:use-module (gnu packages networking)
f0de9544 91 #:use-module (gnu packages noweb)
1a37fd1e 92 #:use-module (gnu packages nss)
e8c2da41 93 #:use-module (gnu packages password-utils)
406ef442 94 #:use-module (gnu packages perl)
0791437f
RW
95 #:use-module (gnu packages pkg-config)
96 #:use-module (gnu packages python)
97 #:use-module (gnu packages readline)
98 #:use-module (gnu packages sdl)
69bb61f1 99 #:use-module (gnu packages search)
0791437f
RW
100 #:use-module (gnu packages slang)
101 #:use-module (gnu packages sqlite)
69bb61f1 102 #:use-module (gnu packages swig)
f0de9544 103 #:use-module (gnu packages tex)
0791437f
RW
104 #:use-module (gnu packages texinfo)
105 #:use-module (gnu packages tls)
106 #:use-module (gnu packages version-control)
559feb66 107 #:use-module (gnu packages web)
bdf2dd79 108 #:use-module (gnu packages webkit)
0791437f
RW
109 #:use-module (gnu packages xdisorg)
110 #:use-module (gnu packages xorg)
111 #:use-module (guix packages)
112 #:use-module (guix download)
113 #:use-module (guix git-download)
dec4b3aa 114 #:use-module (guix hg-download)
0a40da60 115 #:use-module (guix build-system cmake)
e4ef0d7c 116 #:use-module (guix build-system glib-or-gtk)
0791437f
RW
117 #:use-module (guix build-system gnu)
118 #:use-module (guix build-system guile)
119 #:use-module (guix utils)
a0b24d5f 120 #:use-module ((guix build utils) #:select (alist-replace))
0791437f
RW
121 #:use-module (ice-9 match)
122 #:use-module ((srfi srfi-1) #:select (alist-delete)))
123
124(define-public artanis
1a37fd1e
RW
125 (package
126 (name "artanis")
127 (version "0.4.1")
128 (source (origin
129 (method url-fetch)
130 (uri (string-append "mirror://gnu/artanis/artanis-"
131 version ".tar.gz"))
132 (sha256
133 (base32
134 "0nnmdfx5xwcc3kck64var7msz7g3qk817d7bv9l159nkmic0v9w4"))
135 (modules '((guix build utils)))
136 (snippet
137 '(begin
138 ;; Unbundle guile-redis and guile-json
139 (delete-file-recursively "artanis/third-party/json.scm")
140 (delete-file-recursively "artanis/third-party/json")
141 (delete-file-recursively "artanis/third-party/redis.scm")
142 (delete-file-recursively "artanis/third-party/redis")
143 (substitute* '("artanis/artanis.scm"
144 "artanis/lpc.scm"
145 "artanis/oht.scm")
146 (("(#:use-module \\()artanis third-party (json\\))" _
147 use-module json)
148 (string-append use-module json)))
149 (substitute* '("artanis/lpc.scm"
150 "artanis/session.scm")
151 (("(#:use-module \\()artanis third-party (redis\\))" _
152 use-module redis)
153 (string-append use-module redis)))
154 (substitute* "artanis/oht.scm"
155 (("([[:punct:][:space:]]+)(->json-string)([[:punct:][:space:]]+)"
156 _ pre json-string post)
157 (string-append pre
158 "scm" json-string
159 post)))
160 (substitute* "artanis/artanis.scm"
161 (("[[:punct:][:space:]]+->json-string[[:punct:][:space:]]+")
162 ""))
163 #t))))
164 (build-system gnu-build-system)
165 (inputs
166 `(("guile" ,guile-2.2)
167 ("nss" ,nss)))
168 ;; FIXME the bundled csv contains one more exported procedure
169 ;; (sxml->csv-string) than guile-csv. The author is maintainer of both
170 ;; projects.
171 ;; TODO: Add guile-dbi and guile-dbd optional dependencies.
172 (propagated-inputs
f40ddf95 173 `(("guile-json" ,guile-json-1) ; This is already using guile-2.2.
a7a8337b 174 ("guile-readline" ,guile2.2-readline)
d282a82c 175 ("guile-redis" ,guile2.2-redis)))
1a37fd1e
RW
176 (native-inputs
177 `(("bash" ,bash) ;for the `source' builtin
178 ("pkgconfig" ,pkg-config)
179 ("util-linux" ,util-linux))) ;for the `script' command
180 (arguments
181 '(#:make-flags
182 ;; TODO: The documentation must be built with the `docs' target.
183 (let* ((out (assoc-ref %outputs "out"))
184 (scm (string-append out "/share/guile/site/2.2"))
185 (go (string-append out "/lib/guile/2.2/site-ccache")))
186 ;; Don't use (%site-dir) for site paths.
187 (list (string-append "MOD_PATH=" scm)
188 (string-append "MOD_COMPILED_PATH=" go)))
189 #:test-target "test"
190 #:phases
191 (modify-phases %standard-phases
192 (add-after 'unpack 'patch-site-dir
193 (lambda* (#:key outputs #:allow-other-keys)
194 (substitute* "artanis/commands/help.scm"
195 (("\\(%site-dir\\)")
196 (string-append "\""
197 (assoc-ref outputs "out")
198 "/share/guile/site/2.2\"")))))
199 (add-after 'unpack 'patch-reference-to-libnss
200 (lambda* (#:key inputs #:allow-other-keys)
201 (substitute* "artanis/security/nss.scm"
202 (("ffi-binding \"libnss3\"")
203 (string-append
204 "ffi-binding \""
205 (assoc-ref inputs "nss") "/lib/nss/libnss3.so"
206 "\"")))
207 #t))
208 (add-before 'install 'substitute-root-dir
209 (lambda* (#:key outputs #:allow-other-keys)
210 (let ((out (assoc-ref outputs "out")))
211 (substitute* "Makefile" ;ignore the execution of bash.bashrc
212 ((" /etc/bash.bashrc") " /dev/null"))
213 (substitute* "Makefile" ;set the root of config files to OUT
214 ((" /etc") (string-append " " out "/etc")))
215 (mkdir-p (string-append out "/bin")) ;for the `art' executable
216 #t)))
217 (add-after 'install 'wrap-art
218 (lambda* (#:key inputs outputs #:allow-other-keys)
219 (let* ((out (assoc-ref outputs "out"))
220 (bin (string-append out "/bin"))
221 (scm (string-append out "/share/guile/site/2.2"))
222 (go (string-append out "/lib/guile/2.2/site-ccache")))
223 (wrap-program (string-append bin "/art")
224 `("GUILE_LOAD_PATH" ":" prefix
225 (,scm ,(getenv "GUILE_LOAD_PATH")))
226 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
227 (,go ,(getenv "GUILE_LOAD_COMPILED_PATH"))))
228 #t))))))
229 (synopsis "Web application framework written in Guile")
230 (description "GNU Artanis is a web application framework written in Guile
0791437f
RW
231Scheme. A web application framework (WAF) is a software framework that is
232designed to support the development of dynamic websites, web applications, web
233services and web resources. The framework aims to alleviate the overhead
234associated with common activities performed in web development. Artanis
235provides several tools for web development: database access, templating
236frameworks, session management, URL-remapping for RESTful, page caching, and
237more.")
1a37fd1e
RW
238 (home-page "https://www.gnu.org/software/artanis/")
239 (license (list license:gpl3+ license:lgpl3+)))) ;dual license
0791437f 240
aa059897
XC
241(define-public guile-f-scm
242 (package
243 (name "guile-f-scm")
244 (version "0.2.0")
245 (source
246 (origin
247 (method git-fetch)
248 (uri (git-reference
249 (url "https://git.sr.ht/~brown121407/f.scm")
250 (commit version)))
251 (file-name (git-file-name name version))
252 (sha256
253 (base32 "14wyrs3m1649l3km4pl2175dmap1372j5h8nkhykrbxg5xqp6ivd"))))
254 (build-system guile-build-system)
255 (native-inputs
256 `(("guile" ,guile-3.0)))
257 (home-page "https://git.sr.ht/~brown121407/f.scm")
258 (synopsis "Library for working with files and directories")
259 (description
260 "f.scm is a library intended to facilitate working with files and
261directories (the file system in general). It was initially inspired by the
262f library for Emacs.")
263 (license license:gpl3+)))
264
0791437f
RW
265;; There has not been any release yet.
266(define-public guildhall
267 (let ((commit "2fe2cc539f4b811bbcd69e58738db03eb5a2b778")
268 (revision "1"))
269 (package
270 (name "guildhall")
271 (version (string-append "0-" revision "." (string-take commit 9)))
272 (source (origin
273 (method git-fetch)
274 (uri (git-reference
b0e7b699 275 (url "https://github.com/ijp/guildhall")
0791437f
RW
276 (commit commit)))
277 (file-name (string-append name "-" version "-checkout"))
278 (sha256
279 (base32
280 "115bym7bg66h3gs399yb2vkzc2ygriaqsn4zbrg8f054mgy8wzn1"))))
281 (build-system gnu-build-system)
282 (arguments
283 `(#:phases
284 (modify-phases %standard-phases
285 ;; Tests fail without this fix because they try to load the bash
286 ;; executable as a Scheme file. See bug report at
287 ;; https://github.com/ijp/guildhall/issues/22
288 (add-after 'unpack 'fix-bug-22
289 (lambda _
290 (substitute* "Makefile.am"
291 (("TESTS_ENVIRONMENT=.*")
292 "AM_TESTS_ENVIRONMENT=srcdir=$(abs_top_srcdir)/tests/
293TEST_EXTENSIONS = .scm
294SCM_LOG_COMPILER= $(top_builddir)/env $(GUILE)
295AM_SCM_LOG_FLAGS = --no-auto-compile -s")
296 ;; FIXME: one of the database tests fails for unknown
297 ;; reasons. It does not fail when run outside of Guix.
298 (("tests/database.scm") ""))
299 #t)))))
300 (inputs
301 `(("guile" ,guile-2.0)))
302 (native-inputs
303 `(("zip" ,zip) ; for tests
304 ("autoconf" ,autoconf)
305 ("automake" ,automake)
306 ("texinfo" ,texinfo)))
307 (synopsis "Package manager for Guile")
308 (description
309 "Guildhall is a package manager written for Guile Scheme. A guild is
310an association of independent craftspeople. A guildhall is where they meet.
311This Guildhall aims to make a virtual space for Guile wizards and journeyfolk
312to share code.
313
314On a practical level, Guildhall lets you share Scheme modules and programs
315over the internet, and install code that has been shared by others. Guildhall
316can handle dependencies, so when a program requires several libraries, and
317each of those has further dependencies, all of the prerequisites for the
318program can be installed in one go.")
319 (home-page "https://github.com/ijp/guildhall")
320 (license license:gpl3+))))
321
322(define-public guile-aspell
323 (package
324 (name "guile-aspell")
325 (version "0.4")
326 (source (origin
327 (method url-fetch)
328 (uri (string-append
329 "http://lonelycactus.com/tarball/guile_aspell-"
330 version ".tar.gz"))
331 (sha256
332 (base32
333 "0vpk5xj9m9qc702z3khmkwhgpb949qbsyz8kw2qycda6qnxk0077"))))
334 (build-system gnu-build-system)
335 (arguments
336 '(#:phases (modify-phases %standard-phases
337 (add-before 'configure 'set-guilesitedir
338 (lambda _
339 (substitute* "Makefile.in"
340 (("^guilesitedir =.*$")
341 "guilesitedir = \
342$(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
343 #t))
344 (add-before 'build 'set-libaspell-file-name
345 (lambda* (#:key inputs #:allow-other-keys)
346 (let ((aspell (assoc-ref inputs "aspell")))
347 (substitute* "aspell.scm"
348 (("\"libaspell\\.so\"")
349 (string-append "\"" aspell
350 "/lib/libaspell\"")))
351 #t))))))
352 (native-inputs `(("pkg-config" ,pkg-config)))
353 (inputs `(("guile" ,guile-2.2)
354 ("aspell" ,aspell)))
355 (home-page "https://github.com/spk121/guile-aspell")
356 (synopsis "Spell-checking from Guile")
357 (description
358 "guile-aspell is a Guile Scheme library for comparing a string against a
359dictionary and suggesting spelling corrections.")
360 (license license:gpl3+)))
361
362(define-public guile-bash
363 ;; This project is currently retired. It was initially announced here:
364 ;; <https://lists.gnu.org/archive/html/guile-user/2015-02/msg00003.html>.
365 (let ((commit "1eabc563ca5692b3e08d84f1f0e6fd2283284469")
366 (revision "0"))
367 (package
368 (name "guile-bash")
369 (version (string-append "0.1.6-" revision "." (string-take commit 7)))
370 (home-page
371 "https://anonscm.debian.org/cgit/users/kaction-guest/retired/dev.guile-bash.git")
372 (source (origin
373 (method git-fetch)
374 (uri (git-reference
375 (commit commit)
376 (url home-page)))
377 (sha256
378 (base32
379 "097vny990wp2qpjij6a5a5gwc6fxzg5wk56inhy18iki5v6pif1p"))
380 (file-name (string-append name "-" version "-checkout"))))
381 (build-system gnu-build-system)
382 (arguments
383 '(#:configure-flags
384 ;; Add -I to match 'bash.pc' of Bash 4.4.
385 (list (string-append "CPPFLAGS=-I"
386 (assoc-ref %build-inputs "bash:include")
387 "/include/bash/include")
388
389 ;; The '.a' file is useless.
390 "--disable-static"
391
392 ;; Install 'lib/bash' as Bash 4.4 expects.
393 (string-append "--libdir=" (assoc-ref %outputs "out")
394 "/lib/bash"))))
395 (native-inputs `(("pkg-config" ,pkg-config)
ce10e2b3 396 ("autoconf" ,autoconf)
0791437f
RW
397 ("automake" ,automake)
398 ("libtool" ,libtool)
399 ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'.
400 ("gettext" ,gettext-minimal)
401
402 ;; Bash with loadable module support, for the test
403 ;; suite.
404 ("bash-full" ,bash)))
405 (inputs `(("guile" ,guile-2.0)
406 ("bash:include" ,bash "include")))
407 (synopsis "Extend Bash using Guile")
408 (description
409 "Guile-Bash provides a shared library and set of Guile modules,
410allowing you to extend Bash in Scheme. Scheme interfaces allow you to access
411the following aspects of Bash:
412
413@itemize
414@item aliases;
415@item setting and getting Bash variables;
416@item creating dynamic variables;
417@item creating Bash functions with a Scheme implementation;
418@item reader macro for output capturing;
419@item reader macro for evaluating raw Bash commands.
420@end itemize
421
422To enable it, run:
423
424@example
425enable -f ~/.guix-profile/lib/bash/libguile-bash.so scm
426@end example
427
428and then run @command{scm example.scm}.")
429 (license license:gpl3+))))
430
431(define-public guile-8sync
432 (package
433 (name "guile-8sync")
434 (version "0.4.2")
435 (source (origin
436 (method url-fetch)
437 (uri (string-append "mirror://gnu/8sync/8sync-" version
438 ".tar.gz"))
439 (sha256
440 (base32
441 "031wm13srak3wsnll7j2mbbi29g1pcm4swdb71ds9yn567pn20qw"))))
442 (build-system gnu-build-system)
443 (native-inputs `(("autoconf" ,autoconf)
444 ("automake" ,automake)
445 ("guile" ,guile-2.2)
446 ("pkg-config" ,pkg-config)
447 ("texinfo" ,texinfo)))
448 (arguments
449 `(#:phases (modify-phases %standard-phases
450 (add-before 'configure 'setenv
451 (lambda _
452 ;; quiet warnings
453 (setenv "GUILE_AUTO_COMPILE" "0")
454 #t)))))
455 (home-page "https://gnu.org/s/8sync/")
456 (synopsis "Asynchronous actor model library for Guile")
457 (description
458 "GNU 8sync (pronounced \"eight-sync\") is an asynchronous programming
459library for GNU Guile based on the actor model.
460
461Note that 8sync is only available for Guile 2.2.")
eee4173c 462 (properties '((upstream-name . "8sync")))
0791437f
RW
463 (license license:lgpl3+)))
464
465(define-public guile-daemon
466 (package
467 (name "guile-daemon")
f975f82d 468 (version "0.1.3")
0791437f
RW
469 (source (origin
470 (method url-fetch)
471 (uri (string-append "https://github.com/alezost/" name
472 "/releases/download/v" version
473 "/" name "-" version ".tar.gz"))
474 (sha256
475 (base32
f975f82d 476 "08gaqrgjlly9k5si72vvpbr4xhq5v52l5ma5y6a7spid5dd057cy"))))
0791437f
RW
477 (build-system gnu-build-system)
478 (native-inputs
479 `(("pkg-config" ,pkg-config)))
480 (inputs
481 `(("guile" ,guile-2.2)))
482 (home-page "https://github.com/alezost/guile-daemon")
483 (synopsis "Evaluate code in a running Guile process")
484 (description
485 "Guile-Daemon is a small Guile program that loads your initial
486configuration file, and then reads and evaluates Guile expressions that
487you send to a FIFO file.")
488 (license license:gpl3+)))
489
490(define-public guile-dsv
491 (package
492 (name "guile-dsv")
d70b0f92 493 (version "0.4.0")
0791437f
RW
494 (source (origin
495 (method git-fetch)
496 (uri (git-reference
497 (url "https://github.com/artyom-poptsov/guile-dsv")
d70b0f92 498 (commit (string-append "v" version))))
0791437f
RW
499 (file-name (string-append name "-" version "-checkout"))
500 (sha256
501 (base32
d70b0f92 502 "1mvyc8i38j56frjh3p6vwziv8lrzlyqndz30663h5nwcp0044sdn"))))
0791437f
RW
503 (build-system gnu-build-system)
504 (native-inputs
505 `(("autoconf" ,autoconf)
506 ("automake" ,automake)
507 ("pkg-config" ,pkg-config)
508 ("texinfo" ,texinfo)))
f81ce752
JH
509 (inputs `(("guile" ,guile-3.0)))
510 (propagated-inputs `(("guile-lib" ,guile-lib)))
0791437f 511 (arguments
b7e1e556
JH
512 `(#:modules (((guix build guile-build-system)
513 #:select (target-guile-effective-version))
514 ,@%gnu-build-system-modules)
515 #:imported-modules ((guix build guile-build-system)
516 ,@%gnu-build-system-modules)
517 #:phases (modify-phases %standard-phases
0791437f
RW
518 (add-before 'configure 'set-guilesitedir
519 (lambda _
520 (substitute* "Makefile.in"
521 (("^guilesitedir =.*$")
522 "guilesitedir = \
523$(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
524 (substitute* "modules/Makefile.in"
525 (("^guilesitedir =.*$")
526 "guilesitedir = \
527$(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
528 (substitute* "modules/dsv/Makefile.in"
529 (("^guilesitedir =.*$")
530 "guilesitedir = \
531$(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
b7e1e556
JH
532 #t))
533 (add-after 'install 'wrap-program
534 (lambda* (#:key inputs outputs #:allow-other-keys)
535 (let* ((out (assoc-ref outputs "out"))
536 (bin (string-append out "/bin"))
f81ce752 537 (guile-lib (assoc-ref inputs "guile-lib"))
b7e1e556
JH
538 (version (target-guile-effective-version))
539 (scm (string-append "/share/guile/site/"
540 version))
541 (go (string-append "/lib/guile/"
542 version "/site-ccache")))
543 (wrap-program (string-append bin "/dsv")
544 `("GUILE_LOAD_PATH" prefix
545 (,(string-append out scm)
546 ,(string-append guile-lib scm)))
547 `("GUILE_LOAD_COMPILED_PATH" prefix
548 (,(string-append out go)
549 ,(string-append guile-lib go)))))
0791437f
RW
550 #t)))))
551 (home-page "https://github.com/artyom-poptsov/guile-dsv")
552 (synopsis "DSV module for Guile")
553 (description
554 "Guile-DSV is a GNU Guile module for working with the
555delimiter-separated values (DSV) data format. Guile-DSV supports the
556Unix-style DSV format and RFC 4180 format.")
557 (license license:gpl3+)))
558
f81ce752
JH
559(define-public guile2.2-dsv
560 (package
561 (inherit guile-dsv)
562 (name "guile2.2-dsv")
563 (inputs `(("guile" ,guile-2.2)))
564 (propagated-inputs `(("guile-lib" ,guile2.2-lib)))))
565
0791437f
RW
566(define-public guile-fibers
567 (package
568 (name "guile-fibers")
569 (version "1.0.0")
570 (source (origin
571 (method url-fetch)
572 (uri (string-append "https://wingolog.org/pub/fibers/fibers-"
573 version ".tar.gz"))
574 (sha256
575 (base32
9e016129
LC
576 "0vjkg72ghgdgphzbjz9ig8al8271rq8974viknb2r1rg4lz92ld0"))
577 (modules '((guix build utils)))
578 (snippet
579 '(begin
580 ;; Allow builds with Guile 3.0.
581 (substitute* "configure"
582 (("search=\"2\\.2\"")
583 "search=\"3.0 2.2\""))
584
585 ;; Explicitly include system headers rather than relying on
586 ;; <libguile.h> to do it for us.
587 (substitute* "epoll.c"
588 (("#include.*libguile\\.h.*$" all)
589 (string-append "#include <unistd.h>\n"
590 "#include <string.h>\n"
591 all "\n")))
592
593 ;; Import (ice-9 threads) for 'current-processor-count'.
594 (substitute* "tests/channels.scm"
595 (("#:use-module \\(fibers\\)")
596 (string-append "#:use-module (fibers)\n"
597 "#:use-module (ice-9 threads)\n")))
9af90aaf
CR
598 #t))
599 (patches
600 ;; fixes a resource leak that causes crashes in the tests
601 (search-patches "guile-fibers-destroy-peer-schedulers.patch"))))
0791437f
RW
602 (build-system gnu-build-system)
603 (arguments
b6bee63b
LC
604 '(;; The code uses 'scm_t_uint64' et al., which are deprecated in 3.0.
605 #:configure-flags '("CFLAGS=-Wno-error=deprecated-declarations")
606 #:phases (modify-phases %standard-phases
0791437f
RW
607 (add-after 'install 'mode-guile-objects
608 (lambda* (#:key outputs #:allow-other-keys)
609 ;; .go files are installed to "lib/guile/X.Y/cache".
610 ;; This phase moves them to "…/site-ccache".
611 (let* ((out (assoc-ref outputs "out"))
612 (lib (string-append out "/lib/guile"))
613 (old (car (find-files lib "^ccache$"
614 #:directories? #t)))
615 (new (string-append (dirname old)
616 "/site-ccache")))
617 (rename-file old new)
618 #t))))))
619 (native-inputs
620 `(("texinfo" ,texinfo)
621 ("pkg-config" ,pkg-config)))
622 (inputs
b6bee63b 623 `(("guile" ,guile-3.0)))
0791437f
RW
624 (synopsis "Lightweight concurrency facility for Guile")
625 (description
626 "Fibers is a Guile library that implements a a lightweight concurrency
627facility, inspired by systems like Concurrent ML, Go, and Erlang. A fiber is
628like a \"goroutine\" from the Go language: a lightweight thread-like
629abstraction. Systems built with Fibers can scale up to millions of concurrent
630fibers, tens of thousands of concurrent socket connections, and many parallel
631cores. The Fibers library also provides Concurrent ML-like channels for
632communication between fibers.
633
634Note that Fibers makes use of some Guile 2.1/2.2-specific features and
635is not available for Guile 2.0.")
636 (home-page "https://github.com/wingo/fibers")
637 (license license:lgpl3+)))
638
b6bee63b 639(define-public guile2.0-fibers
9e016129
LC
640 (package
641 (inherit guile-fibers)
b6bee63b
LC
642 (name "guile2.2-fibers")
643 (inputs `(("guile" ,guile-2.2)))))
644
645(define-public guile3.0-fibers
646 (deprecated-package "guile3.0-fibers" guile-fibers))
9e016129 647
d22d129d
LP
648(define-public guile-filesystem
649 (package
650 (name "guile-filesystem")
651 (version "0.1.0")
652 (source (origin
653 (method git-fetch)
654 (uri (git-reference
655 (url "https://gitlab.com/leoprikler/guile-filesystem.git")
656 (commit version)))
657 (file-name (git-file-name name version))
658 (sha256
659 (base32
660 "1shmkc0y9r2sj3kw7hrsnamnp7y8xifkhf3m3rnfxczqg63k67vy"))))
661 (build-system gnu-build-system)
662 (native-inputs
ce10e2b3 663 `(("autoconf" ,autoconf)
d22d129d
LP
664 ("automake" ,automake)
665 ("pkg-config" ,pkg-config)
666 ("texinfo" ,texinfo)))
667 (inputs
668 `(("guile" ,guile-3.0)))
669 (home-page "https://gitlab.com/leoprikler/guile-filesystem")
670 (synopsis "Complementary library to Guile's built-in file system procedures")
671 (description "@code{guile-filesystem} provides a set of utility functions,
672that augment Guile's support for handling files and their names.")
673 (license license:lgpl3+)))
674
675(define-public guile2.0-filesystem
676 (package
677 (inherit guile-filesystem)
678 (name "guile2.0-filesystem")
679 (inputs `(("guile" ,guile-2.0)))))
680
681(define-public guile2.2-filesystem
682 (package
683 (inherit guile-filesystem)
684 (name "guile2.2-filesystem")
685 (inputs `(("guile" ,guile-2.2)))))
686
0791437f
RW
687(define-public guile-syntax-highlight
688 (package
689 (name "guile-syntax-highlight")
690 (version "0.1")
691 (source (origin
692 (method url-fetch)
693 (uri (string-append "https://files.dthompson.us/"
694 "guile-syntax-highlight/"
695 "guile-syntax-highlight-"
696 version ".tar.gz"))
697 (sha256
698 (base32
fb8a77f4
LC
699 "1p771kq15x83483m23bhah1sz6vkalg3drm7x279f4j1cxligkzi"))
700 (modules '((guix build utils)))
701 (snippet
702 '(begin
703 ;; Allow builds with Guile 3.0.
704 (substitute* "configure"
705 (("2\\.2 2\\.0")
706 "3.0 2.2 2.0"))
707 #t))))
0791437f
RW
708 (build-system gnu-build-system)
709 (native-inputs
710 `(("pkg-config" ,pkg-config)))
711 (inputs
b6bee63b 712 `(("guile" ,guile-3.0)))
0791437f
RW
713 (synopsis "General-purpose syntax highlighter for GNU Guile")
714 (description "Guile-syntax-highlight is a general-purpose syntax
715highlighting library for GNU Guile. It can parse code written in various
716programming languages into a simple s-expression that can be converted to
717HTML (via SXML) or any other format for rendering.")
02e052ba 718 (home-page "https://dthompson.us/projects/guile-syntax-highlight.html")
0791437f
RW
719 (license license:lgpl3+)))
720
b6bee63b 721(define-public guile2.2-syntax-highlight
fb8a77f4
LC
722 (package
723 (inherit guile-syntax-highlight)
b6bee63b
LC
724 (name "guile2.2-syntax-highlight")
725 (inputs `(("guile" ,guile-2.2)))))
726
727(define-public guile3.0-syntax-highlight
728 (deprecated-package "guile3.0-syntax-highlight" guile-syntax-highlight))
fb8a77f4 729
0791437f
RW
730(define-public guile-sjson
731 (package
732 (name "guile-sjson")
733 (version "0.2.1")
734 (source (origin
735 (method url-fetch)
736 (uri (string-append "https://dustycloud.org/misc/sjson-" version
737 ".tar.gz"))
738 (sha256
739 (base32
eef54583
RW
740 "1mzmapln79vv10qxaggz9qwcdbag3jnrj19xx8bgkmxss8h03sv3"))
741 (modules '((guix build utils)))
742 (snippet
743 '(begin
744 ;; Allow builds with Guile 3.0.
745 (substitute* "configure"
746 (("2\\.2 2\\.0")
747 "3.0 2.2 2.0"))
748 #t))))
0791437f
RW
749 (build-system gnu-build-system)
750 (native-inputs
751 `(("autoconf" ,autoconf)
752 ("automake" ,automake)
753 ("pkg-config" ,pkg-config)))
754 (inputs
eef54583 755 `(("guile" ,guile-3.0)))
0791437f
RW
756 (home-page "https://gitlab.com/dustyweb/guile-sjson")
757 (synopsis "S-expression based json reader/writer for Guile")
758 (description "guile-sjson is a json reader/writer for Guile.
759It has a nice, simple s-expression based syntax.")
760 (license license:lgpl3+)))
761
eef54583
RW
762(define-public guile2.2-sjson
763 (package
764 (inherit guile-sjson)
765 (name "guile2.2-sjson")
766 (inputs `(("guile" ,guile-2.2)))))
767
61dafdc0 768(define-public guile-squee
50812aae
MO
769 (let ((commit "c1497a216e881cfde39d6aa7c73d0bf6b497c89b")
770 (revision "2"))
61dafdc0
CB
771 (package
772 (name "guile-squee")
773 (version (string-append "0-" revision "." (string-take commit 7)))
774 (source (origin
775 (method git-fetch)
776 (uri (git-reference
777 (url "https://notabug.org/cwebber/guile-squee.git")
778 (commit commit)))
779 (file-name (git-file-name name version))
780 (sha256
781 (base32
50812aae 782 "1alskrplnyl1n5wb39drn72cwplp47a8cpdd1n9cdnw3jhk5p12p"))))
61dafdc0
CB
783 (build-system guile-build-system)
784 (arguments
785 '(#:phases
786 (modify-phases %standard-phases
787 (add-after 'unpack 'patch
788 (lambda* (#:key inputs #:allow-other-keys)
789 (substitute* "squee.scm"
790 (("dynamic-link \"libpq\"")
791 (string-append
792 "dynamic-link \""
793 (assoc-ref inputs "postgresql") "/lib/libpq.so"
794 "\"")))
795 #t)))))
796 (inputs
797 `(("postgresql" ,postgresql)))
798 (native-inputs
ca03dca5 799 `(("guile" ,guile-3.0)))
61dafdc0
CB
800 (home-page "https://notabug.org/cwebber/guile-squee")
801 (synopsis "Connect to PostgreSQL using Guile")
802 (description
803 "@code{squee} is a Guile library for connecting to PostgreSQL databases
804using Guile's foreign function interface.")
6fd72f70 805 (license license:lgpl3+))))
61dafdc0 806
ca03dca5 807(define-public guile2.2-squee
945a73d8
CB
808 (package
809 (inherit guile-squee)
ca03dca5
LC
810 (name "guile2.2-squee")
811 (native-inputs `(("guile" ,guile-2.2)
cfe35814
CB
812 ,@(alist-delete "guile"
813 (package-native-inputs guile-squee))))))
945a73d8 814
ca03dca5
LC
815(define-public guile3.0-squee
816 (deprecated-package "guile3.0-squee" guile-squee))
817
0791437f
RW
818(define-public guile-colorized
819 (package
820 (name "guile-colorized")
821 (version "0.1")
1340ce28
TGR
822 (source
823 (origin
824 (method git-fetch)
825 (uri (git-reference
55f4282e 826 (url "https://gitlab.com/NalaGinrut/guile-colorized.git")
1340ce28
TGR
827 (commit (string-append "v" version))))
828 (file-name (git-file-name name version))
829 (sha256
830 (base32 "10mv8c63159r3qvwwdvsgnsvdg7nc2ghak85zapwqpv4ywrqp9zc"))))
0791437f
RW
831 (build-system guile-build-system)
832 (native-inputs
b6bee63b 833 `(("guile" ,guile-3.0)))
55f4282e 834 (home-page "https://gitlab.com/NalaGinrut/guile-colorized")
0791437f
RW
835 (synopsis "Colorized REPL for Guile")
836 (description
837 "Guile-colorized provides you with a colorized REPL for GNU Guile.")
838 (license license:gpl3+)))
839
b6bee63b 840(define-public guile2.2-colorized
fc870a0d
LC
841 (package
842 (inherit guile-colorized)
b6bee63b
LC
843 (name "guile2.2-colorized")
844 (native-inputs `(("guile" ,guile-2.2)))))
845
846(define-public guile3.0-colorized
847 (deprecated-package "guile3.0-colorized" guile-colorized))
fc870a0d 848
0791437f
RW
849(define-public guile-pfds
850 (package
851 (name "guile-pfds")
852 (version "0.3")
853 (home-page "https://github.com/ijp/pfds")
854 (source (origin
855 (method git-fetch)
856 (uri (git-reference
857 (url home-page)
858 (commit (string-append "v" version))))
859 (sha256
860 (base32
861 "19y33wg94pf0n98dkfqd1zbw93fgky4sawxsxl6s3vyqwl0yi5vh"))
862 (file-name (string-append name "-" version "-checkout"))))
863 (build-system guile-build-system)
864 (arguments
865 '(#:source-directory "src"
45231d17 866 #:compile-flags '("--r6rs" "-Wunbound-variable" "-Warity-mismatch")
0791437f
RW
867 #:phases (modify-phases %standard-phases
868 (add-after 'unpack 'move-files-around
869 (lambda _
870 ;; Move files under a pfds/ directory to reflect the
871 ;; module hierarchy.
872 (mkdir-p "src/pfds")
873 (for-each (lambda (file)
874 (rename-file file
45231d17 875 (string-append "src/pfds/" file)))
0791437f
RW
876 '("bbtrees.sls"
877 "deques"
878 "deques.sls"
879 "dlists.sls"
880 "fingertrees.sls"
881 "hamts.sls"
882 "heaps.sls"
883 "private"
884 "psqs.sls"
885 "queues"
886 "queues.sls"
887 "sequences.sls"
888 "sets.sls"))
0791437f
RW
889 #t)))))
890 (native-inputs
b6bee63b 891 `(("guile" ,guile-3.0)))
0791437f
RW
892 (synopsis "Purely functional data structures for Guile")
893 (description
894 "This package provides purely functional data structures written in R6RS
895Scheme and compiled for Guile. It has been tested with Racket, Guile 2,
896Vicare Scheme and IronScheme. Right now it contains:
897
898@itemize
899@item queues
900@item deques
901@item bbtrees
902@item sets
903@item dlists
904@item priority search queues (PSQs)
905@item finger trees
906@item sequences
907@item heaps
908@item hash array mapped tries (HAMTs).
909@end itemize\n")
910 (license license:bsd-3)))
911
d944f10d
CB
912(define-public guile2.0-pg
913 (package
914 (name "guile2.0-pg")
915 (version "0.49")
916 (source (origin
917 (method url-fetch)
918 (uri (string-append "mirror://savannah/guile-pg/guile-pg-"
919 version ".tar.xz"))
920 (sha256
921 (base32
922 "1fizcqga96p9n2jjhi9nprhry20hg9wvcl5b8gya4vhzwz6qhysp"))))
923 (build-system gnu-build-system)
924 (arguments
925 '(#:phases
926 (modify-phases %standard-phases
927 (add-before 'install 'patch-src/Makefile
928 (lambda* (#:key outputs #:allow-other-keys)
929 (substitute* "src/Makefile"
930 (("\\/share\\/guile\\/site") "/share/guile/site/2.0"))
931 #t)))))
932 (native-inputs
933 `(("procps" ,procps) ; fake-cluster-control uses ps
934 ("guile" ,guile-2.0)
935 ("postgresql" ,postgresql)))
936 (inputs
937 `(("guile" ,guile-2.0)
938 ("postgresql" ,postgresql)))
939 (home-page "https://www.nongnu.org/guile-pg/")
940 (synopsis "Guile modules for accessing PostgreSQL")
941 (description
942 "Guile-PG is a collection of modules for Guile allowing access to the
943PostgreSQL RDBMS from Scheme programs.
944
945This has been tested against PostgreSQL 10 through 13, but currently only
946works with Guile 1.4.x to 2.0.x.")
947 (license license:gpl3+)))
948
15c3fe24 949(define-public guile-prometheus
77667e2e
CB
950 (let ((commit "35dc26c0ea44c3d70f1819f240d84e2cbb4b7b4c")
951 (revision "5"))
15c3fe24
CB
952 (package
953 (name "guile-prometheus")
954 (version (git-version "0" revision commit))
955 (source (origin
956 (method git-fetch)
957 (uri (git-reference
958 (url "https://git.cbaines.net/git/guile/prometheus")
959 (commit commit)))
960 (sha256
961 (base32
77667e2e 962 "07822jj4appw37lf444kc4xlgl7nm64mgldag56072l55kwashgb"))
15c3fe24
CB
963 (file-name (string-append name "-" version "-checkout"))))
964 (build-system gnu-build-system)
965 (native-inputs
966 `(("pkg-config" ,pkg-config)
967 ("autoconf" ,autoconf)
b452f1b1
CB
968 ("automake" ,automake)
969 ("guile" ,guile-3.0)))
15c3fe24
CB
970 (inputs
971 `(("guile" ,guile-3.0)))
972 (home-page "https://git.cbaines.net/guile/prometheus")
973 (synopsis "Prometheus client library for Guile")
974 (description
975 "This Guile library provides instrumentation code intended to be used
976with the Prometheus time series service. Counter, gauge and histogram metric
977types are supported.")
978 (license license:gpl3+))))
979
b6bee63b 980(define-public guile2.2-pfds
77c95ee6
RW
981 (package
982 (inherit guile-pfds)
b6bee63b
LC
983 (name "guile2.2-pfds")
984 (native-inputs `(("guile" ,guile-2.2)))
77c95ee6 985 (arguments
0dd1e277
RW
986 (substitute-keyword-arguments (package-arguments guile-pfds)
987 ((#:phases phases)
988 `(modify-phases ,phases
45231d17
MB
989 (delete 'work-around-guile-bug)
990 (add-after 'move-files-around 'sls->scm
991 (lambda _
992 ;; In Guile <= 2.2.4, there's no way to tell 'guild
993 ;; compile' to accept the ".sls" extension. So...
994 (for-each (lambda (file)
995 (rename-file file
996 (string-append
997 (string-drop-right file 4)
998 ".scm")))
999 (find-files "." "\\.sls$"))
1000 #t))))))))
b6bee63b
LC
1001
1002(define-public guile3.0-pfds
1003 (deprecated-package "guile3.0-pfds" guile-pfds))
77c95ee6 1004
0791437f
RW
1005(define-public guile-aa-tree
1006 (package
1007 (name "guile-aa-tree")
1008 (version "3.1.1")
1009 (source (origin
1010 (method url-fetch)
1011 (uri (string-append "mirror://savannah/guile-aa-tree/guile-aa-tree-"
1012 version ".tar.gz"))
1013 (sha256
1014 (base32
1015 "0044c105r3q9vpl17pv3phl1b79kjm1llhkakqgiasixyav01blh"))))
1016 (build-system guile-build-system)
1017 (native-inputs `(("guile" ,guile-2.2)))
1018 ;; https://savannah.nongnu.org/projects/guile-aa-tree
1019 (home-page "https://qlfiles.net/guile-aa-tree/")
1020 (synopsis "AA tree data structure for Guile")
1021 (description
1022 "This package provides an implementation of @dfn{AA trees}, a
1023self-balancing binary tree data structure, for Guile. It ensure @math{O(log
1024n)} worst case performance for core operations. The module provides
1025non-mutating insert, delete, and search operations, with support for
1026convenient nested tree operations.")
1027 (license license:gpl3+)))
1028
1029(define-public guile-simple-zmq
0d5e2c58
MO
1030 (let ((commit "b2ea97e5a0e7417ce718b27b6fd55a3146364b82")
1031 (revision "9"))
0791437f
RW
1032 (package
1033 (name "guile-simple-zmq")
1034 (version (git-version "0.0.0" revision commit))
1035 (source
1036 (origin
1037 (method git-fetch)
1038 (uri (git-reference
1039 (url "https://github.com/jerry40/guile-simple-zmq")
1040 (commit commit)))
1041 (sha256
1042 (base32
0d5e2c58 1043 "08qvcxx0njz9545xa0lq3wpf55v9cl9nbb640ry1lig11wpymqxb"))
0791437f 1044 (file-name (git-file-name name version))))
73303067 1045 (build-system gnu-build-system)
0791437f 1046 (arguments
73303067
MO
1047 '(#:make-flags
1048 '("GUILE_AUTO_COMPILE=0"))) ;to prevent guild warnings
1049
0791437f 1050 (native-inputs
b6bee63b 1051 `(("guile" ,guile-3.0)))
0791437f 1052 (inputs
73303067
MO
1053 `(("autoconf" ,autoconf)
1054 ("automake" ,automake)
1055 ("pkg-config" ,pkg-config)
1056 ("zeromq" ,zeromq)))
0791437f
RW
1057 (home-page "https://github.com/jerry40/guile-simple-zmq")
1058 (synopsis "Guile wrapper over ZeroMQ library")
1059 (description
1060 "This package provides a Guile programming interface to the ZeroMQ
1061messaging library.")
1062 (license license:gpl3+))))
1063
b6bee63b 1064(define-public guile2.2-simple-zmq
015bb1c8
LC
1065 (package
1066 (inherit guile-simple-zmq)
b6bee63b
LC
1067 (name "guile2.2-simple-zmq")
1068 (native-inputs `(("guile" ,guile-2.2)))))
1069
1070(define-public guile3.0-simple-zmq
1071 (deprecated-package "guile3.0-simple-zmq" guile-simple-zmq))
015bb1c8 1072
0791437f 1073(define-public jupyter-guile-kernel
c984b70c
JG
1074 (let ((commit "f25fb90b95529b17a006a807bd04e6aee12ea304")
1075 (revision "2"))
0791437f
RW
1076 (package
1077 (name "jupyter-guile-kernel")
1078 (version (git-version "0.0.0" revision commit))
1079 (source
1080 (origin
1081 (method git-fetch)
1082 (uri (git-reference
1083 (url "https://github.com/jerry40/guile-kernel")
1084 (commit commit)))
f1d4d79f 1085 (file-name (git-file-name name version))
0791437f
RW
1086 (sha256
1087 (base32
c984b70c 1088 "0zr1fasdb2yv9kn21yll993y9higqss4jnfs030ndhjb93raa9sr"))))
0791437f
RW
1089 (build-system guile-build-system)
1090 (arguments
1091 '(#:phases (modify-phases %standard-phases
1092 (add-after 'unpack 'set-openssl-file-name
1093 (lambda* (#:key inputs #:allow-other-keys)
1094 ;; Record the absolute file name of the 'openssl'
1095 ;; command.
1096 (substitute* "src/hmac.scm"
1097 (("openssl")
1098 (string-append (assoc-ref inputs "openssl")
1099 "/bin/openssl")))
1100 #t))
1101
1102 ;; XXX: The code uses 'include' to include its own source
1103 ;; files, and "-L src" isn't enough in this case.
1104 (add-before 'build 'chdir
1105 (lambda _ (chdir "src") #t))
1106 (add-after 'build 'chdir-back
1107 (lambda _ (chdir "..") #t))
1108
1109 (add-after 'install 'install-kernel
1110 (lambda* (#:key inputs outputs #:allow-other-keys)
1111 (let* ((out (assoc-ref outputs "out"))
1112 (json (assoc-ref inputs "guile-json"))
1113 (zmq (assoc-ref inputs "guile-simple-zmq"))
1114 (deps (list json zmq))
1115 (dir (string-append
1116 out "/share/jupyter/kernels/guile"))
1117 (effective (target-guile-effective-version)))
1118 ;; Install kernel.
1119 (install-file "src/kernel.json" dir)
1120
1121 ;; Fix hard-coded file name in the kernel.
1122 (substitute* (string-append dir "/kernel.json")
c984b70c 1123 (("/usr/local/.*/guile-jupyter-kernel.scm")
0791437f
RW
1124 (string-append out "/share/guile/site/"
1125 (target-guile-effective-version)
1126 "/guile-jupyter-kernel.scm"))
1127 (("\"guile\"")
1128 (string-append "\"" (assoc-ref inputs "guile")
1129 "/bin/guile\""))
1130 (("-s")
1131 ;; Add '-L' and '-C' flags so that the kernel
1132 ;; finds its dependencies.
1133 (let ((-L (map (lambda (item)
1134 (string-append "\"" item
1135 "/share/guile/site/"
1136 effective "\""))
1137 deps))
1138 (-C (map (lambda (item)
1139 (string-append "\"" item
1140 "/lib/guile/"
1141 effective
1142 "/site-ccache\""))
1143 deps)))
c984b70c
JG
1144 (string-append "--no-auto-compile\""
1145 (string-join -L ", \"-L\", "
1146 'prefix)
1147 (string-join -C ", \"-C\", "
1148 'prefix)
1149 ", \"-s"))))
0791437f
RW
1150 #t))))))
1151 (inputs
1152 `(("openssl" ,openssl)
c984b70c
JG
1153 ("guile" ,guile-3.0)
1154 ("guile-json" ,guile-json-3)
0791437f
RW
1155 ("guile-simple-zmq" ,guile-simple-zmq)))
1156 (synopsis "Guile kernel for the Jupyter Notebook")
1157 (description
1158 "This package provides a Guile 2.x kernel for the Jupyter Notebook. It
1159allows users to interact with the Guile REPL through Jupyter.")
1160 (home-page "https://github.com/jerry40/guile-kernel")
1161 (license license:gpl3+))))
1162
1163(define-public guile-sparql
1164 (package
1165 (name "guile-sparql")
22213308 1166 (version "0.0.8")
0791437f
RW
1167 (source (origin
1168 (method url-fetch)
1169 (uri (string-append
1170 "https://github.com/roelj/guile-sparql/releases/download/"
1171 version "/guile-sparql-" version ".tar.gz"))
1172 (sha256
22213308 1173 (base32 "1jf4972f9fpm0rd865xpnc9mzl3xv6vhfnp0iygadydy905z9nln"))))
0791437f 1174 (build-system gnu-build-system)
0791437f
RW
1175 (native-inputs
1176 `(("pkg-config" ,pkg-config)))
1177 (inputs
22213308 1178 `(("guile" ,guile-3.0)))
0791437f
RW
1179 (home-page "https://github.com/roelj/guile-sparql")
1180 (synopsis "SPARQL module for Guile")
1181 (description "This package provides the functionality to query a SPARQL
1182endpoint. Additionally, it provides an interface to write SPARQL queries
1183using S-expressions.")
1184 (license license:gpl3+)))
1185
1186(define-public guile-debbugs
1187 (package
1188 (name "guile-debbugs")
5144f542 1189 (version "0.0.3")
0791437f
RW
1190 (source (origin
1191 (method url-fetch)
1192 (uri (string-append "mirror://gnu/guile-debbugs/guile-debbugs-"
1193 version ".tar.gz"))
1194 (sha256
1195 (base32
5144f542 1196 "1cc63nw3xdfjrfk8c58r6d5lidmfq5cpqcy32yd5xp81yccprvn9"))))
0791437f 1197 (build-system gnu-build-system)
5144f542
RW
1198 (propagated-inputs
1199 `(("guile-email" ,guile-email)))
0791437f 1200 (native-inputs
cd23eb06 1201 `(("guile" ,guile-3.0)
0791437f
RW
1202 ("pkg-config" ,pkg-config)))
1203 (home-page "https://savannah.gnu.org/projects/guile-debbugs/")
1204 (synopsis "Guile interface to the Debbugs bug tracking service")
1205 (description
1206 "This package provides a Guile library to communicate with a Debbugs bug
1207tracker's SOAP service, such as @url{https://bugs.gnu.org}.")
1208 (license license:gpl3+)))
1209
1210(define-public guile-email
50771f5b
AI
1211 (package
1212 (name "guile-email")
223cb7c6 1213 (version "0.2.2")
50771f5b
AI
1214 (source
1215 (origin
1216 (method url-fetch)
1217 (uri (string-append
db18d87a
AI
1218 "https://guile-email.systemreboot.net/releases/guile-email-"
1219 version ".tar.lz"))
50771f5b
AI
1220 (sha256
1221 (base32
223cb7c6 1222 "1rc8r0fgvflnyq5ckl7ii8sghpsgpkzxa8vskjr1ak2kyar6m35k"))))
50771f5b
AI
1223 (build-system gnu-build-system)
1224 (native-inputs
1225 `(("pkg-config" ,pkg-config)
db18d87a 1226 ("lzip" ,lzip)))
50771f5b 1227 (inputs
ca6c1509 1228 `(("guile" ,guile-3.0)))
db18d87a 1229 (arguments
2c33a849 1230 '(#:make-flags '("GUILE_AUTO_COMPILE=0"))) ; to prevent guild warnings
db18d87a 1231 (home-page "https://guile-email.systemreboot.net")
50771f5b 1232 (synopsis "Guile email parser")
db18d87a
AI
1233 (description "guile-email is a collection of email utilities implemented
1234in pure guile. It supports parsing MIME (Multipurpose Internet Mail
1235Extensions) compliant email messages and reading emails from the mbox
1236format.")
50771f5b 1237 (license license:agpl3+)))
0791437f 1238
8b3b1f34 1239(define-public guile-email-latest
714a8faa 1240 (let ((commit "ca0520a33c9042a68691d85c6849f88412ca8357")
8b3b1f34
RW
1241 (revision "1"))
1242 (package
1243 (inherit guile-email)
1244 (name "guile-email-latest")
1245 (version (git-version "0.2.2" revision commit))
1246 (source
1247 (origin
1248 (method git-fetch)
1249 (uri (git-reference
1250 (url "https://git.systemreboot.net/guile-email")
1251 (commit commit)))
1252 (file-name (git-file-name name version))
1253 (sha256
1254 (base32
714a8faa 1255 "1l5mikalawq83786rnb9zky908ncsd5dna9vyz6bx6kc2frrl7xv"))))
8b3b1f34
RW
1256 (native-inputs
1257 `(("pkg-config" ,pkg-config)
1258 ("autoconf" ,autoconf)
1259 ("automake" ,automake)
1260 ("texinfo" ,texinfo))))))
1261
ca6c1509 1262(define-public guile2.2-email
63a847cb
CB
1263 (package
1264 (inherit guile-email)
ca6c1509
LC
1265 (name "guile2.2-email")
1266 (inputs `(("guile" ,guile-2.2)
63a847cb
CB
1267 ,@(alist-delete "guile" (package-inputs guile-email))))))
1268
ca6c1509
LC
1269(define-public guile3.0-email
1270 (deprecated-package "guile3.0-email" guile-email))
1271
0791437f 1272(define-public guile-newt
442a11f6
MO
1273 (package
1274 (name "guile-newt")
f52c1f5f 1275 (version "0.0.2")
442a11f6
MO
1276 (source (origin
1277 (method git-fetch)
1278 (uri (git-reference
1279 (url "https://gitlab.com/mothacehe/guile-newt")
1280 (commit version)))
1281 (file-name (git-file-name name version))
1282 (sha256
1283 (base32
f52c1f5f 1284 "1gksd1lzgjjh1p9vczghg8jw995d22hm34kbsiv8rcryirv2xy09"))))
442a11f6
MO
1285 (build-system gnu-build-system)
1286 (arguments
1287 '(#:make-flags
1288 '("GUILE_AUTO_COMPILE=0"))) ;to prevent guild warnings
1289 (inputs
b6bee63b 1290 `(("guile" ,guile-3.0)
442a11f6
MO
1291 ("newt" ,newt)))
1292 (native-inputs
1293 `(("autoconf" ,autoconf)
1294 ("automake" ,automake)
1295 ("pkg-config" ,pkg-config)))
1296 (synopsis "Guile bindings to Newt")
1297 (description
1298 "This package provides bindings for Newt, a programming library for
0791437f
RW
1299color text mode, widget based user interfaces. The bindings are written in pure
1300Scheme by using Guile’s foreign function interface.")
442a11f6
MO
1301 (home-page "https://gitlab.com/mothacehe/guile-newt")
1302 (license license:gpl3+)))
0791437f 1303
b6bee63b 1304(define-public guile2.2-newt
e7fc7746
LC
1305 (package
1306 (inherit guile-newt)
b6bee63b 1307 (name "guile2.2-newt")
318e1a93 1308 (inputs `(("guile" ,guile-2.2)
e7fc7746
LC
1309 ,@(alist-delete "guile" (package-inputs guile-newt))))))
1310
b6bee63b
LC
1311(define-public guile3.0-newt
1312 (deprecated-package "guile3.0-newt" guile-newt))
1313
0791437f
RW
1314(define-public guile-mastodon
1315 (package
1316 (name "guile-mastodon")
1317 (version "0.0.1")
1318 (source (origin
1319 (method git-fetch)
1320 (uri (git-reference
1321 (url "https://framagit.org/prouby/guile-mastodon.git")
1322 (commit (string-append "v" version))))
1323 (file-name (git-file-name name version))
1324 (sha256
1325 (base32
bbd26d60
MO
1326 "1vblf3d1bbwna3l09p2ap5y8ycvl549bz6whgk78imyfmn28ygry"))
1327 (modules '((guix build utils)))
1328 (snippet
1329 '(begin
1330 ;; Allow builds with Guile 3.0.
1331 (substitute* "configure.ac"
1332 (("^PKG_CHECK.*") "")
1333 (("^GUILE_PKG.*")
1334 "GUILE_PKG([3.0 2.2])\n"))
1335 #t))))
0791437f
RW
1336 (build-system gnu-build-system)
1337 (native-inputs
1338 `(("autoconf" ,autoconf)
1339 ("automake" ,automake)
bbd26d60
MO
1340 ("emacs" ,emacs-minimal)
1341 ("pkg-config" ,pkg-config)
1342 ("texinfo" ,texinfo)))
0791437f 1343 (inputs
bbd26d60 1344 `(("guile" ,guile-3.0)
0791437f 1345 ("gnutls" ,gnutls)
bbd26d60 1346 ("guile-json" ,guile-json-4)))
0791437f
RW
1347 (home-page "https://framagit.org/prouby/guile-mastodon")
1348 (synopsis "Guile Mastodon REST API module")
1349 (description "This package provides Guile modules to access the
1350@uref{https://docs.joinmastodon.org/api/, REST API of Mastodon}, a federated
1351microblogging service.")
1352 (license license:gpl3+)))
1353
0791437f 1354(define-public guile-parted
dbcd503c
MO
1355 (package
1356 (name "guile-parted")
575032c8 1357 (version "0.0.4")
dbcd503c
MO
1358 (source (origin
1359 (method git-fetch)
1360 (uri (git-reference
1361 (url "https://gitlab.com/mothacehe/guile-parted")
1362 (commit version)))
1363 (file-name (git-file-name name version))
1364 (sha256
1365 (base32
575032c8 1366 "0b7h8psfm9gmmwb65pp5zwzglvwnfmw5j40g09hhf3f7kwxc0mv2"))
f6145358 1367 (modules '((guix build utils)))))
dbcd503c
MO
1368 (build-system gnu-build-system)
1369 (arguments
1370 '(#:make-flags
1371 '("GUILE_AUTO_COMPILE=0"))) ;to prevent guild warnings
1372 (inputs
b6bee63b 1373 `(("guile" ,guile-3.0)
dbcd503c
MO
1374 ("parted" ,parted)))
1375 (propagated-inputs
1376 `(("guile-bytestructures" ,guile-bytestructures)))
1377 (native-inputs
1378 `(("autoconf" ,autoconf)
1379 ("automake" ,automake)
1380 ("pkg-config" ,pkg-config)))
1381 (synopsis "Guile bindings to GNU Parted")
1382 (description
1383 "This package provides bindings for GNU Parted library, a C library
1384allowing disk partition tables creation and manipulation. The bindings are
0791437f 1385written in pure Scheme by using Guile's foreign function interface.")
dbcd503c
MO
1386 (home-page "https://gitlab.com/mothacehe/guile-parted")
1387 (license license:gpl3+)))
0791437f 1388
b6bee63b 1389(define-public guile2.2-parted
e5b95558
LC
1390 (package
1391 (inherit guile-parted)
b6bee63b 1392 (name "guile2.2-parted")
318e1a93 1393 (inputs `(("guile" ,guile-2.2)
e5b95558
LC
1394 ,@(alist-delete "guile" (package-inputs guile-parted))))
1395 (propagated-inputs
b6bee63b
LC
1396 `(("guile-bytestructures" ,guile2.2-bytestructures)))))
1397
1398(define-public guile3.0-parted
1399 (deprecated-package "guile3.0-parted" guile-parted))
e5b95558 1400
0791437f
RW
1401(define-public guile-xosd
1402 (package
1403 (name "guile-xosd")
1404 (version "0.2.1")
1405 (source (origin
1406 (method url-fetch)
1407 (uri (string-append "https://github.com/alezost/" name
1408 "/releases/download/v" version
1409 "/" name "-" version ".tar.gz"))
1410 (sha256
1411 (base32
1412 "1ri5065c16kmgrf2pysn2ymxjqi5302lhpb07wkl1jr75ym8fn8p"))))
1413 (build-system gnu-build-system)
1414 (native-inputs
1415 `(("pkg-config" ,pkg-config)))
1416 (inputs
1417 `(("guile" ,guile-2.2)
1418 ("libx11" ,libx11)
1419 ("libxext" ,libxext)
1420 ("libxinerama" ,libxinerama)
1421 ("xosd" ,xosd)))
1422 (home-page "https://github.com/alezost/guile-xosd")
1423 (synopsis "XOSD bindings for Guile")
1424 (description
1425 "Guile-XOSD provides Guile bindings for @code{libxosd},
1426@uref{http://sourceforge.net/projects/libxosd/, the X On Screen Display
1427library}.")
1428 (license license:gpl3+)))
1429
1430(define-public guile-dbi
1431 (package
1432 (name "guile-dbi")
1433 (version "2.1.6")
1434 (source (origin
1435 (method url-fetch)
1436 (uri (string-append
1437 "http://download.gna.org/guile-dbi/guile-dbi-"
1438 version ".tar.gz"))
1439 (sha256
1440 (base32
1441 "116njrprhgrsv1qm904sp3b02rq01fx639r433d657gyhw3x159n"))))
1442 (build-system gnu-build-system)
1443 (arguments
1444 '(#:configure-flags
1445 (list (string-append
1446 "--with-guile-site-dir=" %output "/share/guile/site/2.2"))
1447 #:make-flags
406ef442
CB
1448 (list (string-append
1449 "LDFLAGS=-Wl,-rpath=" %output "/lib:"
1450 (assoc-ref %build-inputs "guile-dbd-sqlite3") "/lib" ":"
1451 (assoc-ref %build-inputs "guile-dbd-postgresql") "/lib"))
0791437f
RW
1452 #:phases
1453 (modify-phases %standard-phases
1454 (add-after 'install 'patch-extension-path
1455 (lambda* (#:key outputs #:allow-other-keys)
1456 (let* ((out (assoc-ref outputs "out"))
1457 (dbi.scm (string-append
1458 out "/share/guile/site/2.2/dbi/dbi.scm"))
1459 (ext (string-append out "/lib/libguile-dbi")))
1460 (substitute* dbi.scm (("libguile-dbi") ext))
1461 #t))))))
1462 (inputs
406ef442
CB
1463 `(("guile-dbd-sqlite3" ,guile-dbd-sqlite3)
1464 ("guile-dbd-postgresql" ,guile-dbd-postgresql))) ; only shared library, no scheme files
0791437f
RW
1465 (propagated-inputs
1466 `(("guile" ,guile-2.2)))
1467 (synopsis "Guile database abstraction layer")
1468 (home-page "http://home.gna.org/guile-dbi/guile-dbi.html")
1469 (description
1470 "guile-dbi is a library for Guile that provides a convenient interface to
1471SQL databases. Database programming with guile-dbi is generic in that the same
1472programming interface is presented regardless of which database system is used.
1473It currently supports MySQL, Postgres and SQLite3.")
1474 (license license:gpl2+)))
1475
1476(define guile-dbi-bootstrap
1477 (package
1478 (inherit guile-dbi)
1479 (name "guile-dbi-bootstrap")
1480 (inputs '())
1481 (arguments
1482 (substitute-keyword-arguments (package-arguments guile-dbi)
1483 ((#:make-flags _) '(list))))))
1484
1485(define-public guile-dbd-sqlite3
1486 (package
1487 (name "guile-dbd-sqlite3")
1488 (version "2.1.6")
1489 (source (origin
1490 (method url-fetch)
1491 (uri (string-append
1492 "http://download.gna.org/guile-dbi/guile-dbd-sqlite3-"
1493 version ".tar.gz"))
1494 (sha256
1495 (base32
1496 "0rg71jchxd2y8x496s8zmfmikr5g8zxi8zv2ar3f7a23pph92iw2"))))
1497 (build-system gnu-build-system)
1498 (native-inputs
1499 `(("pkg-config" ,pkg-config)
1500 ("guile-dbi-bootstrap" ,guile-dbi-bootstrap))) ; only required for headers
1501 (inputs
1502 `(("sqlite" ,sqlite)
1503 ("zlib" ,(@ (gnu packages compression) zlib))))
1504 (synopsis "Guile DBI driver for SQLite")
1505 (home-page "https://github.com/jkalbhenn/guile-dbd-sqlite3")
1506 (description
1507 "guile-dbi is a library for Guile that provides a convenient interface to
1508SQL databases. This package implements the interface for SQLite.")
1509 (license license:gpl2+)))
1510
406ef442
CB
1511(define-public guile-dbd-postgresql
1512 (let ((commit "e97589b6b018b206c901e4cc24db463407a4036b")
1513 (revision 0))
1514 (package
1515 (name "guile-dbd-postgresql")
1516 (version (string-append
1517 "2.1.6-" (number->string revision) "." (string-take commit 7)))
1518 (source
1519 (origin
1520 (method git-fetch)
1521 (uri (git-reference
b0e7b699 1522 (url "https://github.com/opencog/guile-dbi")
406ef442
CB
1523 (commit commit)))
1524 (file-name (git-file-name name version))
1525 (sha256
1526 (base32 "0n1gv9a0kdys10a4qmnrwvg5sydwb03880asri4gqdchcj3fimni"))))
1527 (build-system gnu-build-system)
1528 (arguments
1529 '(#:phases
1530 (modify-phases %standard-phases
1531 (add-after 'unpack 'chdir
1532 (lambda _
1533 ;; The upstream Git repository contains all the code, so change
1534 ;; to the relevant directory.
1535 (chdir "guile-dbd-postgresql")
1536 #t))
1537 (add-after 'chdir 'patch-src/Makefile.am
1538 (lambda* (#:key inputs #:allow-other-keys)
1539 (substitute* "src/Makefile.am"
1540 (("/usr/include")
1541 (string-append (assoc-ref inputs "postgresql") "/include")))
1542 #t))
1543 (add-after 'patch-src/Makefile.am 'patch-src
1544 (lambda _
1545 (substitute* "src/guile-dbd-postgresql.c"
1546 (("postgresql/libpq-fe\\.h") "libpq-fe.h"))
1547 #t)))))
1548 (native-inputs
1549 `(("pkg-config" ,pkg-config)
1550 ("automake" ,automake)
1551 ("autoconf" ,autoconf)
1552 ("perl" ,perl)
1553 ("libtool" ,libtool)
1554 ("guile-dbi-bootstrap" ,guile-dbi-bootstrap)))
1555 (inputs
1556 `(("postgresql" ,postgresql)
1557 ("zlib" ,zlib)))
1558 (synopsis "Guile DBI driver for PostgreSQL")
1559 (home-page
1560 "https://github.com/opencog/guile-dbi/tree/master/guile-dbd-postgresql")
1561 (description
1562 "@code{guile-dbi} is a library for Guile that provides a convenient
1563interface to SQL databases. This package implements the interface for
1564PostgreSQL.")
1565 (license license:gpl2+))))
1566
0791437f
RW
1567(define-public guile-config
1568 (package
1569 (name "guile-config")
aed0d0fd 1570 (version "0.4.2")
0791437f
RW
1571 (source
1572 (origin
1573 (method git-fetch)
1574 (uri (git-reference
1575 (url "https://gitlab.com/a-sassmannshausen/guile-config")
529d1d96 1576 (commit version)))
91e29547
AS
1577 (file-name (git-file-name name version))
1578 (sha256 (base32
aed0d0fd 1579 "09028ylbddjdp3d67zdjz3pnsjqz6zs2bfck5rr3dfaa0qjap40n"))))
0791437f
RW
1580 (build-system gnu-build-system)
1581 (native-inputs
1582 `(("autoconf" ,autoconf)
1583 ("automake" ,automake)
1584 ("pkg-config" ,pkg-config)
1585 ("texinfo" ,texinfo)))
b6bee63b 1586 (inputs `(("guile" ,guile-3.0)))
0791437f
RW
1587 (synopsis
1588 "Guile application configuration parsing library.")
1589 (description
1590 "Guile Config is a library providing a declarative approach to
1591application configuration specification. The library provides clean
1592configuration declaration forms, and processors that take care of:
1593configuration file creation; configuration file parsing; command-line
1594parameter parsing using getopt-long; basic GNU command-line parameter
1595generation (--help, --usage, --version); automatic output generation for the
1596above command-line parameters.")
1597 (home-page
1598 "https://gitlab.com/a-sassmannshausen/guile-config")
1599 (license license:gpl3+)))
1600
b6bee63b 1601(define-public guile2.2-config
0ac6b836
AS
1602 (package
1603 (inherit guile-config)
b6bee63b
LC
1604 (name "guile2.2-config")
1605 (inputs `(("guile" ,guile-2.2)
0ac6b836
AS
1606 ,@(alist-delete "guile" (package-inputs guile-config))))))
1607
b6bee63b
LC
1608(define-public guile3.0-config
1609 (deprecated-package "guile3.0-config" guile-config))
1610
0791437f
RW
1611(define-public guile-hall
1612 (package
1613 (name "guile-hall")
63fe1dc0 1614 (version "0.3.1")
0791437f 1615 (source
feb11b08
RW
1616 (origin
1617 (method git-fetch)
1618 (uri (git-reference
1619 (url "https://gitlab.com/a-sassmannshausen/guile-hall")
a3dfe052 1620 (commit version)))
63fe1dc0 1621 (file-name "guile-hall-0.3.1-checkout")
a3dfe052 1622 (sha256
63fe1dc0 1623 (base32 "1s24nigdra6rvclvy15l2aw00c3aq9vv8qwxylzs60darbl36206"))))
0791437f
RW
1624 (build-system gnu-build-system)
1625 (arguments
63bf0afd
AS
1626 `(#:modules
1627 ((ice-9 match)
1628 (ice-9 ftw)
1629 ,@%gnu-build-system-modules)
1630 #:phases
1631 (modify-phases
1632 %standard-phases
1633 (add-after 'install 'hall-wrap-binaries
1634 (lambda* (#:key inputs outputs #:allow-other-keys)
1635 (let* ((compiled-dir
1636 (lambda (out version)
1637 (string-append
1638 out "/lib/guile/" version "/site-ccache")))
1639 (uncompiled-dir
1640 (lambda (out version)
1641 (string-append
1642 out "/share/guile/site"
1643 (if (string-null? version) "" "/") version)))
1644 (dep-path
1645 (lambda (env modules path)
1646 (list env ":" 'prefix
1647 (cons modules
1648 (map (lambda (input)
1649 (string-append
1650 (assoc-ref inputs input)
1651 path))
1652 ,''("guile-config"))))))
1653 (out (assoc-ref outputs "out"))
1654 (bin (string-append out "/bin/"))
1655 (site (uncompiled-dir out "")))
1656 (match (scandir site)
1657 (("." ".." version)
1658 (for-each
1659 (lambda (file)
1660 (wrap-program
1661 (string-append bin file)
1662 (dep-path
1663 "GUILE_LOAD_PATH"
1664 (uncompiled-dir out version)
1665 (uncompiled-dir "" version))
1666 (dep-path
1667 "GUILE_LOAD_COMPILED_PATH"
1668 (compiled-dir out version)
1669 (compiled-dir "" version))))
1670 ,''("hall"))
1671 #t))))))))
0791437f 1672 (native-inputs
63bf0afd
AS
1673 `(("autoconf" ,autoconf)
1674 ("automake" ,automake)
1675 ("pkg-config" ,pkg-config)
1676 ("texinfo" ,texinfo)))
b6bee63b 1677 (inputs `(("guile" ,guile-3.0)))
0791437f 1678 (propagated-inputs
3c3e6620 1679 `(("guile-config" ,guile-config)))
0791437f
RW
1680 (synopsis "Guile project tooling")
1681 (description
3c3e6620
RW
1682 "Hall is a command-line application and a set of Guile libraries that
1683allow you to quickly create and publish Guile projects. It allows you to
1684transparently support the GNU build system, manage a project hierarchy &
1685provides tight coupling to Guix.")
1686 (home-page "https://gitlab.com/a-sassmannshausen/guile-hall")
06085fac 1687 (license license:gpl3+)))
0791437f 1688
b6bee63b 1689(define-public guile2.2-hall
df18ea6f
AS
1690 (package
1691 (inherit guile-hall)
b6bee63b
LC
1692 (name "guile2.2-hall")
1693 (inputs `(("guile" ,guile-2.2)
df18ea6f
AS
1694 ,@(alist-delete "guile" (package-inputs guile-hall))))
1695 (propagated-inputs
b6bee63b 1696 `(("guile-config" ,guile2.2-config)
df18ea6f
AS
1697 ,@(alist-delete "guile-config"
1698 (package-propagated-inputs guile-hall))))))
1699
b6bee63b
LC
1700(define-public guile3.0-hall
1701 (deprecated-package "guile3.0-hall" guile-hall))
1702
0791437f
RW
1703(define-public guile-ics
1704 (package
1705 (name "guile-ics")
1706 (version "0.2.0")
1707 (source (origin
1708 (method git-fetch)
1709 (uri (git-reference
1710 (url "https://github.com/artyom-poptsov/guile-ics")
1711 (commit (string-append "v" version))))
1712 (file-name (string-append name "-" version "-checkout"))
1713 (sha256
1714 (base32
6713589d
LC
1715 "0qjjvadr7gibdq9jvwkmlkb4afsw9n2shfj9phpiadinxk3p4m2g"))
1716 (modules '((guix build utils)))
1717 (snippet
1718 '(begin
1719 ;; Allow builds with Guile 3.0.
1720 (substitute* "configure.ac"
1721 (("^GUILE_PKG.*")
1722 "GUILE_PKG([3.0 2.2 2.0])\n"))
1723 #t))))
0791437f
RW
1724 (build-system gnu-build-system)
1725 (native-inputs
ce10e2b3 1726 `(("autoconf" ,autoconf)
0791437f
RW
1727 ("automake" ,automake)
1728 ("texinfo" ,texinfo)
1729 ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'.
1730 ("gettext" ,gettext-minimal)
1731 ("pkg-config" ,pkg-config)))
b6bee63b 1732 (inputs `(("guile" ,guile-3.0) ("which" ,which)))
0791437f
RW
1733 (propagated-inputs `(("guile-lib" ,guile-lib)))
1734 (home-page "https://github.com/artyom-poptsov/guile-ics")
1735 (synopsis "Guile parser library for the iCalendar format")
1736 (description
1737 "Guile-ICS is an iCalendar (RFC5545) format parser library written in
1738pure Scheme. The library can be used to read and write iCalendar data.
1739
1740The library is shipped with documentation in Info format and usage examples.")
1741 (license license:gpl3+)))
1742
b6bee63b 1743(define-public guile2.2-ics
6713589d
LC
1744 (package
1745 (inherit guile-ics)
b6bee63b
LC
1746 (name "guile2.2-ics")
1747 (inputs `(("guile" ,guile-2.2)
6713589d 1748 ,@(alist-delete "guile" (package-inputs guile-ics))))
b6bee63b
LC
1749 (propagated-inputs `(("guile-lib" ,guile2.2-lib)))))
1750
1751(define-public guile3.0-ics
1752 (deprecated-package "guile3.0-ics" guile-ics))
6713589d 1753
0791437f
RW
1754(define-public guile-wisp
1755 (package
1756 (name "guile-wisp")
8b030edf 1757 (version "1.0.3")
0791437f 1758 (source (origin
8b030edf
AB
1759 (method hg-fetch)
1760 (uri (hg-reference
1761 (url "https://hg.sr.ht/~arnebab/wisp")
1762 (changeset (string-append "v" version))))
1763 (file-name (git-file-name name version))
0791437f
RW
1764 (sha256
1765 (base32
8b030edf 1766 "10g97jz3ahpb5mg933ajsc3pa9jxlg14f42yf01qwx0dwq1b06d5"))))
0791437f
RW
1767 (build-system gnu-build-system)
1768 (arguments
1769 `(#:modules ((guix build gnu-build-system)
15218d4e 1770 ((guix build emacs-build-system) #:prefix emacs:)
0791437f 1771 (guix build utils)
15218d4e 1772 (guix build emacs-utils)
0791437f
RW
1773 (ice-9 rdelim)
1774 (ice-9 popen))
15218d4e
RW
1775 #:imported-modules (,@%gnu-build-system-modules
1776 (guix build emacs-build-system)
1777 (guix build emacs-utils))
0791437f
RW
1778 #:phases
1779 (modify-phases %standard-phases
8b030edf 1780 (replace 'bootstrap
b6bee63b 1781 (lambda _
8b030edf 1782 (invoke "autoreconf" "-vif")
b6bee63b 1783 #t))
0791437f
RW
1784 (add-before 'configure 'patch-/usr/bin/env
1785 (lambda _
1786 (substitute* "Makefile.in"
65610f73 1787 (("/usr/bin/env bash") (which "bash")))
0791437f
RW
1788 #t))
1789 ;; auto compilation breaks, but if we set HOME to /tmp,
1790 ;; that works ok
1791 (add-before 'check 'auto-compile-hacky-workaround
1792 (lambda _ (setenv "HOME" "/tmp") #t))
1793 (add-after 'install 'install-go-files
1794 (lambda* (#:key outputs inputs #:allow-other-keys)
1795 (let* ((out (assoc-ref outputs "out"))
1796 (effective (read-line
1797 (open-pipe* OPEN_READ
1798 "guile" "-c"
1799 "(display (effective-version))")))
1800 (module-dir (string-append out "/share/guile/site/"
1801 effective))
1802 (object-dir (string-append out "/lib/guile/" effective
1803 "/site-ccache"))
1804 (prefix (string-length module-dir)))
1805 ;; compile to the destination
1806 (for-each (lambda (file)
1807 (let* ((base (string-drop (string-drop-right file 4)
1808 prefix))
1809 (go (string-append object-dir base ".go")))
1810 (invoke "guild" "compile" "-L" module-dir
1811 file "-o" go)))
1812 (find-files module-dir "\\.scm$"))
15218d4e
RW
1813 #t)))
1814 (add-after 'install 'install-emacs-files
1815 (assoc-ref emacs:%standard-phases 'install))
1816 (add-after 'install-emacs-files 'compile-emacs-files
1817 (assoc-ref emacs:%standard-phases 'build))
1818 (add-after 'compile-emacs-files 'make-autoloads
1819 (assoc-ref emacs:%standard-phases 'make-autoloads)))))
17f90b67 1820 (home-page "https://www.draketo.de/english/wisp")
0791437f 1821 (inputs
b6bee63b 1822 `(("guile" ,guile-3.0)))
0791437f 1823 (native-inputs
8b030edf
AB
1824 `(("autoconf" ,autoconf)
1825 ("automake" ,automake)
1826 ("emacs" ,emacs-minimal)
15218d4e 1827 ("python" ,python)
0791437f
RW
1828 ("pkg-config" ,pkg-config)))
1829 (synopsis "Whitespace to lisp syntax for Guile")
1830 (description "Wisp is a syntax for Guile which provides a Python-like
1831whitespace-significant language. It may be easier on the eyes for some
1832users and in some situations.")
1833 (license license:gpl3+)))
1834
b6bee63b 1835(define-public guile2.2-wisp
b0b725ed
RW
1836 (package
1837 (inherit guile-wisp)
b6bee63b
LC
1838 (name "guile2.2-wisp")
1839 (inputs `(("guile" ,guile-2.2)))))
1840
1841(define-public guile3.0-wisp
1842 (deprecated-package "guile3.0-wisp" guile-wisp))
b0b725ed 1843
84e31f3c
RW
1844(define-public guile-udev
1845 (package
1846 (name "guile-udev")
1847 (version "0.1.0")
1848 (source (origin
1849 (method git-fetch)
1850 (uri (git-reference
1851 (url "https://github.com/artyom-poptsov/guile-udev")
1852 (commit (string-append "v" version))))
1853 (file-name (git-file-name name version))
1854 (sha256
1855 (base32
1856 "1l6csncjqnx58c6c3wdl7rshnhk4pzhjq2q8lnkg483564s9w5py"))))
1857 (build-system gnu-build-system)
1858 (native-inputs
ce10e2b3 1859 `(("autoconf" ,autoconf)
84e31f3c
RW
1860 ("automake" ,automake)
1861 ("gettext" ,gettext-minimal)
1862 ("libtool" ,libtool)
1863 ("texinfo" ,texinfo)
1864 ("pkg-config" ,pkg-config)
1865 ("which" ,which)))
1866 (inputs
1867 `(("guile" ,guile-3.0)
1868 ("eudev" ,eudev)))
1869 (home-page "https://github.com/artyom-poptsov/guile-udev")
1870 (synopsis "Guile bindings to libudev")
1871 (description
1872 "Guile-Udev provides GNU Guile bindings to libudev.")
1873 (license license:gpl3+)))
1874
0791437f
RW
1875(define-public guile-sly
1876 (package
1877 (name "guile-sly")
1878 (version "0.1")
1879 (source (origin
1880 (method url-fetch)
1881 (uri (string-append "https://files.dthompson.us/sly/sly-"
1882 version ".tar.gz"))
1883 (sha256
1884 (base32
1885 "1svzlbz2vripmyq2kjh0rig16bsrnbkwbsm558pjln9l65mcl4qq"))
1886 (modules '((guix build utils)))
1887 (snippet
1888 '(begin
1889 (substitute* "configure"
1890 (("_guile_required_version=\"2.0.11\"")
1891 "_guile_required_version=\"2\"")
1892 (("ac_subst_vars='")
1893 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
1894 (substitute* (find-files "." "Makefile.in")
1895 (("moddir = .*$")
1896 (string-append
1897 "moddir = "
1898 "$(prefix)/share/guile/site/@GUILE_EFFECTIVE_VERSION@\n"))
1899 (("godir = .*$")
1900 (string-append
1901 "godir = "
1902 "$(prefix)/lib/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n")))
1903 #t))))
1904 (build-system gnu-build-system)
1905 (arguments
1906 '(#:configure-flags
1907 (list (string-append "--with-libfreeimage-prefix="
1908 (assoc-ref %build-inputs "freeimage"))
1909 (string-append "--with-libgslcblas-prefix="
1910 (assoc-ref %build-inputs "gsl")))))
1911 (native-inputs
1912 `(("pkg-config" ,pkg-config)))
1913 (propagated-inputs
1914 `(("guile-sdl" ,guile-sdl)
1915 ("guile-opengl" ,guile-opengl)))
1916 (inputs
1917 `(("guile" ,guile-2.2)
1918 ("gsl" ,gsl)
1919 ("freeimage" ,freeimage)
1920 ("mesa" ,mesa)))
1921 (synopsis "2D/3D game engine for GNU Guile")
1922 (description "Sly is a 2D/3D game engine written in Guile Scheme. Sly
1923features a functional reactive programming interface and live coding
1924capabilities.")
1925 (home-page "https://dthompson.us/projects/sly.html")
1926 (license license:gpl3+)))
1927
dfe277a5 1928(define-public g-golf
f2d36d4f
MR
1929 (let ((commit "ef830107b9765bd6a2da848d0cbe45e11374c0b5")
1930 (revision "839"))
dfe277a5
VS
1931 (package
1932 (name "g-golf")
30d59b31
MR
1933 (version (git-version "0.1.0" revision commit))
1934 (source
1935 (origin
1936 (method git-fetch)
1937 (uri (git-reference
1938 (url "https://git.savannah.gnu.org/git/g-golf.git")
1939 (commit commit)))
1940 (file-name (git-file-name name version))
1941 (sha256
f2d36d4f 1942 (base32 "0r472hvmf447kqvkahp1wy4irb5gy8y793hm8r9rc511smdx66cw"))))
dfe277a5
VS
1943 (build-system gnu-build-system)
1944 (native-inputs
1945 `(("autoconf" ,autoconf)
1946 ("automake" ,automake)
1947 ("texinfo" ,texinfo)
1948 ("gettext" ,gettext-minimal)
1949 ("libtool" ,libtool)
85fcceee
MR
1950 ("pkg-config" ,pkg-config)
1951 ("xorg-server" ,xorg-server)))
dfe277a5
VS
1952 (inputs
1953 `(("guile" ,guile-2.2)
85fcceee 1954 ("guile-lib" ,guile2.2-lib)
dfe277a5
VS
1955 ("clutter" ,clutter)
1956 ("gtk" ,gtk+)
1957 ("glib" ,glib)))
1958 (propagated-inputs
1959 `(("gobject-introspection" ,gobject-introspection)))
1960 (arguments
1961 `(#:phases
1962 (modify-phases %standard-phases
1963 (add-before 'configure 'tests-work-arounds
1964 (lambda* (#:key inputs #:allow-other-keys)
1965 ;; In build environment, There is no /dev/tty
1966 (substitute*
1967 "test-suite/tests/gobject.scm"
1968 (("/dev/tty") "/dev/null"))))
1969 (add-before 'configure 'substitute-libs
1970 (lambda* (#:key inputs outputs #:allow-other-keys)
1971 (let* ((get (lambda (key lib)
1972 (string-append (assoc-ref inputs key) "/lib/" lib)))
1973 (libgi (get "gobject-introspection" "libgirepository-1.0"))
1974 (libglib (get "glib" "libglib-2.0"))
1975 (libgobject (get "glib" "libgobject-2.0"))
1976 (libgdk (get "gtk" "libgdk-3")))
1977 (substitute* "configure"
1978 (("SITEDIR=\"\\$datadir/g-golf\"")
1979 "SITEDIR=\"$datadir/guile/site/$GUILE_EFFECTIVE_VERSION\"")
1980 (("SITECCACHEDIR=\"\\$libdir/g-golf/")
1981 "SITECCACHEDIR=\"$libdir/"))
1982 (substitute* "g-golf/init.scm"
1983 (("libgirepository-1.0") libgi)
1984 (("libglib-2.0") libglib)
1985 (("libgdk-3") libgdk)
1986 (("libgobject-2.0") libgobject)
1987 (("\\(dynamic-link \"libg-golf\"\\)")
1988 (format #f "~s"
1989 `(dynamic-link
1990 (format #f "~alibg-golf"
1991 (if (getenv "GUILE_GGOLF_UNINSTALLED")
1992 ""
1993 ,(format #f "~a/lib/"
1994 (assoc-ref outputs "out"))))))))
1995 (setenv "GUILE_AUTO_COMPILE" "0")
1996 (setenv "GUILE_GGOLF_UNINSTALLED" "1")
85fcceee
MR
1997 #t)))
1998 (add-before 'check 'start-xorg-server
1999 (lambda* (#:key inputs #:allow-other-keys)
2000 ;; The test suite requires a running X server.
2001 (system (format #f "~a/bin/Xvfb :1 &"
2002 (assoc-ref inputs "xorg-server")))
2003 (setenv "DISPLAY" ":1")
2004 #t)))))
dfe277a5
VS
2005 (home-page "https://www.gnu.org/software/g-golf/")
2006 (synopsis "Guile bindings for GObject Introspection")
2007 (description
2008 "G-Golf (Gnome: (Guile Object Library for)) is a library for developing
2009modern applications in Guile Scheme. It comprises a direct binding to the
2010GObject Introspection API and higher-level functionality for importing Gnome
2011libraries and making GObject classes (and methods) available in Guile's
2012object-oriented programming system, GOOPS.")
2013 (license license:lgpl3+))))
2014
0791437f
RW
2015(define-public g-wrap
2016 (package
2017 (name "g-wrap")
2018 (version "1.9.15")
2019 (source (origin
2020 (method url-fetch)
2021 (uri (string-append "mirror://savannah/g-wrap/g-wrap-"
2022 version ".tar.gz"))
2023 (sha256
2024 (base32
2025 "0ak0bha37dfpj9kmyw1r8fj8nva639aw5xr66wr5gd3l1rqf5xhg"))))
2026 (build-system gnu-build-system)
2027 (native-inputs
2028 `(("pkg-config" ,pkg-config)))
2029 (propagated-inputs
2030 `(("guile" ,guile-2.2)
2031 ("guile-lib" ,guile-lib)))
2032 (inputs
2033 `(("libffi" ,libffi)))
2034 (arguments
2035 `(#:configure-flags '("--disable-Werror")
2036 #:phases
2037 (modify-phases %standard-phases
2038 (add-before 'configure 'pre-configure
2039 (lambda* (#:key outputs #:allow-other-keys)
2040 (let ((out (assoc-ref outputs "out")))
2041 (substitute* (find-files "." "^Makefile.in$")
2042 (("guilemoduledir =.*guile/site" all)
2043 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))
2044 #t))))))
2045 (synopsis "Generate C bindings for Guile")
2046 (description "G-Wrap is a tool and Guile library for generating function
2047wrappers for inter-language calls. It currently only supports generating Guile
2048wrappers for C functions. Given a definition of the types and prototypes for
2049a given C interface, G-Wrap will automatically generate the C code that
2050provides access to that interface and its types from the Scheme level.")
2051 (home-page "https://www.nongnu.org/g-wrap/index.html")
2052 (license license:lgpl2.1+)))
2053
2054(define-public guile-miniadapton
2055 (let ((commit "1b5749422304567c96ac5367f2221dda9eff5880")
2056 (revision "1"))
2057 (package
2058 (name "guile-miniadapton")
2059 (version (string-append "0-" revision "." (string-take commit 9)))
2060 (source (origin
2061 (method git-fetch)
2062 (uri (git-reference
b0e7b699 2063 (url "https://github.com/fisherdj/miniAdapton")
0791437f
RW
2064 (commit commit)))
2065 (file-name (string-append name "-" version "-checkout"))
2066 (sha256
2067 (base32
2068 "09q51zkw2fypad5xixskfzw2cjhjgs5cswdp3i7cpp651rb3zndh"))))
2069 (build-system guile-build-system)
2070 (native-inputs
2071 `(("guile" ,guile-2.2)))
2072 (home-page "https://github.com/fisherdj/miniAdapton")
2073 (synopsis "Minimal implementation of incremental computation in Guile
2074Scheme")
2075 (description "This package provides a complete Scheme implementation of
2076miniAdapton, which implements the core functionality of the Adapton system for
2077incremental computation (also known as self-adjusting computation). Like
2078Adapton, miniAdapton allows programmers to safely combine mutation and
2079memoization. miniAdapton is built on top of an even simpler system,
2080microAdapton. Both miniAdapton and microAdapton are designed to be easy to
2081understand, extend, and port to host languages other than Scheme.")
2082 (license license:expat))))
2083
2084(define-public guile-reader
2085 (package
2086 (name "guile-reader")
a7c69419 2087 (version "0.6.3")
0791437f
RW
2088 (source (origin
2089 (method url-fetch)
2090 (uri (string-append "mirror://savannah/guile-reader/guile-reader-"
2091 version ".tar.gz"))
2092 (sha256
2093 (base32
a7c69419 2094 "1fyjckmygkhq22lq8nqc86yl5zzbqd7a944dnz5c1f6vx92b9hiq"))))
0791437f
RW
2095 (build-system gnu-build-system)
2096 (native-inputs `(("pkgconfig" ,pkg-config)
a7c69419 2097 ("gperf" ,gperf)))
c20e697e 2098 (inputs `(("guile" ,guile-3.0)))
0791437f
RW
2099 (synopsis "Framework for building readers for GNU Guile")
2100 (description
2101 "Guile-Reader is a simple framework for building readers for GNU Guile.
2102
2103The idea is to make it easy to build procedures that extend Guile’s read
2104procedure. Readers supporting various syntax variants can easily be written,
2105possibly by re-using existing “token readers” of a standard Scheme
2106readers. For example, it is used to implement Skribilo’s R5RS-derived
2107document syntax.
2108
2109Guile-Reader’s approach is similar to Common Lisp’s “read table”, but
2110hopefully more powerful and flexible (for instance, one may instantiate as
2111many readers as needed).")
2112 (home-page "https://www.nongnu.org/guile-reader/")
2113 (license license:gpl3+)))
2114
c20e697e
LC
2115(define-public guile2.2-reader
2116 (package
2117 (inherit guile-reader)
2118 (name "guile2.2-reader")
2119 (inputs `(("guile" ,guile-2.2)))))
2120
0791437f
RW
2121(define-public guile-ncurses
2122 (package
2123 (name "guile-ncurses")
2b155e3a 2124 (version "3.0")
0791437f
RW
2125 (source (origin
2126 (method url-fetch)
2127 (uri (string-append "mirror://gnu/guile-ncurses/guile-ncurses-"
2128 version ".tar.gz"))
2129 (sha256
2130 (base32
2b155e3a 2131 "038xbffalhymg26lvmzgf7ljilxz2f2zmqg5r5nfzbipfbprwjhf"))))
0791437f
RW
2132 (build-system gnu-build-system)
2133 (inputs `(("ncurses" ,ncurses)
b01a73b0 2134 ("guile" ,guile-3.0)))
0791437f
RW
2135 (native-inputs `(("pkg-config" ,pkg-config)))
2136 (arguments
3c566eba
MB
2137 `(#:modules ((guix build gnu-build-system)
2138 ((guix build guile-build-system)
2139 #:select (target-guile-effective-version))
2140 (guix build utils))
2141 #:imported-modules ((guix build guile-build-system)
2142 ,@%gnu-build-system-modules)
2143 #:configure-flags (list "--with-ncursesw" ; Unicode support
0791437f
RW
2144 "--with-gnu-filesystem-hierarchy")
2145 #:phases
2146 (modify-phases %standard-phases
2147 (add-before 'build 'fix-libguile-ncurses-file-name
2148 (lambda* (#:key outputs #:allow-other-keys)
2149 (invoke "make" "install"
2150 "-C" "src/ncurses"
2151 "-j" (number->string
2152 (parallel-job-count)))
2153 (let* ((out (assoc-ref outputs "out"))
2154 (dir "src/ncurses")
2155 (files (find-files dir ".scm")))
2156 (substitute* files
2157 (("\"libguile-ncurses\"")
3c566eba
MB
2158 (format #f "\"~a/lib/guile/~a/libguile-ncurses\""
2159 out (target-guile-effective-version))))
0791437f
RW
2160 #t))))))
2161 (home-page "https://www.gnu.org/software/guile-ncurses/")
2162 (synopsis "Guile bindings to ncurses")
2163 (description
2164 "guile-ncurses provides Guile language bindings for the ncurses
2165library.")
2166 (license license:lgpl3+)))
2167
b01a73b0 2168(define-public guile2.2-ncurses
3c566eba
MB
2169 (package
2170 (inherit guile-ncurses)
b01a73b0 2171 (name "guile2.2-ncurses")
3c566eba 2172 (inputs `(("ncurses" ,ncurses)
b01a73b0
RW
2173 ("guile" ,guile-2.2)))))
2174
2175(define-public guile3.0-ncurses
2176 (deprecated-package "guile3.0-ncurses" guile-ncurses))
3c566eba 2177
0791437f
RW
2178(define-public guile-ncurses/gpm
2179 (package
2180 (inherit guile-ncurses)
2181 (name "guile-ncurses-with-gpm")
2182 (inputs `(("ncurses" ,ncurses/gpm)
2183 ("guile" ,guile-2.2)))))
2184
87001355
MB
2185(define-public guile3.0-ncurses/gpm
2186 (package
2187 (inherit guile3.0-ncurses)
2188 (name "guile3.0-ncurses-with-gpm")
2189 (inputs `(("ncurses" ,ncurses/gpm)
2190 ("guile" ,guile-3.0)))))
2191
0791437f
RW
2192(define-public guile-lib
2193 (package
2194 (name "guile-lib")
2195 (version "0.2.6.1")
2196 (source (origin
2197 (method url-fetch)
2198 (uri (string-append "mirror://savannah/guile-lib/guile-lib-"
2199 version ".tar.gz"))
2200 (sha256
2201 (base32
675f1940
LC
2202 "0aizxdif5dpch9cvs8zz5g8ds5s4xhfnwza2il5ji7fv2h7ks7bd"))
2203 (modules '((guix build utils)))
2204 (snippet
2205 '(begin
2206 ;; Work around miscompilation on Guile 3.0.0 at -O2:
2207 ;; <https://bugs.gnu.org/39251>.
2208 (substitute* "src/md5.scm"
2209 (("\\(define f-ash ash\\)")
2210 "(define f-ash (@ (guile) ash))\n")
2211 (("\\(define f-add \\+\\)")
2212 "(define f-add (@ (guile) +))\n"))
2213 #t))))
0791437f
RW
2214 (build-system gnu-build-system)
2215 (arguments
2216 '(#:make-flags
2217 '("GUILE_AUTO_COMPILE=0") ; to prevent guild errors
2218 #:phases
2219 (modify-phases %standard-phases
a0b24d5f
CB
2220 (add-after 'unpack 'patch-for-cross-compilation
2221 (lambda _
2222 (substitute* "configure.ac"
2223 (("GUILE_FLAGS")
2224 "GUILE_FLAGS
2225if test \"$cross_compiling\" != no; then
2226 GUILE_TARGET=\"--target=$host_alias\"
2227 AC_SUBST([GUILE_TARGET])
2228fi
2229"))
2230 (substitute* "am/guile.mk"
2231 (("guild compile") "guild compile $(GUILE_TARGET)"))
2232 (delete-file "configure") ; trigger the bootstrap phase to run
2233 ; autoreconf
2234 #t))
0791437f
RW
2235 (add-before 'configure 'patch-module-dir
2236 (lambda _
2237 (substitute* "src/Makefile.in"
2238 (("^moddir = ([[:graph:]]+)")
2239 "moddir = $(datadir)/guile/site/@GUILE_EFFECTIVE_VERSION@\n")
2240 (("^godir = ([[:graph:]]+)")
2241 "godir = \
2242$(libdir)/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n"))
2243 #t)))))
7306c679 2244 (native-inputs
a0b24d5f
CB
2245 `(("autoconf" ,autoconf)
2246 ("automake" ,automake)
2247 ("gettext" ,gettext-minimal)
2248 ("guile" ,guile-3.0)
7306c679
CB
2249 ("pkg-config" ,pkg-config)))
2250 (inputs
2251 `(("guile" ,guile-3.0)))
0791437f
RW
2252 (home-page "https://www.nongnu.org/guile-lib/")
2253 (synopsis "Collection of useful Guile Scheme modules")
2254 (description
2255 "Guile-Lib is intended as an accumulation place for pure-scheme Guile
2256modules, allowing for people to cooperate integrating their generic Guile
2257modules into a coherent library. Think \"a down-scaled, limited-scope CPAN
2258for Guile\".")
2259
2260 ;; The whole is under GPLv3+, but some modules are under laxer
2261 ;; distribution terms such as LGPL and public domain. See `COPYING' for
2262 ;; details.
2263 (license license:gpl3+)))
2264
2265(define-public guile2.0-lib
2266 (package
2267 (inherit guile-lib)
2268 (name "guile2.0-lib")
a0b24d5f
CB
2269 (native-inputs
2270 (alist-replace "guile" (list guile-2.0)
2271 (package-native-inputs guile-lib)))
2272 (inputs
2273 (alist-replace "guile" (list guile-2.0)
2274 (package-inputs guile-lib)))))
0791437f 2275
b6bee63b 2276(define-public guile2.2-lib
675f1940
LC
2277 (package
2278 (inherit guile-lib)
b6bee63b 2279 (name "guile2.2-lib")
a0b24d5f
CB
2280 (native-inputs
2281 (alist-replace "guile" (list guile-2.2)
2282 (package-native-inputs guile-lib)))
2283 (inputs
2284 (alist-replace "guile" (list guile-2.2)
2285 (package-inputs guile-lib)))))
b6bee63b
LC
2286
2287(define-public guile3.0-lib
2288 (deprecated-package "guile3.0-lib" guile-lib))
675f1940 2289
0791437f
RW
2290(define-public guile-minikanren
2291 (package
2292 (name "guile-minikanren")
2293 (version "20150424.e844d85")
2294 (source (origin
2295 (method git-fetch)
2296 (uri (git-reference
b0e7b699 2297 (url "https://github.com/ijp/minikanren")
0791437f
RW
2298 (commit "e844d85512f8c055d3f96143ee506007389a25e3")))
2299 (file-name (string-append name "-" version "-checkout"))
2300 (sha256
2301 (base32
2302 "0r50jlpzi940jlmxyy3ddqqwmj5r12gb4bcv0ssini9v8km13xz6"))))
2303 (build-system guile-build-system)
2304 (native-inputs
b6bee63b 2305 `(("guile" ,guile-3.0)))
0791437f
RW
2306 (home-page "https://github.com/ijp/minikanren")
2307 (synopsis "MiniKanren declarative logic system, packaged for Guile")
2308 (description
2309 "MiniKanren is a relational programming extension to the Scheme
2310programming Language, written as a smaller version of Kanren suitable for
2311pedagogical purposes. It is featured in the book, The Reasoned Schemer,
2312written by Dan Friedman, William Byrd, and Oleg Kiselyov.
2313
2314This is Ian Price's r6rs packaged version of miniKanren, which deviates
2315slightly from miniKanren mainline.
2316
2317See http://minikanren.org/ for more on miniKanren generally.")
2318 (license license:expat)))
2319
2320(define-public guile2.0-minikanren
2321 (package
2322 (inherit guile-minikanren)
2323 (name "guile2.0-minikanren")
2324 (native-inputs `(("guile" ,guile-2.0)))))
2325
b6bee63b 2326(define-public guile2.2-minikanren
89a99d53
LC
2327 (package
2328 (inherit guile-minikanren)
b6bee63b
LC
2329 (name "guile2.2-minikanren")
2330 (native-inputs `(("guile" ,guile-2.2)))))
2331
2332(define-public guile3.0-minikanren
2333 (deprecated-package "guile3.0-minikanren" guile-minikanren))
89a99d53 2334
0791437f
RW
2335(define-public guile-irregex
2336 (package
2337 (name "guile-irregex")
2338 (version "0.9.6")
2339 (source (origin
2340 (method url-fetch)
2341 (uri (string-append
2342 "http://synthcode.com/scheme/irregex/irregex-"
2343 version ".tar.gz"))
2344 (sha256
2345 (base32
2346 "1ia3m7dp3lcxa048q0gqbiwwsyvn99baw6xkhb4bhhzn4k7bwyqq"))))
2347 (build-system guile-build-system)
2348 (arguments
2349 '(#:phases (modify-phases %standard-phases
2350 (add-after 'unpack 'move-files-around
2351 (lambda _
2352 ;; Move the relevant source files to src/ and create the
2353 ;; rx/ directory to match the expected module hierarchy.
2354 (mkdir-p "src/rx/source")
2355 (rename-file "irregex-guile.scm"
2356 "src/rx/irregex.scm")
2357 (rename-file "irregex.scm"
2358 "src/rx/source/irregex.scm")
2359 ;; Not really reachable via guile's packaging system,
2360 ;; but nice to have around.
2361 (rename-file "irregex-utils.scm"
2362 "src/rx/source/irregex-utils.scm")
2363 #t)))
2364 #:source-directory "src"))
2365 (native-inputs
b6bee63b 2366 `(("guile" ,guile-3.0)))
0791437f
RW
2367 (home-page "http://synthcode.com/scheme/irregex")
2368 (synopsis "S-expression based regular expressions")
2369 (description
2370 "Irregex is an s-expression based alternative to your classic
2371string-based regular expressions. It implements SRFI 115 and is deeply
2372inspired by the SCSH regular expression system.")
2373 (license license:bsd-3)))
2374
2375(define-public guile2.0-irregex
2376 (package
2377 (inherit guile-irregex)
2378 (name "guile2.0-irregex")
2379 (native-inputs `(("guile" ,guile-2.0)))))
2380
b6bee63b 2381(define-public guile2.2-irregex
89a99d53
LC
2382 (package
2383 (inherit guile-irregex)
b6bee63b
LC
2384 (name "guile2.2-irregex")
2385 (native-inputs `(("guile" ,guile-2.2)))))
2386
2387(define-public guile3.0-irregex
2388 (deprecated-package "guile3.0-irregex" guile-irregex))
89a99d53 2389
0791437f
RW
2390(define-public haunt
2391 (package
2392 (name "haunt")
2393 (version "0.2.4")
2394 (source (origin
2395 (method url-fetch)
2396 (uri (string-append "https://files.dthompson.us/haunt/haunt-"
2397 version ".tar.gz"))
2398 (sha256
2399 (base32
93d94134
LC
2400 "056z4znikk83nr5mr0x2ac3iinqbywa2bvb37mhr566a1q50isfc"))
2401 (modules '((guix build utils)))
2402 (snippet
2403 '(begin
2404 ;; Allow builds with Guile 3.0.
2405 (substitute* "configure"
2406 (("2\\.2 2\\.0")
2407 "3.0 2.2 2.0"))
2408 #t))))
0791437f
RW
2409 (build-system gnu-build-system)
2410 (arguments
2411 `(#:modules ((ice-9 match) (ice-9 ftw)
2412 ,@%gnu-build-system-modules)
2413 #:tests? #f ; test suite is non-deterministic :(
2414 #:phases (modify-phases %standard-phases
2415 (add-after 'install 'wrap-haunt
2416 (lambda* (#:key inputs outputs #:allow-other-keys)
2417 ;; Wrap the 'haunt' command to refer to the right
2418 ;; modules.
2419 (let* ((out (assoc-ref outputs "out"))
2420 (bin (string-append out "/bin"))
2421 (site (string-append
2422 out "/share/guile/site"))
93d94134
LC
2423 (guile-reader (assoc-ref inputs "guile-reader"))
2424 (deps `(,@(if guile-reader
2425 (list guile-reader)
2426 '())
2427 ,(assoc-ref inputs "guile-commonmark"))))
0791437f
RW
2428 (match (scandir site)
2429 (("." ".." version)
2430 (let ((modules (string-append site "/" version))
2431 (compiled-modules (string-append
2432 out "/lib/guile/" version
2433 "/site-ccache")))
2434 (wrap-program (string-append bin "/haunt")
2435 `("GUILE_LOAD_PATH" ":" prefix
2436 (,modules
2437 ,@(map (lambda (dep)
2438 (string-append dep
2439 "/share/guile/site/"
2440 version))
2441 deps)))
2442 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
2443 (,compiled-modules
2444 ,@(map (lambda (dep)
2445 (string-append dep "/lib/guile/"
2446 version
2447 "/site-ccache"))
2448 deps))))
2449 #t)))))))))
2450 (native-inputs
2451 `(("pkg-config" ,pkg-config)
2452 ("texinfo" ,texinfo)))
2453 (inputs
e55f1ac7
LC
2454 ;; Depend on the latest Guile to avoid bytecode compatibility issues when
2455 ;; using modules built against the latest version.
2456 `(("guile" ,guile-3.0-latest)))
0791437f 2457 (propagated-inputs
c20e697e 2458 `(("guile-reader" ,guile-reader)
0791437f
RW
2459 ("guile-commonmark" ,guile-commonmark)))
2460 (synopsis "Functional static site generator")
2461 (description "Haunt is a static site generator written in Guile
2462Scheme. Haunt features a functional build system and an extensible
2463interface for reading articles in any format.")
5d3bcfef 2464 (home-page "https://dthompson.us/projects/haunt.html")
0791437f
RW
2465 (license license:gpl3+)))
2466
b6bee63b 2467(define-public guile2.2-haunt
93d94134
LC
2468 (package
2469 (inherit haunt)
b6bee63b
LC
2470 (name "guile2.2-haunt")
2471 (inputs `(("guile" ,guile-2.2)))
93d94134 2472 (propagated-inputs
c20e697e 2473 `(("guile-reader" ,guile2.2-reader)
b6bee63b 2474 ("guile-commonmark" ,guile2.2-commonmark)))))
93d94134 2475
0791437f
RW
2476(define-public guile2.0-haunt
2477 (package
2478 (inherit haunt)
2479 (name "guile2.0-haunt")
2480 (inputs `(("guile" ,guile-2.0)))))
2481
b6bee63b
LC
2482(define-public guile3.0-haunt
2483 (deprecated-package "guile3.0-haunt" haunt))
2484
0791437f
RW
2485(define-public guile-redis
2486 (package
2487 (name "guile-redis")
3968722b 2488 (version "2.0.0")
0791437f
RW
2489 (home-page "https://github.com/aconchillo/guile-redis")
2490 (source (origin
29fde3bf
EF
2491 (method git-fetch)
2492 (uri (git-reference
2493 (url home-page)
2494 (commit version)))
2495 (file-name (git-file-name name version))
0791437f
RW
2496 (sha256
2497 (base32
3968722b 2498 "1zk2x37lw6ygf7rwy71svnsian8lj51axpxmm66ah7dazn69swlm"))))
0791437f 2499 (build-system gnu-build-system)
f048c4f3
EF
2500 (arguments
2501 '(#:make-flags '("GUILE_AUTO_COMPILE=0")))
0791437f
RW
2502 (native-inputs
2503 `(("autoconf" ,autoconf)
2504 ("automake" ,automake)
2505 ("pkg-config" ,pkg-config)
24e38f24 2506 ("guile" ,guile-3.0)))
0791437f
RW
2507 (synopsis "Redis client library for Guile")
2508 (description "Guile-redis provides a Scheme interface to the Redis
2509key-value cache and store.")
2510 (license license:lgpl3+)))
2511
24e38f24
RW
2512(define-public guile2.2-redis
2513 (package
2514 (inherit guile-redis)
2515 (name "guile2.2-redis")
2516 (native-inputs `(("guile" ,guile-2.2)
2517 ,@(alist-delete "guile"
2518 (package-native-inputs guile-redis))))))
2519
0791437f
RW
2520(define-public guile2.0-redis
2521 (package
2522 (inherit guile-redis)
2523 (name "guile2.0-redis")
3968722b
B
2524 (arguments
2525 `(#:phases
2526 (modify-phases %standard-phases
2527 (add-after 'unpack 'patch-source
2528 (lambda _
2529 ;; put-string is in (rnrs io ports) in guile2.0,
2530 ;; not in (ice-9 textual-ports)
2531 (substitute* "redis/utils.scm"
2532 (("\\(ice-9 textual-ports\\)")
2533 "(rnrs io ports)"))
2534 #t)))
2535 ,@(package-arguments guile-redis)))
0791437f
RW
2536 (native-inputs `(("guile" ,guile-2.0)
2537 ,@(alist-delete "guile"
2538 (package-native-inputs guile-redis))))))
2539
0791437f
RW
2540(define-public guile-commonmark
2541 (package
2542 (name "guile-commonmark")
b552e307 2543 (version "0.1.2")
0791437f
RW
2544 (source (origin
2545 (method url-fetch)
2546 (uri (string-append "https://github.com/OrangeShark/" name
2547 "/releases/download/v" version
2548 "/" name "-" version ".tar.gz"))
2549 (sha256
2550 (base32
1fa34232
LC
2551 "17lrsdisa3kckh24q114vfmzdc4wkqa6ccwl4hdlrng5wpn1iman"))
2552 (modules '((guix build utils)))
2553 (snippet
2554 '(begin
2555 ;; Allow builds with Guile 3.0.
2556 (substitute* "configure"
2557 (("2\\.2 2\\.0")
2558 "3.0 2.2 2.0"))
2559 #t))))
0791437f 2560 (build-system gnu-build-system)
0e4f49f1
RW
2561 ;; The tests throw exceptions with Guile 3.0.5, because they evaluate
2562 ;; (exit ...).
2563 ;;
2564 ;; This has been fixed upstream, but there has not been a new release
2565 ;; containing this change.
2566 (arguments
2567 '(#:phases
2568 (modify-phases %standard-phases
2569 (add-after 'unpack 'fix-tests-when-building-with-guile-3.0.5
2570 (lambda _
2571 (substitute* (find-files "tests" "\\.scm$")
2572 (("\\(exit.*") ""))
2573 #t)))))
0791437f 2574 (inputs
b6bee63b 2575 `(("guile" ,guile-3.0)))
0791437f
RW
2576 (native-inputs
2577 `(("pkg-config" ,pkg-config)))
2578 (synopsis "CommonMark parser for Guile")
2579 (description
2580 "guile-commonmark is a library for parsing CommonMark, a fully specified
2581variant of Markdown. The library is written in Guile Scheme and is designed
2582to transform a CommonMark document to SXML. guile-commonmark tries to closely
2583follow the @uref{http://commonmark.org/, CommonMark spec}, the main difference
2584is no support for parsing block and inline level HTML.")
2585 (home-page "https://github.com/OrangeShark/guile-commonmark")
2586 (license license:lgpl3+)))
2587
b6bee63b 2588(define-public guile2.2-commonmark
1fa34232
LC
2589 (package
2590 (inherit guile-commonmark)
b6bee63b
LC
2591 (name "guile2.2-commonmark")
2592 (inputs `(("guile" ,guile-2.2)))))
1fa34232 2593
0791437f
RW
2594(define-public guile2.0-commonmark
2595 (package
2596 (inherit guile-commonmark)
2597 (name "guile2.0-commonmark")
2598 (inputs `(("guile" ,guile-2.0)))))
2599
b6bee63b
LC
2600(define-public guile3.0-commonmark
2601 (deprecated-package "guile3.0-commonmark" guile-commonmark))
2602
0791437f
RW
2603(define-public mcron
2604 (package
2605 (name "mcron")
8b3b1988 2606 (version "1.2.0")
0791437f
RW
2607 (source (origin
2608 (method url-fetch)
2609 (uri (string-append "mirror://gnu/mcron/mcron-"
2610 version ".tar.gz"))
2611 (sha256
2612 (base32
8b3b1988 2613 "1midrn15d5kqy4zd2029bj1db6gnfhxg8mcgfy4bkp5p9nl4v4rd"))))
0791437f
RW
2614 (build-system gnu-build-system)
2615 (arguments
2616 '(#:phases (modify-phases %standard-phases
0791437f
RW
2617 (add-before 'check 'adjust-tests
2618 (lambda _
2619 (substitute* "tests/job-specifier.scm"
2620 ;; (getpw) fails with "entry not found" in the build
2621 ;; environment, so pass an argument.
2622 (("\\(getpw\\)")
2623 "(getpwnam (getuid))")
2624 ;; The build environment lacks an entry for root in
2625 ;; /etc/passwd.
2626 (("\\(getpw 0\\)")
2627 "(getpwnam \"nobody\")")
2628
2629 ;; FIXME: Skip the 4 faulty tests (see above).
2630 (("\\(test-equal \"next-year\"" all)
2631 (string-append "(test-skip 4)\n" all)))
2632 #t)))))
30ebff69 2633 (native-inputs `(("pkg-config" ,pkg-config)
bbd9c9c9
LC
2634 ("tzdata" ,tzdata-for-tests)
2635 ("guile-native" ;for 'guild compile'
2636 ,@(assoc-ref (package-inputs this-package) "guile"))))
b6bee63b 2637 (inputs `(("guile" ,guile-3.0)))
0791437f
RW
2638 (home-page "https://www.gnu.org/software/mcron/")
2639 (synopsis "Run jobs at scheduled times")
2640 (description
2641 "GNU Mcron is a complete replacement for Vixie cron. It is used to run
2642tasks on a schedule, such as every hour or every Monday. Mcron is written in
2643Guile, so its configuration can be written in Scheme; the original cron
2644format is also supported.")
2645 (license license:gpl3+)))
2646
b6bee63b 2647(define-public guile2.2-mcron
3de0d20b
LC
2648 (package
2649 (inherit mcron)
b6bee63b
LC
2650 (name "guile2.2-mcron")
2651 (inputs `(("guile" ,guile-2.2)))))
2652
2653(define-public guile3.0-mcron
2654 (deprecated-package "guile3.0-mcron" mcron))
3de0d20b 2655
6bb5f88e 2656(define-public guile-picture-language
b54b3f54
RW
2657 (let ((commit "291a746a1d3b4784d38b05239bdd7b8e796ce761")
2658 (revision "4"))
6bb5f88e
RW
2659 (package
2660 (name "guile-picture-language")
d1a3a8e1 2661 (version (git-version "0.0.1" revision commit))
6bb5f88e
RW
2662 (source (origin
2663 (method git-fetch)
2664 (uri (git-reference
2665 (url "https://git.elephly.net/software/guile-picture-language.git")
2666 (commit commit)))
f1d4d79f 2667 (file-name (git-file-name name version))
6bb5f88e
RW
2668 (sha256
2669 (base32
b54b3f54 2670 "0rnhf13ds92sbdicshy4sy4kl2kc431fy9vzm1divw974p7v57sd"))))
d1a3a8e1 2671 (build-system gnu-build-system)
6bb5f88e 2672 (inputs
b6bee63b 2673 `(("guile" ,guile-3.0)))
76171095 2674 (propagated-inputs
b54b3f54
RW
2675 `(("guile-cairo" ,guile-cairo)
2676 ("guile-rsvg" ,guile-rsvg)))
d1a3a8e1
RW
2677 (native-inputs
2678 `(("autoconf" ,autoconf)
2679 ("automake" ,automake)
76171095 2680 ("librsvg" ,librsvg)
d1a3a8e1
RW
2681 ("pkg-config" ,pkg-config)
2682 ("texinfo" ,texinfo)))
6bb5f88e
RW
2683 (home-page "https://git.elephly.net/software/guile-picture-language.git")
2684 (synopsis "Picture language for Guile")
2685 (description
2686 "This package provides a simple SVG-based picture language for Guile.
2687The picture values can directly be displayed in Geiser.")
76171095
RW
2688 ;; (pict base64) is under GPLv3+, the rest is under LGPLv3+
2689 (license (list license:lgpl3+
2690 license:gpl3+)))))
5531782d 2691
b6bee63b 2692(define-public guile2.2-picture-language
4f408684
LC
2693 (package
2694 (inherit guile-picture-language)
b6bee63b 2695 (name "guile2.2-picture-language")
d39c626c
LC
2696 (inputs `(("guile" ,guile-2.2)))
2697 (propagated-inputs
2698 `(("guile-cairo" ,guile2.2-cairo)
2699 ("guile-rsvg" ,guile2.2-rsvg)))))
b6bee63b
LC
2700
2701(define-public guile3.0-picture-language
2702 (deprecated-package "guile3.0-picture-language"
2703 guile-picture-language))
4f408684 2704
5531782d 2705(define-public guile-studio
edf0043a
RW
2706 (let ((commit "93622e788e727d3275291f999f7e570de6a5bb35")
2707 (revision "1"))
c6607797
RW
2708 (package
2709 (name "guile-studio")
edf0043a 2710 (version (git-version "0.1.0" revision commit))
c6607797
RW
2711 (source (origin
2712 (method git-fetch)
2713 (uri (git-reference
2714 (url "https://git.elephly.net/software/guile-studio.git")
2715 (commit commit)))
2716 (file-name (git-file-name name version))
2717 (sha256
2718 (base32
edf0043a 2719 "0n6y0bcmkx50m8rccz7a6h4yxmwq54pf2bfzpd5ndz2bsiwiq13l"))))
c6607797
RW
2720 (build-system gnu-build-system)
2721 (arguments
2722 `(#:modules
2723 ((ice-9 match)
2724 (srfi srfi-1)
2725 ,@%gnu-build-system-modules)
2726 #:tests? #f ; there are none
2727 #:make-flags
edf0043a 2728 (list (string-append "PICT_DIR="
c6607797
RW
2729 (assoc-ref %build-inputs "guile-picture-language"))
2730 (string-append "EMACS_DIR="
2731 (assoc-ref %build-inputs "emacs"))
2732 (string-append "GUILE_DIR="
2733 (assoc-ref %build-inputs "guile"))
2734 (string-join (cons "INPUTS="
2735 (filter-map
2736 (lambda (input)
2737 (match input
2738 ((label . pkg)
2739 (and (string-prefix? "emacs" label) pkg))))
2740 %build-inputs)))
2741 (string-append "PREFIX=" (assoc-ref %outputs "out")))
2742 #:phases
2743 (modify-phases %standard-phases
2744 (delete 'configure)
2745 (delete 'install))))
2746 (inputs
2747 `(("guile" ,guile-3.0)
2748 ("guile-picture-language" ,guile-picture-language)
2749 ("emacs" ,emacs)
777ecc1e
RW
2750 ("emacs-f" ,emacs-f) ; needed by doom-modeline
2751 ("emacs-memoize" ,emacs-memoize) ; needed by all-the-icons
2752 ("emacs-all-the-icons" ,emacs-all-the-icons) ; needed by doom-modeline
edf0043a 2753 ("emacs-all-the-icons-dired" ,emacs-all-the-icons-dired)
6908552b 2754 ("emacs-dired-sidebar" ,emacs-dired-sidebar)
777ecc1e
RW
2755 ("emacs-doom-modeline" ,emacs-doom-modeline)
2756 ("emacs-modus-themes" ,emacs-modus-themes)
c6607797
RW
2757 ("emacs-geiser" ,emacs-geiser)
2758 ("emacs-company" ,emacs-company)
777ecc1e 2759 ("emacs-ivy" ,emacs-ivy)
c6607797 2760 ("emacs-flycheck" ,emacs-flycheck)
0e7731ba 2761 ("emacs-flycheck-guile" ,emacs-flycheck-guile)
edf0043a 2762 ("emacs-paren-face" ,emacs-paren-face)))
c6607797
RW
2763 (native-inputs
2764 `(("texinfo" ,texinfo)))
2765 (home-page "https://gnu.org/software/guile")
2766 (synopsis "IDE for Guile")
2767 (description
2768 "This is Emacs with a few settings that make working with Guile easier
5531782d
RW
2769for people new to Emacs. Features include: CUA mode, Geiser, tool bar icons
2770to evaluate Guile buffers, support for Guile's very own picture language, code
2771completion, a simple mode line, etc.")
c6607797 2772 (license license:gpl3+))))
9f8698ad
RW
2773
2774(define-public guile-stis-parser
3a71dac0
MB
2775 (package
2776 (name "guile-stis-parser")
2777 (version "1.2.4.1")
2778 (source (origin
2779 (method git-fetch)
2780 (uri (git-reference
2781 (url "https://gitlab.com/tampe/stis-parser")
2782 (commit (string-append "v" version))))
2783 (file-name (git-file-name name version))
2784 (sha256
2785 (base32
2786 "1fvxdfvc80zqhwzq5x3kxyr6j8p4b51yx85fx1gr3d4gy2ddpx5w"))))
2787 (build-system gnu-build-system)
2788 (arguments
2789 `(#:parallel-build? #f ; not supported
2790 #:phases
2791 (modify-phases %standard-phases
2792 (add-after 'unpack 'chdir
2793 (lambda _ (chdir "modules") #t))
2794 (add-after 'chdir 'delete-broken-symlink
2795 (lambda _
2796 (delete-file "parser/stis-parser/lang/.#calc.scm")
2797 #t)))))
2798 (inputs
2799 `(("guile" ,guile-3.0)))
2800 (native-inputs
2801 `(("autoconf" ,autoconf)
2802 ("automake" ,automake)
2803 ("pkg-config" ,pkg-config)))
2804 (home-page "https://gitlab.com/tampe/stis-parser")
2805 (synopsis "Parser combinator framework")
2806 (description
2807 "This package provides a functional parser combinator library that
9f8698ad
RW
2808supports backtracking and a small logical framework. The idea is to build up
2809chunks that are memoized and there is no clear scanner/parser separation,
2810chunks can be expressions as well as simple tokens.")
3a71dac0 2811 (license license:lgpl2.0+)))
12d73f9c
RW
2812
2813(define-public guile-persist
09f0bc87
MB
2814 (package
2815 (name "guile-persist")
2816 (version "1.2.3")
2817 (source (origin
2818 (method git-fetch)
2819 (uri (git-reference
2820 (url "https://gitlab.com/tampe/guile-persist")
2821 (commit (string-append "v" version))))
2822 (file-name (git-file-name name version))
2823 (sha256
2824 (base32
2825 "19f8hqcax4v40858kx2j8fy1cvzc2djj99r0n17dy1xxmwa097qi"))))
2826 (build-system gnu-build-system)
2827 (arguments
2828 `(#:phases
2829 (modify-phases %standard-phases
2830 (add-after 'unpack 'patch-prefix
2831 (lambda* (#:key inputs outputs #:allow-other-keys)
2832 (substitute* "src/Makefile.am"
2833 (("/usr/local/lib/guile")
2834 (string-append (assoc-ref outputs "out") "/lib/guile"))
2835 (("/usr/local/include/guile")
2836 (string-append (assoc-ref inputs "guile") "/include/guile"))
2837 (("-L/usr/local/lib")
2838 (string-append "-L" (assoc-ref inputs "guile") "/lib")))
2839 #t))
2840 (add-after 'unpack 'patch-library-reference
2841 (lambda* (#:key outputs #:allow-other-keys)
2842 (let ((out (assoc-ref outputs "out")))
2843 (substitute* "persist/persistance.scm"
2844 (("\"libguile-persist\"")
2845 (format #f "\"~a/lib/guile/3.0/extensions/libguile-persist\"" out)))
2846 #t))))))
2847 (inputs
2848 `(("guile" ,guile-3.0)))
2849 (native-inputs
2850 `(("autoconf" ,autoconf)
2851 ("automake" ,automake)
2852 ("libtool" ,libtool)
2853 ("pkg-config" ,pkg-config)))
2854 (home-page "https://gitlab.com/tampe/guile-persist")
2855 (synopsis "Persistence programming framework for Guile")
2856 (description
2857 "This is a serialization library for serializing objects like classes
12d73f9c
RW
2858and objects, closures and structs. This currently does not support
2859serializing continuations or delimited continuations.")
09f0bc87 2860 (license license:lgpl2.0+)))
6d37301b
RW
2861
2862(define-public python-on-guile
ac944584
MB
2863 (package
2864 (name "python-on-guile")
cdf6a118 2865 (version "1.2.3.5")
ac944584
MB
2866 (home-page "https://gitlab.com/python-on-guile/python-on-guile")
2867 (source (origin
2868 (method git-fetch)
2869 (uri (git-reference (url home-page)
2870 (commit (string-append "v" version))))
2871 (file-name (git-file-name name version))
2872 (sha256
2873 (base32
cdf6a118 2874 "05xrvcj6a4gzq1ybyin270qz8wamgc7w2skyi9iy6hkpgdhxy8vf"))))
ac944584
MB
2875 (build-system gnu-build-system)
2876 (arguments
2877 `(#:parallel-build? #f ;not supported
2878 #:make-flags '("GUILE_AUTO_COMPILE=0") ;to prevent guild warnings
2879 #:phases
2880 (modify-phases %standard-phases
2881 (add-after 'unpack 'chdir
2882 (lambda _ (chdir "modules") #t))
2883 (add-after 'chdir 'augment-GUILE_LOAD_PATH
2884 (lambda _
2885 ;; TODO: It would be better to patch the Makefile.
2886 (setenv "GUILE_LOAD_PATH"
2887 (string-append ".:"
2888 (getenv "GUILE_LOAD_PATH")))
2889 #t))
2890 (add-after 'install 'wrap
2891 (lambda* (#:key outputs #:allow-other-keys)
2892 ;; Wrap the 'python' executable so it can find its
862d6a91
MB
2893 ;; dependencies and own modules.
2894 (let* ((out (assoc-ref outputs "out"))
2895 (guile-version ,(version-major+minor
2896 (package-version guile-3.0)))
2897 (scm (string-append out "/share/guile/site/"
2898 guile-version))
2899 (ccache (string-append out "/lib/guile/" guile-version
2900 "/site-ccache"))
2901 (load-path (string-join
2902 (cons scm
2903 ;; XXX: cdr because we augment it above.
2904 (cdr (string-split
2905 (getenv "GUILE_LOAD_PATH") #\:)))
2906 ":"))
2907 (compiled-path (string-append
2908 ccache ":"
2909 (getenv "GUILE_LOAD_COMPILED_PATH"))))
ac944584
MB
2910 (wrap-program (string-append out "/bin/python")
2911 `("GUILE_LOAD_PATH" ":" prefix
862d6a91 2912 (,load-path))
ac944584 2913 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
862d6a91 2914 (,compiled-path)))
ac944584
MB
2915 #t))))))
2916 (inputs
4f33bf57
MB
2917 `(("guile" ,guile-3.0)
2918 ("guile-persist" ,guile-persist)
ac944584
MB
2919 ("guile-readline" ,guile-readline)
2920 ("guile-stis-parser" ,guile-stis-parser)))
2921 (native-inputs
2922 `(("autoconf" ,autoconf)
2923 ("automake" ,automake)
2924 ("libtool" ,libtool)
2925 ("pkg-config" ,pkg-config)))
2926 (synopsis "Python implementation in Guile")
2927 (description
2928 "This package allows you to compile a Guile Python file to any target
6d37301b 2929from @code{tree-il}.")
ac944584 2930 (license license:lgpl2.0+)))
b97b4624
RW
2931
2932(define-public guile-file-names
2933 (package
2934 (name "guile-file-names")
72a0706f 2935 (version "0.3")
b97b4624
RW
2936 (source (origin
2937 (method url-fetch)
2938 (uri (string-append "http://brandon.invergo.net/software/download/"
2939 "guile-file-names/guile-file-names-"
2940 version ".tar.gz"))
2941 (sha256
2942 (base32
72a0706f 2943 "01chizdxkhw6aqv629vxka9f5x3534ij7r0jqndawsg2vxm1r9sz"))))
b97b4624
RW
2944 (build-system gnu-build-system)
2945 (arguments
2946 `(#:phases
2947 (modify-phases %standard-phases
481eca80 2948 (add-after 'unpack 'fix-target-directory
b97b4624 2949 (lambda _
481eca80 2950 (substitute* "src/Makefile.in"
b97b4624
RW
2951 (("guilemoddir = \\$\\(GUILE_SITE\\)")
2952 "guilemoddir = $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
2953 #t)))))
2954 (inputs
2955 `(("guile" ,guile-2.2)))
2956 (native-inputs
2957 `(("pkg-config" ,pkg-config)))
2958 (home-page "https://gitlab.com/brandoninvergo/guile-file-names")
2959 (synopsis "Manipulate file names")
2960 (description
2961 "The @code{(file-names)} module provides tools for manipulating file
2962names. The module was built on the idea that doing anything more than a
2963non-trivial modification of a file name string is a pain (making sure all
2964slashes are present and accounted for, resolving @code{.} and @code{..}, etc).
2965Inevitably, you have to break the string up into chunks and operate on that
2966list of components. This module takes care of that for you.")
2967 (license license:lgpl3+)))
bdf2dd79
JN
2968
2969(define-public guile-gi
bb6c8f20
RW
2970 (package
2971 (name "guile-gi")
8ab08495 2972 (version "0.3.1")
bb6c8f20
RW
2973 (source (origin
2974 (method url-fetch)
2975 (uri (string-append "http://lonelycactus.com/tarball/guile_gi-"
2976 version ".tar.gz"))
2977 (sha256
2978 (base32
8ab08495 2979 "1ljcfyar1nb6h4jskxnnzrcxcsblawc50qqfdn8cax3zqfskmvzj"))))
e4ef0d7c 2980 (build-system glib-or-gtk-build-system)
bb6c8f20 2981 (arguments
b5d4d5b9 2982 `(#:configure-flags '("--with-gnu-filesystem-hierarchy")
e4ef0d7c 2983 #:modules ((guix build glib-or-gtk-build-system)
a431a635
RW
2984 (guix build utils)
2985 (ice-9 popen)
2986 (ice-9 rdelim))
b5d4d5b9
RW
2987 #:phases
2988 (modify-phases %standard-phases
a431a635
RW
2989 (add-after 'unpack 'patch-references-to-extension
2990 (lambda* (#:key outputs #:allow-other-keys)
2991 (let ((effective (read-line
2992 (open-pipe* OPEN_READ
2993 "guile" "-c"
2994 "(display (effective-version))"))))
d414327a 2995 (substitute* (find-files "module" ".*\\.scm")
a431a635
RW
2996 (("\\(load-extension \"libguile-gi\" \"(.*)\"\\)" m arg)
2997 (format #f "~s"
2998 `(load-extension
2999 (format #f "~alibguile-gi"
3000 (if (getenv "GUILE_GI_UNINSTALLED")
3001 ""
e4ef0d7c 3002 ,(format #f "~a/lib/guile/~a/extensions/"
a431a635
RW
3003 (assoc-ref outputs "out")
3004 effective)))
3005 ,arg)))))
3006 (setenv "GUILE_GI_UNINSTALLED" "1")
3007 #t))
b5d4d5b9
RW
3008 (add-before 'check 'start-xorg-server
3009 (lambda* (#:key inputs #:allow-other-keys)
3010 ;; The init_check test requires a running X server.
3011 (system (format #f "~a/bin/Xvfb :1 &"
3012 (assoc-ref inputs "xorg-server")))
3013 (setenv "DISPLAY" ":1")
3014 #t)))))
bb6c8f20 3015 (native-inputs
f2d97d57 3016 `(("gettext" ,gettext-minimal)
6153fa0a 3017 ("glib:bin" ,glib "bin") ; for glib-compile-resources
bb6c8f20 3018 ("libtool" ,libtool)
b5d4d5b9
RW
3019 ("pkg-config" ,pkg-config)
3020 ("xorg-server" ,xorg-server)))
bb6c8f20
RW
3021 (propagated-inputs
3022 `(("glib" ,glib)
3023 ("gobject-introspection" ,gobject-introspection)
3024 ("gssettings-desktop-schemas" ,gsettings-desktop-schemas)
3025 ("gtk+" ,gtk+)
3026 ("guile-lib" ,guile-lib)
3027 ("webkitgtk" ,webkitgtk)))
b6bee63b 3028 (inputs `(("guile" ,guile-3.0)))
bb6c8f20
RW
3029 (home-page "https://github.com/spk121/guile-gi")
3030 (synopsis "GObject bindings for Guile")
3031 (description
3032 "Guile-GI is a library for Guile that allows using GObject-based
bdf2dd79
JN
3033libraries, such as GTK+3. Its README comes with the disclaimer: This is
3034pre-alpha code.")
bb6c8f20 3035 (license license:gpl3+)))
dec4b3aa 3036
b6bee63b 3037(define-public guile2.2-gi
bfb51f5e
RW
3038 (package
3039 (inherit guile-gi)
b6bee63b 3040 (name "guile2.2-gi")
3d633a1e 3041 (inputs
b6bee63b 3042 `(("guile" ,guile-2.2)
3d633a1e 3043 ,@(alist-delete "guile" (package-inputs guile-gi))))))
bfb51f5e 3044
b6bee63b
LC
3045(define-public guile3.0-gi
3046 (deprecated-package "guile3.0-gi" guile-gi))
3047
fb6b9f3b
MB
3048(define-public guile-srfi-89
3049 (package
3050 (name "guile-srfi-89")
3051 (version "0.0.1")
3052 (source
3053 (origin
3054 (method git-fetch)
3055 (uri (git-reference
3056 (url "https://gitlab.com/mjbecze/guile-srfi-89.git")
3057 (commit version)))
3058 (sha256
3059 (base32
3060 "1981c0rrzxqx3md9jx8ir7j3m2mzg9m72b33p5jvw36zirbzpl20"))
3061 (file-name (git-file-name name version))))
3062 (build-system guile-build-system)
3063 (native-inputs
3064 `(("guile" ,guile-3.0)))
3065 (home-page "https://gitlab.com/mjbecze/guile-srfi-89")
3066 (synopsis "Hygienic implementation of SRFI-89 for Guile")
3067 (description
3068 "This package provides SRFI-89 optional positional and named
3069parameters, which define* and lambda* special forms")
3070 (license license:gpl3+)))
3071
7afbaefe
MB
3072(define-public guile-srfi-145
3073 (package
3074 (name "guile-srfi-145")
3075 (version "0.0.1")
3076 (source
3077 (origin
3078 (method git-fetch)
3079 (uri (git-reference
3080 (url "https://gitlab.com/mjbecze/guile-srfi-145.git")
3081 (commit version)))
3082 (sha256
3083 (base32
3084 "1gssa8cmcp8640fil9z8dpil8v5l279wlalqjcx3fls5jwv13q1b"))
3085 (file-name (git-file-name name version))))
3086 (build-system guile-build-system)
3087 (native-inputs
3088 `(("guile" ,guile-3.0)))
3089 (home-page "https://gitlab.com/mjbecze/guile-srfi-145")
3090 (synopsis "SRFI-145 port for Guile")
3091 (description
3092 "This package provides SRFI-145. This provides the means to
3093denote the invalidity of certain code paths in a Scheme program.")
3094 (license license:gpl3+)))
3095
e0607093
MB
3096(define-public guile-srfi-158
3097 (package
3098 (name "guile-srfi-158")
3099 (version "0.0.1")
3100 (source
3101 (origin
3102 (method git-fetch)
3103 (uri (git-reference
3104 (url "https://gitlab.com/mjbecze/guile-srfi-158.git")
3105 (commit version)))
3106 (sha256
3107 (base32
3108 "0b8hlv1bldbcwkcxi9y8mm6xp5gbgpg7b15bwqxv70iynl9d9a7c"))
3109 (file-name (git-file-name name version))))
3110 (build-system gnu-build-system)
3111 (native-inputs
3112 `(("autoconf" ,autoconf)
3113 ("automake" ,automake)
3114 ("pkg-config" ,pkg-config)))
3115 (inputs
3116 `(("guile" ,guile-3.0)))
3117 (home-page "https://gitlab.com/samplet/guile-srfi-158")
3118 (synopsis "SRFI 158 (Generators and Accumulators) for Guile")
3119 (description "This package provides an implementation of SRFI 158
3120for Guile. SRFI 158 defines utility procedures that create,
3121transform, and consume generators. It also defines procedures that
3122return accumulators. It is implemented by wrapping the sample
3123implementation in a thin Guile compatibility layer.")
3124 (license license:gpl3+)))
3125
dec4b3aa
LC
3126(define-public guile-srfi-159
3127 (let ((commit "1bd98abda2ae4ef8f36761a167903e55c6bda7bb")
3128 (revision "0"))
3129 (package
3130 (name "guile-srfi-159")
3131 (version (git-version "0" revision commit))
3132 (home-page "https://bitbucket.org/bjoli/guile-srfi-159")
3133 (source (origin
3134 (method hg-fetch)
3135 (uri (hg-reference (changeset commit)
3136 (url home-page)))
3137 (sha256
3138 (base32
3139 "1zw6cmcy7xdbfiz3nz9arqnn7l2daidaps6ixkcrc9b6k51fdv3p"))
3140 (file-name (git-file-name name version))))
3141 (build-system guile-build-system)
3142 (arguments
3143 ;; The *-impl.scm files are actually included from module files; they
3144 ;; should not be compiled separately, but they must be installed.
3145 '(#:not-compiled-file-regexp "-impl\\.scm$"))
3146 (inputs
3147 `(("guile" ,guile-2.2)))
3148 (synopsis "Formatting combinators for Guile")
3149 (description
3150 "The @code{(srfi-159)} module and its sub-modules implement the
3151formatting combinators specified by
3152@uref{https://srfi.schemers.org/srfi-159/srfi-159.html, SRFI-159}. These are
3153more expressive and flexible than the traditional @code{format} procedure.")
3154 (license license:bsd-3))))
f0de9544 3155
08a8872f
MB
3156(define-public guile-srfi-180
3157 (let ((commit "9188bf9724c6d320ef804579d222e855b007b193")
3158 (revision "0"))
3159 (package
3160 (name "guile-srfi-180")
3161 (version (git-version "0" revision commit))
3162 (source
3163 (origin
3164 (method git-fetch)
3165 (uri (git-reference
8ed4c468 3166 (url "https://github.com/scheme-requests-for-implementation/srfi-180")
08a8872f
MB
3167 (commit commit)))
3168 (sha256
3169 (base32
3170 "08lf70rsak8mwfij55xc37pg9zg7c87fizmhz7ln46skzj68sl3y"))
3171 (modules '((guix build utils)))
3172 (snippet
3173 '(begin
3174 (delete-file-recursively "srfi/files")
3175 (delete-file "srfi/run-r7rs-checks.guile.scm")
3176 (delete-file "srfi/run-r7rs-checks.scm")
3177 (delete-file "srfi/check.scm")
3178 #t))
3179 (file-name (git-file-name name version))))
3180 (build-system guile-build-system)
3181 (arguments
3182 '(#:not-compiled-file-regexp "body\\.scm$"))
3183 (native-inputs
3184 `(("guile" ,guile-3.0)))
3185 (propagated-inputs
3186 `(("guile-srfi-145" ,guile-srfi-145)))
3187 (home-page "https://srfi.schemers.org/srfi-180/")
3188 (synopsis "JSON parser and printer for Guile")
3189 (description
3190 "This library implements a JavaScript Object Notation (JSON) parser and printer.
3191It also supports parsing JSON objects that may be bigger than memory with a streaming
3192API.")
3193 (license license:expat))))
3194
f0de9544 3195(define-public emacsy
48eb71ae
JN
3196 (package
3197 (name "emacsy")
3198 (version "0.4.1")
3199 (source (origin
3200 (method url-fetch)
475c3278
LC
3201 (uri (string-append "mirror://savannah/emacsy/emacsy-"
3202 version ".tar.gz"))
48eb71ae
JN
3203 (sha256
3204 (base32
475c3278
LC
3205 "1cpb85dl1nibd34c2x2h7vfmjpkgh353p5b1w20v6cs6gmvgg4np"))
3206 (modules '((guix build utils)))
3207 (snippet
3208 '(begin
3209 (substitute* "configure"
3210 ;; Allow builds with Guile 3.0.
3211 (("2\\.2 2\\.0")
3212 "3.0 2.2 2.0")
3213
3214 ;; Freeglut 3.2 provides 'glut.pc', not 'freeglut.pc'.
3215 (("freeglut >= ")
3216 "glut >= "))
3217
3218 (substitute* '("emacsy/emacsy.c"
3219 "example/hello-emacsy.c")
3220 (("#include <libguile\\.h>")
3221 (string-append "#include <stdlib.h>\n"
3222 "#include <stdio.h>\n"
3223 "#include <string.h>\n"
3224 "#include <unistd.h>\n"
3225 "#include <libguile.h>\n")))))))
48eb71ae
JN
3226 (build-system gnu-build-system)
3227 (native-inputs
475c3278
LC
3228 `(("bzip2" ,bzip2)
3229 ("guile" ,guile-3.0)
f2d97d57 3230 ("gettext" ,gettext-minimal)
48eb71ae
JN
3231 ("libtool" ,libtool)
3232 ("perl" ,perl)
3233 ("pkg-config" ,pkg-config)
3234 ("texinfo" ,texinfo)
1aa026aa 3235 ("texlive" ,(texlive-union (list texlive-generic-epsf)))))
114f02ba 3236 (inputs
48eb71ae 3237 `(("dbus-glib" ,dbus-glib)
475c3278 3238 ("guile" ,guile-3.0)
48eb71ae
JN
3239 ("guile-lib" ,guile-lib)
3240 ("guile-readline" ,guile-readline)
48eb71ae 3241 ("freeglut" ,freeglut)
48eb71ae 3242 ("webkitgtk" ,webkitgtk)))
114f02ba
AS
3243 (propagated-inputs
3244 `(("glib-networking" ,glib-networking)
3245 ("gssettings-desktop-schemas" ,gsettings-desktop-schemas)))
48eb71ae 3246 (arguments
114f02ba
AS
3247 `(#:modules ((guix build gnu-build-system)
3248 (guix build utils)
3249 (ice-9 popen)
3250 (ice-9 rdelim)
3251 (ice-9 regex)
3252 (ice-9 ftw)
3253 (srfi srfi-26))
3254 #:phases
48eb71ae
JN
3255 (modify-phases %standard-phases
3256 (add-before 'configure 'setenv
3257 (lambda _
3258 (setenv "GUILE_AUTO_COMPILE" "0")
114f02ba
AS
3259 #t))
3260 (add-after 'install 'wrap-binaries
3261 (lambda* (#:key inputs outputs #:allow-other-keys)
3262 (let* ((out (assoc-ref outputs "out"))
3263 (effective (read-line
3264 (open-pipe* OPEN_READ
3265 "guile" "-c"
3266 "(display (effective-version))")))
3267 (deps (map (cut assoc-ref inputs <>)
3268 '("guile-lib" "guile-readline")))
3269 (scm-path (map (cut string-append <> "/share/guile/site/"
3270 effective) `(,out ,@deps)))
3271 (go-path (map (cut string-append <> "/lib/guile/" effective
3272 "/site-ccache/") `(,out ,@deps)))
3273 (examples (filter (cut string-match "emacsy" <>)
3274 (scandir (string-append out "/bin/"))))
3275 (progs (map (cut string-append out "/bin/" <>)
3276 examples)))
3277 (map (cut wrap-program <>
3278 `("GUILE_LOAD_PATH" ":" prefix ,scm-path)
3279 `("GUILE_LOAD_COMPILED_PATH" ":" prefix ,go-path))
3280 progs)
3281 #t))))))
48eb71ae
JN
3282 (home-page "https://savannah.nongnu.org/projects/emacsy")
3283 (synopsis "Embeddable GNU Emacs-like library using Guile")
3284 (description
3285 "Emacsy is an embeddable Emacs-like library that uses GNU Guile
f0de9544
JN
3286as extension language. Emacsy can give a C program an Emacsy feel with
3287keymaps, minibuffer, recordable macros, history, tab completion, major
3288and minor modes, etc., and can also be used as a pure Guile library. It
48eb71ae
JN
3289comes with a simple counter example using FreeGLUT and browser examples
3290in C using Gtk+-3 and WebKitGtk.")
3291 (license license:gpl3+)))
2135610c 3292
c99f32b9 3293(define-public emacsy-minimal
e9db965f 3294 (let ((commit "v0.4.1-37-g5f91ee6"))
c99f32b9
AS
3295 (package
3296 (inherit emacsy)
3297 (name "emacsy-minimal")
9da87078 3298 (version (string-drop commit 1))
bdcb287e
MR
3299 (source
3300 (origin
3301 (method git-fetch)
3302 (uri (git-reference
3303 (url "https://git.savannah.gnu.org/git/emacsy.git")
3304 (commit commit)))
3305 (file-name (git-file-name name version))
3306 (sha256
e9db965f 3307 (base32 "03ym14g9qhjqmryr5z065kynqm8yhmvnbs2djl6vp3i9cmqln8cl"))))
c99f32b9
AS
3308 (build-system gnu-build-system)
3309 (inputs
3310 `(("guile" ,guile-2.2)
8d6ead32
MR
3311 ("guile-lib" ,guile2.2-lib)
3312 ("guile-readline" ,guile2.2-readline)))
c99f32b9
AS
3313 (propagated-inputs '())
3314 (arguments
3315 `(#:configure-flags '("--without-examples")
3316 #:phases
3317 (modify-phases %standard-phases
bdcb287e
MR
3318 (add-before 'configure 'setenv
3319 (lambda _
3320 (setenv "GUILE_AUTO_COMPILE" "0")
3321 #t))))))))
c99f32b9 3322
2135610c
LC
3323(define-public guile-jpeg
3324 (let ((commit "6a1673578b297c2c1b28e44a76bd5c49e76a5046")
3325 (revision "0"))
3326 (package
3327 (name "guile-jpeg")
3328 (version (git-version "0.0" revision commit))
3329 (home-page "https://gitlab.com/wingo/guile-jpeg")
3330 (source (origin
3331 (method git-fetch)
3332 (uri (git-reference (url home-page)
3333 (commit commit)))
3334 (sha256
3335 (base32
3336 "05z9m408w3h6aqb5k3r3qa7khir0k10rxwvsrzhkcq1hr5vbmr4m"))
3337 (file-name (git-file-name name version))
3338 (modules '((guix build utils)))
3339 (snippet
3340 '(begin
3341 ;; Install .go files in the right place.
3342 (substitute* "Makefile.am"
3343 (("/ccache") "/site-ccache"))
3344 #t))))
3345 (build-system gnu-build-system)
3346 (native-inputs
3347 `(("autoconf" ,autoconf)
3348 ("automake" ,automake)
3349 ("pkg-config" ,pkg-config)
3350 ("guile" ,guile-2.2)))
3351 (synopsis "JPEG file parsing library for Guile")
3352 (description
3353 "Guile-JPEG is a Scheme library to parse JPEG image files and to
3354perform geometrical transforms on JPEG images.")
3355 (license license:gpl3+))))
e8c2da41
AS
3356
3357(define-public nomad
3358 (package
3359 (name "nomad")
569cd538 3360 (version "0.2.0-alpha-199-g3e7a475")
e8c2da41
AS
3361 (source (origin
3362 (method git-fetch)
3363 (uri (git-reference
0e5a68a2 3364 (url "https://git.savannah.gnu.org/git/nomad.git/")
e8c2da41
AS
3365 (commit version)))
3366 (file-name (git-file-name name version))
3367 (sha256
3368 (base32
569cd538 3369 "0p0ha6prp7pyadp61clbhc6b55023vxzfwy14j2qygb2mkq7fhic"))))
e8c2da41
AS
3370 (build-system gnu-build-system)
3371 (native-inputs
3372 `(("autoconf" ,autoconf)
3373 ("automake" ,automake)
3374 ("bash" ,bash)
3375 ("pkg-config" ,pkg-config)
3376 ("libtool" ,libtool)
3377 ("guile" ,guile-2.2)
5f1553ce
AS
3378 ("glib:bin" ,glib "bin")
3379 ("texinfo" ,texinfo)
fccc0127 3380 ("gettext" ,gettext-minimal)
5f1553ce 3381 ("perl" ,perl)))
e8c2da41 3382 (inputs
0e5a68a2
MR
3383 `(;; Guile
3384 ("guile" ,guile-2.2)
19cf8342 3385 ("guile-lib" ,guile2.2-lib)
19cf8342 3386 ("guile-readline" ,guile2.2-readline)
a987f128 3387 ("guile-gcrypt" ,guile2.2-gcrypt)
e8c2da41 3388 ("gnutls" ,gnutls)
0e5a68a2 3389 ("g-golf" ,g-golf)
e8c2da41
AS
3390 ("shroud" ,shroud)
3391 ("emacsy" ,emacsy-minimal)
0e5a68a2 3392 ;; Gtk
e8c2da41
AS
3393 ("glib" ,glib)
3394 ("dbus-glib" ,dbus-glib)
0e5a68a2 3395 ("glib-networking" ,glib-networking)
e8c2da41 3396 ("gtk+" ,gtk+)
a987f128 3397 ("gtk+:bin" ,gtk+ "bin")
e8c2da41 3398 ("webkitgtk" ,webkitgtk)
0e5a68a2 3399 ("gtksourceview" ,gtksourceview)
569cd538 3400 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
0e5a68a2
MR
3401 ("vte" ,vte)
3402 ;; Gstreamer
a987f128
MR
3403 ("gstreamer" ,gstreamer)
3404 ("gst-plugins-base" ,gst-plugins-base)
3405 ("gst-plugins-good" ,gst-plugins-good)
3406 ("gst-plugins-bad" ,gst-plugins-bad)
3407 ("gst-plugins-ugly" ,gst-plugins-ugly)
0e5a68a2
MR
3408 ;; Util
3409 ("xorg-server" ,xorg-server)))
e8c2da41
AS
3410 (arguments
3411 `(#:modules ((guix build gnu-build-system)
3412 (guix build utils)
3413 (ice-9 popen)
3414 (ice-9 rdelim)
3415 (srfi srfi-26))
3416 #:phases
3417 (modify-phases %standard-phases
3418 (add-before 'check 'start-xorg-server
3419 (lambda* (#:key inputs #:allow-other-keys)
3420 ;; The test suite requires a running X server.
3421 (system (format #f "~a/bin/Xvfb :1 &"
3422 (assoc-ref inputs "xorg-server")))
3423 (setenv "DISPLAY" ":1")
3424 #t))
3425 (add-after 'install 'wrap-binaries
3426 (lambda* (#:key inputs outputs #:allow-other-keys)
0e5a68a2
MR
3427 (let* ((out (assoc-ref outputs "out"))
3428 (effective (read-line (open-pipe*
3429 OPEN_READ
3430 "guile" "-c"
3431 "(display (effective-version))")))
3432 (gst-plugins (map (lambda (i)
3433 (string-append (assoc-ref inputs i)
3434 "/lib/gstreamer-1.0"))
3435 `("gstreamer"
3436 "gst-plugins-base"
3437 "gst-plugins-good"
3438 "gst-plugins-bad"
3439 "gst-plugins-ugly")))
3440 (out-append (lambda (. args)
3441 (apply string-append out args)))
3442 (gi-path (out-append "/lib/girepository-1.0"))
3443 (load-path (out-append "/share/guile/site/" effective))
3444 (comp-path (out-append "/lib/guile/"
3445 effective "/site-ccache"))
3446 (ext-path (out-append "/libexec/nomad")))
3447 (wrap-program (string-append out "/bin/nomad")
3448 `("GUILE_LOAD_PATH" ":" prefix
3449 (,load-path
3450 ,(getenv "GUILE_LOAD_PATH")))
3451 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
3452 (,comp-path
3453 ,(getenv "GUILE_LOAD_COMPILED_PATH")))
3454 `("GI_TYPELIB_PATH" ":" prefix
3455 (,gi-path ,(getenv "GI_TYPELIB_PATH")))
3456 `("GIO_EXTRA_MODULES" ":" prefix
3457 (,(getenv "GIO_EXTRA_MODULES")))
3458 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix ,gst-plugins)
3459 `("NOMAD_WEB_EXTENSION_DIR" ":" prefix (,ext-path)))
e8c2da41
AS
3460 #t))))))
3461 (home-page "https://savannah.nongnu.org/projects/nomad/")
3462 (synopsis "Extensible Web Browser in Guile Scheme")
a987f128
MR
3463 (description "Nomad is a Emacs-like web browser that consists of a modular
3464feature-set, fully programmable in Guile Scheme.")
e8c2da41 3465 (license license:gpl3+)))
248965c9
RW
3466
3467(define-public guile-cv
3468 (package
3469 (name "guile-cv")
3470 (version "0.2.1")
3471 (source (origin
3472 (method url-fetch)
3473 (uri (string-append "mirror://gnu/guile-cv/guile-cv-"
3474 version ".tar.gz"))
3475 (sha256
3476 (base32
3477 "0qdf0s2h1xj5lbhnc1pfw69i3zg08pqy2y6869b92ydfis8r82j9"))))
3478 (build-system gnu-build-system)
3479 (arguments
3480 `(#:phases
3481 (modify-phases %standard-phases
3482 (add-after 'unpack 'prepare-build
3483 (lambda* (#:key inputs outputs #:allow-other-keys)
3484 (substitute* "configure"
3485 (("SITEDIR=\"\\$datadir/guile-cv\"")
3486 "SITEDIR=\"$datadir/guile/site/$GUILE_EFFECTIVE_VERSION\"")
3487 (("SITECCACHEDIR=\"\\$libdir/guile-cv/")
3488 "SITECCACHEDIR=\"$libdir/"))
3489 (substitute* "cv/init.scm"
3490 (("\\(dynamic-link \"libvigra_c\"\\)")
3491 (string-append "(dynamic-link \""
3492 (assoc-ref inputs "vigra-c")
3493 "/lib/libvigra_c\")"))
3494 (("\\(dynamic-link \"libguile-cv\"\\)")
3495 (format #f "~s"
3496 `(dynamic-link
3497 (format #f "~alibguile-cv"
3498 (if (getenv "GUILE_CV_UNINSTALLED")
3499 ""
3500 ,(format #f "~a/lib/"
3501 (assoc-ref outputs "out"))))))))
3502 (setenv "GUILE_CV_UNINSTALLED" "1")
3503 ;; Only needed to satisfy the configure script.
3504 (setenv "LD_LIBRARY_PATH"
3505 (string-append (assoc-ref inputs "vigra-c") "/lib"))
3506 #t)))))
3507 (inputs
3508 `(("vigra" ,vigra)
3509 ("vigra-c" ,vigra-c)
3510 ("guile" ,guile-2.2)))
3511 (native-inputs
3512 `(("texlive" ,(texlive-union (list texlive-booktabs
3513 texlive-lm
3514 texlive-siunitx
3515 texlive-standalone
3516 texlive-xcolor
3517 texlive-fonts-iwona)))
3518 ("pkg-config" ,pkg-config)))
3519 (propagated-inputs
3520 `(("guile-lib" ,guile-lib)))
3521 (home-page "https://www.gnu.org/software/guile-cv/")
3522 (synopsis "Computer vision library for Guile")
3523 (description "Guile-CV is a Computer Vision functional programming library
3524for the Guile Scheme language. It is based on Vigra (Vision with Generic
3525Algorithms), a C++ image processing and analysis library. Guile-CV contains
3526bindings to Vigra C (a C wrapper to most of the Vigra functionality) and is
3527enriched with pure Guile Scheme algorithms, all accessible through a nice,
3528clean and easy to use high level API.")
3529 (license license:gpl3+)))
7ff157c1
RW
3530
3531(define-public guile-ffi-fftw
353fb48f
RW
3532 (let ((commit "294ad9e7491dcb40026d2fec9be2af05263be1c0")
3533 (revision "2"))
7ff157c1
RW
3534 (package
3535 (name "guile-ffi-fftw")
3536 (version (git-version "0" revision commit))
3537 (source (origin
3538 (method git-fetch)
3539 (uri (git-reference
b0e7b699 3540 (url "https://github.com/lloda/guile-ffi-fftw")
7ff157c1
RW
3541 (commit commit)))
3542 (file-name (git-file-name "guile-ffi-fftw" version))
3543 (sha256
3544 (base32
353fb48f 3545 "08j40a5p6a8pgvhffmzb5rfdnrav2mksy3gfjkdqy93jfj1z5afg"))))
7ff157c1
RW
3546 (build-system guile-build-system)
3547 (arguments
3548 `(#:source-directory "mod"
3549 #:phases
3550 (modify-phases %standard-phases
3551 (add-after 'unpack 'prepare-build
3552 (lambda* (#:key inputs #:allow-other-keys)
3553 (substitute* "mod/ffi/fftw.scm"
3554 (("\\(getenv \"GUILE_FFI_FFTW_LIBFFTW3_PATH\"\\)")
3555 (format #f "\"~a/lib\"" (assoc-ref inputs "fftw"))))
3556 #t))
3557 (add-after 'build 'check
3558 (lambda _
3559 (invoke "guile" "-L" "mod"
3560 "-s" "test/test-ffi-fftw.scm"))))))
3561 (inputs
3562 `(("fftw" ,fftw)
3563 ("guile" ,guile-2.2)))
3564 (home-page "https://github.com/lloda/guile-ffi-fftw/")
3565 (synopsis "Access FFTW through Guile's FFI")
3566 (description "This is a minimal set of Guile FFI bindings for the FFTW
3567library's ‘guru interface’. It provides two functions: @code{fftw-dft! rank
3568sign in out} and @code{fftw-dft rank sign in}. These bindings being minimal,
3569there is no support for computing & reusing plans, or split r/i transforms, or
3570anything other than straight complex DFTs.")
353fb48f 3571 (license license:lgpl3+))))
f9ec89f4
TS
3572
3573(define-public srfi-64-driver
3574 (package
3575 (name "srfi-64-driver")
3576 (version "0.1")
3577 (source (origin
3578 (method url-fetch)
3579 (uri (string-append "https://files.ngyro.com/srfi-64-driver/"
3580 "srfi-64-driver-" version ".tar.gz"))
3581 (sha256
3582 (base32
3583 "188b6mb7sjjg0a8zldikinglf40ky8mg8rwh5768gjmch6gkk3ph"))))
3584 (build-system gnu-build-system)
3585 (arguments
3586 `(#:tests? #f
3587 #:phases
3588 (modify-phases %standard-phases
3589 (delete 'build))))
3590 (native-inputs
3591 `(("pkg-config" ,pkg-config)))
3592 (inputs
3593 `(("guile" ,guile-2.2)))
3594 (home-page "https://ngyro.com/software/srfi-64-driver.html")
3595 (synopsis "Automake test driver for SRFI 64 test suites")
3596 (description "This package provides an Automake test driver that can
3597run SRFI 64 test suites. It gives Automake insight into the individual
3598tests being run, resulting clearer and more specific output.")
3599 (license license:gpl3+)))
f6bf4b2c
TS
3600
3601(define-public guile-semver
3602 (package
3603 (name "guile-semver")
85ced665 3604 (version "0.1.1")
f6bf4b2c
TS
3605 (source (origin
3606 (method url-fetch)
3607 (uri (string-append "https://files.ngyro.com/guile-semver/"
3608 "guile-semver-" version ".tar.gz"))
3609 (sha256
3610 (base32
85ced665 3611 "109p4n39ln44cxvwdccf9kgb96qx54makvd2ir521ssz6wchjyag"))))
f6bf4b2c
TS
3612 (build-system gnu-build-system)
3613 (native-inputs
85ced665 3614 `(("pkg-config" ,pkg-config)))
f6bf4b2c 3615 (inputs
720e87fe 3616 `(("guile" ,guile-3.0)))
f6bf4b2c
TS
3617 (home-page "https://ngyro.com/software/guile-semver.html")
3618 (synopsis "Semantic Versioning (SemVer) for Guile")
3619 (description "This Guile library provides tools for reading,
3620comparing, and writing Semantic Versions. It also includes ranges in
3621the style of the Node Package Manager (NPM).")
3622 (license license:gpl3+)))
d67fa5c8 3623
b488b64a 3624(define-public guile3.0-semver
720e87fe
LC
3625 (deprecated-package "guile3.0-semver" guile-semver))
3626
3627(define-public guile2.2-semver
b488b64a
MB
3628 (package
3629 (inherit guile-semver)
720e87fe 3630 (name "guile2.2-semver")
b488b64a 3631 (inputs
720e87fe 3632 `(("guile" ,guile-2.2)))))
b488b64a 3633
d67fa5c8
LC
3634(define-public guile-hashing
3635 (package
3636 (name "guile-hashing")
3637 (version "1.2.0")
3638 (home-page "https://github.com/weinholt/hashing")
3639 (source (origin
3640 (method git-fetch)
3641 (uri (git-reference
3642 (url home-page)
3643 (commit (string-append "v" version))))
3644 (file-name (git-file-name name version))
3645 (sha256
3646 (base32
3647 "1362d3lmpv7slmv1zmr9wy8panq9sjr9787gc2hagd646mpsfpkl"))))
3648 (build-system guile-build-system)
3649 (arguments
3650 `(#:modules ((guix build guile-build-system)
3651 (guix build utils)
3652 (srfi srfi-26)
3653 (ice-9 ftw))
3654 #:implicit-inputs? #f ;needs nothing but Guile
3655 #:phases (modify-phases %standard-phases
3656 (add-before 'build 'move-sls-files
3657 (lambda _
3658 ;; Move the source under hashing/ in order to match
3659 ;; module names, and rename .sls files to .scm.
3660 (define (target file)
3661 (string-append "hashing/" file))
3662
3663 (define (sls->scm sls)
3664 (string-append (string-drop-right sls 4)
3665 ".scm"))
3666
3667 (mkdir "hashing")
3668 (for-each (lambda (file)
3669 (rename-file file (sls->scm file)))
3670 (find-files "." "\\.sls$"))
3671 (for-each (lambda (file)
3672 (rename-file file (target file)))
3673 (scandir "." (cut string-suffix? ".scm" <>)))
3674 (rename-file "private" "hashing/private")
3675 #t)))))
3676 (native-inputs
b6bee63b 3677 `(("guile" ,guile-3.0)))
d67fa5c8
LC
3678 (synopsis "Cryprographic hash functions implemented in Scheme")
3679 (description
3680 "The @code{(hashing @dots{})} modules implement cryptographic hash
3681functions in pure R6RS Scheme: CRC, HMAC, MD5, SHA-1, and SHA-2 (SHA-256,
3682SHA-512).")
3683 (license license:expat)))
f918a8d9 3684
b6bee63b 3685(define-public guile2.2-hashing
f918a8d9
LC
3686 (package
3687 (inherit guile-hashing)
b6bee63b 3688 (name "guile2.2-hashing")
f918a8d9 3689 (native-inputs
318e1a93 3690 `(("guile" ,guile-2.2)))))
ef2b1d2c 3691
b6bee63b
LC
3692(define-public guile3.0-hashing
3693 (deprecated-package "guile3.0-hashing" guile-hashing))
3694
60c9264b
LC
3695(define-public guile-packrat
3696 (package
3697 (name "guile-packrat")
3698 (version "0.1.1")
3699 (home-page "https://github.com/weinholt/packrat")
3700 (source (origin
3701 (method git-fetch)
3702 (uri (git-reference
3703 (url home-page)
3704 (commit (string-append "v" version))))
3705 (file-name (git-file-name name version))
3706 (sha256
3707 (base32
3708 "1aga17164fkhbgllqc7ni6fk5zl8mkmgkl5zcsy67x7ngpyalbby"))))
3709 (build-system guile-build-system)
3710 (arguments
3711 `(#:implicit-inputs? #f ;needs nothing but Guile
3712 #:compile-flags '("--r6rs" "-Wunbound-variable" "-Warity-mismatch")
3713 #:not-compiled-file-regexp "/extensible\\.scm$"
3714 #:phases (modify-phases %standard-phases
3715 (add-before 'build 'no-srfi-23
3716 (lambda _
3717 (substitute* "packrat.sls"
3718 (("\\(srfi :23 error\\)")
3719 (object->string '(only (guile) error))))
3720 #t)))))
3721 (native-inputs
3722 `(("guile" ,guile-3.0)))
3723 (synopsis "Packrat parser library in R6RS Scheme")
3724 (description
3725 "This is an R6RS Scheme adaptation of the
3726@uref{https://bford.info/packrat/, packrat parsing}. Packrat parsing is a
3727memoizing, backtracking, recursive-descent parsing technique that runs in time
3728and space linear in the size of the input text.")
3729 (license license:expat)))
3730
97a77eab
LC
3731(define-public guile-ac-d-bus
3732 (package
3733 (name "guile-ac-d-bus")
933fdd55 3734 (version "1.0.0-beta.0")
97a77eab
LC
3735 (home-page "https://gitlab.com/weinholt/ac-d-bus/")
3736 (source (origin
3737 (method git-fetch)
3738 (uri (git-reference
3739 (url home-page)
3740 (commit (string-append "v" version))))
3741 (file-name (git-file-name name version))
3742 (sha256
3743 (base32
933fdd55 3744 "0rl809qimhgz6b0rixakb42r2l4g53jr09a2g0s1hxgab0blz0kb"))))
97a77eab
LC
3745 (build-system guile-build-system)
3746 (arguments
3747 `(#:implicit-inputs? #f ;needs nothing but Guile
3748 #:compile-flags '("--r6rs" "-Wunbound-variable" "-Warity-mismatch")
3749 #:phases (modify-phases %standard-phases
3750 (add-before 'build 'adjust-for-guile
3751 (lambda _
3752 ;; Adjust source file names for Guile.
3753 (define (guile-sls->sls file)
3754 (string-append (string-drop-right
3755 file (string-length ".guile.sls"))
3756 ".sls"))
3757
3758 ;; Remove files targeting other implementations:
3759 ;; *.mosh.sls, etc.
3760 (for-each delete-file
3761 (find-files
3762 "compat"
3763 (lambda (file stat)
3764 (not (string-contains file ".guile.")))))
3765
3766 ;; Rename *.guile.sls to *.sls so the ".guile" bit does
3767 ;; not appear in .go file names.
3768 (for-each (lambda (file)
3769 (rename-file file (guile-sls->sls file)))
3770 (find-files "compat" "\\.guile\\.sls"))
3771
3772 ;; Move directories under d-bus/ to match module names.
3773 (mkdir "d-bus")
3774 (for-each (lambda (directory)
3775 (rename-file directory
3776 (string-append "d-bus/"
3777 directory)))
3778 '("compat" "protocol"))
3779
3780 #t)))))
3781 (native-inputs
3782 `(("guile" ,guile-3.0)))
3783 (propagated-inputs
3784 `(("guile-packrat" ,guile-packrat)))
3785 (synopsis "D-Bus protocol implementation in R6RS Scheme")
3786 (description
3787 "AC/D-Bus is an implementation of the D-Bus wire protocol. D-Bus is an
3788interprocess communication protocol popular on GNU/Linux systems to
3789communicate with a variety of services. Originally designed for desktop
3790environments, it is now used by programs like VLC media player, BlueZ,
3791NetworkManager, Pulseaudio, systemd (including logind and resolved), Polkit,
3792gnome-keyring, and many more.")
3793 (license license:expat)))
3794
ef2b1d2c
RW
3795(define-public guile-webutils
3796 (let ((commit "8541904f761066dc9c27b1153e9a838be9a55299")
3797 (revision "0"))
3798 (package
3799 (name "guile-webutils")
3800 (version (git-version "0.1" revision commit))
3801 (source (origin
3802 (method git-fetch)
3803 (uri (git-reference
3804 (url "https://notabug.org/cwebber/guile-webutils.git")
3805 (commit commit)))
3806 (file-name (git-file-name name version))
3807 (sha256
3808 (base32
0a76d7a9
RW
3809 "1s9n3hbxd7lfpdi0x8wr0cfvlsf6g62ird9gbspxdrp5p05rbi64"))
3810 (modules '((guix build utils)))
3811 (snippet
3812 '(begin
3813 ;; Allow builds with Guile 3.0.
3814 (substitute* "configure.ac"
3815 (("2\\.2 2\\.0")
3816 "3.0 2.2 2.0"))
3817 #t))))
ef2b1d2c
RW
3818 (build-system gnu-build-system)
3819 (native-inputs
3820 `(("autoconf" ,autoconf)
3821 ("automake" ,automake)
3822 ("pkg-config" ,pkg-config)
3823 ("texinfo" ,texinfo)))
3824 (inputs
0a76d7a9 3825 `(("guile" ,guile-3.0)))
ef2b1d2c
RW
3826 (propagated-inputs
3827 `(("guile-irregex" ,guile-irregex)
3828 ("guile-gcrypt" ,guile-gcrypt)))
3829 (home-page "https://notabug.org/cwebber/guile-webutils")
3830 (synopsis "Web application authoring utilities for Guile")
3831 (description
3832 "This package provides tooling to write web applications in Guile, such
3833as signed sessions, multipart message support, etc.")
3834 (license license:gpl3+))))
5479cef8 3835
0a76d7a9
RW
3836(define-public guile2.2-webutils
3837 (package
3838 (inherit guile-webutils)
3839 (name "guile2.2-webutils")
3840 (inputs
3841 `(("guile" ,guile-2.2)))
3842 (propagated-inputs
3843 `(("guile-irregex" ,guile2.2-irregex)
3844 ("guile-gcrypt" ,guile2.2-gcrypt)))))
3845
5479cef8
RW
3846(define-public guile-lens
3847 (let ((commit "14b15d07255f9d3f55d40a3b750d13c9ee3a154f")
3848 (revision "0"))
3849 (package
3850 (name "guile-lens")
3851 (version (git-version "0.1" revision commit))
3852 (source (origin
3853 (method git-fetch)
3854 (uri (git-reference
3855 (url "https://gitlab.com/a-sassmannshausen/guile-lens.git")
3856 (commit commit)))
3857 (file-name (git-file-name name version))
3858 (sha256
3859 (base32
3860 "0w8jzqyla56yrgj7acsgd4nspyir6zgp3vgxid4xmwhg9wmf1ida"))))
3861 (build-system gnu-build-system)
3862 (arguments
3863 '(#:phases
3864 (modify-phases %standard-phases
3865 (add-after 'unpack 'run-hall
3866 (lambda _
3867 (setenv "HOME" "/tmp") ; for ~/.hall
3868 (invoke "hall" "dist" "-x"))))))
3869 (native-inputs
3870 `(("autoconf" ,autoconf)
3871 ("automake" ,automake)
ca24b3fb 3872 ("guile" ,guile-3.0)
5479cef8
RW
3873 ("guile-hall" ,guile-hall)
3874 ("pkg-config" ,pkg-config)
3875 ("texinfo" ,texinfo)))
3876 (home-page "https://gitlab.com/a-sassmannshausen/guile-lens.git")
3877 (synopsis "Composable lenses for data structures in Guile")
3878 (description
3879 "Guile-Lens is a library implementing lenses in Guile. The library is
3880currently a re-implementation of the lentes library for Clojure. Lenses
3881provide composable procedures, which can be used to focus, apply functions
3882over, or update a value in arbitrary data structures.")
3883 (license license:gpl3+))))
69bb61f1 3884
ca24b3fb
RW
3885(define-public guile2.2-lens
3886 (package
3887 (inherit guile-lens)
3888 (name "guile2.2-lens")
3889 (native-inputs
3890 `(("guile" ,guile-2.2)
3891 ,@(alist-delete "guile" (package-native-inputs guile-lens))))))
3892
69bb61f1 3893(define-public guile-xapian
d10e7a34
RW
3894 (package
3895 (name "guile-xapian")
3896 (version "0.1.0")
3897 (home-page "https://git.systemreboot.net/guile-xapian")
3898 (source
3899 (origin
3900 (method git-fetch)
3901 (uri (git-reference (url home-page)
3902 (commit (string-append "v" version))))
3903 (file-name (git-file-name name version))
3904 (sha256
3905 (base32
3906 "16k61f1jn3g48jaf3730b9l0izr5j933jzyri73nmcnjd09gm35i"))))
3907 (build-system gnu-build-system)
3908 (arguments
3909 '(#:make-flags '("GUILE_AUTO_COMPILE=0"))) ; to prevent guild warnings
3910 (inputs
93989aed 3911 `(("guile" ,guile-3.0)
d10e7a34
RW
3912 ("xapian" ,xapian)
3913 ("zlib" ,zlib)))
3914 (native-inputs
3915 `(("autoconf" ,autoconf)
3916 ("autoconf-archive" ,autoconf-archive)
3917 ("automake" ,automake)
3918 ("libtool" ,libtool)
3919 ("pkg-config" ,pkg-config)
3920 ("swig" ,swig)))
3921 (synopsis "Guile bindings for Xapian")
3922 (description "@code{guile-xapian} provides Guile bindings for Xapian, a
69bb61f1
AI
3923search engine library. Xapian is a highly adaptable toolkit which allows
3924developers to easily add advanced indexing and search facilities to their own
3925applications. It has built-in support for several families of weighting
3926models and also supports a rich set of boolean query operators.")
d10e7a34 3927 (license license:gpl2+)))
69bb61f1 3928
93989aed 3929(define-public guile2.2-xapian
69bb61f1
AI
3930 (package
3931 (inherit guile-xapian)
93989aed 3932 (name "guile2.2-xapian")
69bb61f1 3933 (inputs
93989aed 3934 `(("guile" ,guile-2.2)
69bb61f1 3935 ,@(alist-delete "guile" (package-inputs guile-xapian))))))
be789065 3936
93989aed
LC
3937(define-public guile3.0-xapian
3938 (deprecated-package "guile3.0-xapian" guile-xapian))
3939
be789065
AS
3940(define-public guile-torrent
3941 (package
3942 (name "guile-torrent")
3943 (version "0.1.3")
3944 (source (origin (method git-fetch)
3945 (uri (git-reference
3946 (url
8ed4c468 3947 "https://github.com/o-nly/torrent")
be789065
AS
3948 (commit version)))
3949 (file-name (git-file-name name version))
3950 (sha256
3951 (base32
3952 "1yiagi55ncq1x7s9n7salzywjm4l96y3n7y3s47a9anvz87mrmim"))))
3953 (build-system gnu-build-system)
3954 (native-inputs
3955 `(("autoconf" ,autoconf)
3956 ("automake" ,automake)
3957 ("guile" ,guile-2.2)
3958 ("texinfo" ,texinfo)
3959 ("perl" ,perl)
3960 ("pkg-config" ,pkg-config)))
3961 (propagated-inputs
3962 `(("guile-gcrypt" ,guile-gcrypt)))
3963 (home-page "https://github.com/o-nly/torrent")
3964 (synopsis "Torrent library for GNU Guile")
3965 (description "This package provides facilities for working with
3966@code{.torrent} or metainfo files. Implements a bencode reader and writer
3967according to Bitorrent BEP003.")
3968 (license license:gpl3+)))
3c0456c6
RW
3969
3970(define-public guile-irc
3971 (let ((commit "375d3bde9c6ae7ccc9d7cc65817966b6fda8f26a")
3972 (revision "0"))
3973 (package
3974 (name "guile-irc")
3975 (version (git-version "0.3.0" revision commit))
3976 (source (origin
3977 (method git-fetch)
3978 (uri (git-reference
b0e7b699 3979 (url "https://github.com/rekado/guile-irc")
3c0456c6
RW
3980 (commit commit)))
3981 (file-name (git-file-name name version))
3982 (sha256
3983 (base32
3984 "113lcckcywrz9060w1c3fnvr8d7crdsjgsv4h47hgmr1slgadl4y"))))
3985 (build-system gnu-build-system)
3986 (arguments
3987 `(#:configure-flags '("--enable-gnutls=yes")))
3988 (native-inputs
3989 `(("autoconf" ,autoconf)
3990 ("automake" ,automake)
3991 ("texinfo" ,texinfo)))
3992 (inputs
3993 `(("gnutls" ,gnutls)
b4412382 3994 ("guile" ,guile-3.0)))
3c0456c6
RW
3995 (home-page "https://github.com/rekado/guile-irc")
3996 (synopsis "IRC library for Guile")
3997 (description "This package provides a Guile library for @dfn{Internet
3998Relay Chat} (IRC).")
3999 ;; Some file headers incorrectly say LGPLv2+.
4000 (license license:lgpl2.1+))))
8ffc20ef 4001
b141e1d5 4002(define-public guile-websocket
8ffc20ef
ES
4003 (let ((commit "c854e0f84a40d972cbd532bbb89c97ca0126a7cf"))
4004 (package
b141e1d5 4005 (name "guile-websocket")
8ffc20ef
ES
4006 (version "0.1")
4007 (source
4008 (origin
4009 (method git-fetch)
4010 (uri (git-reference
4011 (url "git://dthompson.us/guile-websocket.git")
4012 (commit commit)))
4013 (file-name (git-file-name name version))
4014 (sha256
4015 (base32
4016 "1hymvsfrmq9qxr5cxnsgdz7y757yp1cpsgxmdp3f5wxxxpqgsmzx"))))
4017 (build-system gnu-build-system)
4018 (arguments
4019 '(#:make-flags
4020 '("GUILE_AUTO_COMPILE=0")
4021 #:phases
4022 (modify-phases %standard-phases
4023 ;; The package was developed for Guile 2.0 and has this version
4024 ;; hardcoded in the configure.ac and Makefile.am files. Substitute
4025 ;; 3.0 instead so it can support Guile 3.0.
4026 (add-after 'unpack 'update-guile-version
4027 (lambda _
4028 (substitute* "configure.ac"
4029 (("2.0.9") "3.0.0"))
4030 (substitute* "Makefile.am"
cea91813
LC
4031 (("2.0") "3.0")
4032
4033 ;; Install .go files where they belong.
4034 (("/ccache") "/site-ccache"))
8ffc20ef
ES
4035 #t)))))
4036 (native-inputs
4037 `(("autoconf" ,autoconf)
4038 ("automake" ,automake)))
4039 (inputs
b141e1d5 4040 `(("guile" ,guile-3.0)))
8ffc20ef
ES
4041 (synopsis "Websocket server/client for Guile")
4042 (description "Guile-websocket provides an implementation of the
4043WebSocket protocol as defined by RFC 6455.")
4044 (home-page "https://git.dthompson.us/guile-websocket.git")
4045 (license license:lgpl3+))))
b141e1d5
LC
4046
4047(define-public guile3.0-websocket
4048 (deprecated-package "guile3.0-websocket" guile-websocket))
c08f235b
JL
4049
4050(define-public guile-rdf
4051 (package
4052 (name "guile-rdf")
4053 (version "1.0")
4054 (source
4055 (origin
4056 (method git-fetch)
4057 (uri (git-reference
4058 (url "https://framagit.org/tyreunom/guile-rdf")
4059 (commit version)))
4060 (file-name (git-file-name name version))
4061 (sha256
4062 (base32
4063 "0dwn3app1fscbpmpgvjs5jy1y0gwy3j5gdx8br79af6a88zjlnqf"))))
4064 (build-system gnu-build-system)
4065 (arguments
4066 `(#:tests? #f)); tests require network
4067 (inputs
4068 `(("guile" ,guile-3.0)))
4069 (native-inputs
4070 `(("automake" ,automake)
4071 ("autoconf" ,autoconf)
4072 ("pkg-config" ,pkg-config)
4073 ("texinfo" ,texinfo)))
4074 (home-page "https://framagit.org/tyreunom/guile-rdf")
4075 (synopsis "Guile implementation of the RDF abstract and concrete syntaxes")
4076 (description "Guile RDF is an implementation of the RDF (Resource Description
4077Framework) format defined by the W3C for GNU Guile. RDF structures include
4078triples (facts with a subject, a predicate and an object), graphs which are
4079sets of triples, and datasets, which are collections of graphs.
4080
4081RDF specifications include the specification of concrete syntaxes and of
4082operations on graphs. This library implements some basic functionalities,
4083such as parsing and producing turtle and nquads syntax, as well as
4084manipulating graphs and datasets.")
4085 (license license:gpl3+)))
d1fa24af
JL
4086
4087(define-public guile-jsonld
4088 (package
4089 (name "guile-jsonld")
1bad456e 4090 (version "1.0.2")
d1fa24af
JL
4091 (source
4092 (origin
4093 (method git-fetch)
4094 (uri (git-reference
4095 (url "https://framagit.org/tyreunom/guile-jsonld")
4096 (commit version)))
4097 (file-name (git-file-name name version))
4098 (sha256
4099 (base32
1bad456e 4100 "1ryyvh71899z2inivqglb8d78zzp1sd0wv9a56kvcmrxf1966z6r"))))
d1fa24af
JL
4101 (build-system gnu-build-system)
4102 (arguments
4103 `(#:tests? #f)); require network
4104 (propagated-inputs
4105 `(("guile-gnutls" ,gnutls)
1bad456e 4106 ("guile-json" ,guile-json-4)
d1fa24af
JL
4107 ("guile-rdf" ,guile-rdf)))
4108 (inputs
4109 `(("guile" ,guile-3.0)))
4110 (native-inputs
4111 `(("automake" ,automake)
4112 ("autoconf" ,autoconf)
4113 ("pkg-config" ,pkg-config)
4114 ("texinfo" ,texinfo)))
4115 (home-page "https://framagit.org/tyreunom/guile-jsonld")
4116 (synopsis "Guile implementation of the JsonLD API specification")
4117 (description "Guile JsonLD is an implementation of the JsonLD (Json for
4118Linked Data) API defined by the W3C for GNU Guile. It allows you to express links
4119between data, in a way that is very similar to WikiData or RDF for instance.
4120An object can have relations (in the form of an IRI) that relates it to one or
4121more objects or strings, represented by a Json object or an IRI.")
4122 (license license:gpl3+)))
a684e6e2
MB
4123
4124(define-public guile-struct-pack
4125 (package
4126 (name "guile-struct-pack")
4127 (version "1.1.1")
4128 (source
4129 (origin
4130 (method git-fetch)
4131 (uri (git-reference
4132 (url "https://github.com/weinholt/struct-pack")
4133 (commit (string-append "v" version))))
4134 (file-name (git-file-name name version))
4135 (sha256
4136 (base32 "0hd72m821pahjphzyjn26i55542v8makr55xzjll2cycja4wsbc1"))))
4137 (build-system guile-build-system)
4138 (arguments
4139 `(#:compile-flags '("--r6rs" "-Wunbound-variable" "-Warity-mismatch")
4140 #:modules ((guix build guile-build-system)
4141 (guix build utils)
4142 (srfi srfi-26)
4143 (ice-9 ftw))
4144 #:phases (modify-phases %standard-phases
4145 (add-before 'build 'move-sls-files
4146 (lambda _
4147 ;; Move files under a struct/ directory to reflect the
4148 ;; module hierarchy.
4149 (define dst-folder "struct")
4150 (define (target file)
4151 (string-append dst-folder "/" file))
4152 (define files
4153 (scandir "." (negate (cut member <> '("." "..")))))
4154 (mkdir dst-folder)
4155 (for-each (lambda (file)
4156 (rename-file file (target file)))
4157 files)
4158 #t)))))
4159 (native-inputs
4160 `(("guile" ,guile-3.0)))
4161 (home-page "https://github.com/weinholt/struct-pack")
4162 (synopsis "R6RS library for working with packed byte structures")
4163 (description
4164 "This is an R6RS library for working with packed byte structures. It is
4165similar to struct in Python or pack and unpack in Perl.")
4166 (license license:expat)))
199da208
MB
4167
4168(define-public guile-machine-code
4169 (package
4170 (name "guile-machine-code")
4171 (version "2.1.0")
4172 (source
4173 (origin
4174 (method git-fetch)
4175 (uri (git-reference
4176 (url "https://github.com/weinholt/machine-code")
4177 (commit (string-append "v" version))))
4178 (file-name (git-file-name name version))
4179 (sha256
4180 (base32 "0wzj3caj2jypzyjqfkfqkvr3kkbjabsnhldv9kvnx9w9qnria5yd"))))
4181 (build-system guile-build-system)
4182 (arguments
4183 `(#:compile-flags '("--r6rs" "-Wunbound-variable" "-Warity-mismatch")
4184 #:modules ((guix build guile-build-system)
4185 (guix build utils)
4186 (srfi srfi-26)
4187 (ice-9 ftw))
4188 #:phases (modify-phases %standard-phases
4189 (add-before 'build 'move-sls-files
4190 (lambda _
4191 ;; Move files under a struct/ directory to reflect the
4192 ;; module hierarchy.
4193 (define dst-folder "machine-code")
4194 (define (target file)
4195 (string-append dst-folder "/" file))
4196 (define files
4197 (scandir "." (negate (cut member <> '("." "..")))))
4198 (mkdir dst-folder)
4199 (for-each (lambda (file)
4200 (rename-file file (target file)))
4201 files)
4202 #t)))))
4203 (native-inputs
4204 `(("guile" ,guile-3.0)))
4205 (propagated-inputs
4206 `(("guile-struct-pack" ,guile-struct-pack)))
4207 (home-page "https://github.com/weinholt/machine-code")
4208 (synopsis "Tools that relate to machine code and object formats")
4209 (description
4210 "This project is about the development of tools that relate to machine
4211code and object formats; for all architectures. Here you'll find libraries
4212for working with binary code: assembly, disassembly, instruction tables,
4213object formats and related areas.")
4214 (license license:expat)))
3826288f
MB
4215
4216(define-public guile-laesare
4217 (package
4218 (name "guile-laesare")
4219 (version "1.0.0")
4220 (source
4221 (origin
4222 (method git-fetch)
4223 (uri (git-reference
4224 (url "https://github.com/weinholt/laesare")
4225 (commit (string-append "v" version))))
4226 (file-name (git-file-name name version))
4227 (sha256
4228 (base32 "15q619gzw717r8r1ql23zfdaibpnp9qqs96032vdc3rj74msxc92"))))
4229 (build-system guile-build-system)
4230 (arguments
4231 `(#:compile-flags '("--r6rs" "-Wunbound-variable" "-Warity-mismatch")
4232 #:modules ((guix build guile-build-system)
4233 (guix build utils)
4234 (srfi srfi-26)
4235 (ice-9 ftw))
4236 #:phases (modify-phases %standard-phases
4237 (add-before 'build 'move-sls-files
4238 (lambda _
4239 ;; Move files under a laesare directory to reflect
4240 ;; the module hierarchy.
4241 (define dst-folder "laesare")
4242 (define (target file)
4243 (string-append dst-folder "/" file))
4244 (define files
4245 (scandir "." (negate (cut member <> '("." "..")))))
4246 (mkdir dst-folder)
4247 (for-each (lambda (file)
4248 (rename-file file (target file)))
4249 files)
4250 #t)))))
4251 (native-inputs
4252 `(("guile" ,guile-3.0)))
4253 (home-page "https://github.com/weinholt/laesare")
4254 (synopsis "R6RS Scheme library that provides a reader")
4255 (description
4256 "This is an R6RS Scheme library that provides a reader with some extra
4257features not found in the standard read procedure such as a compatible mode
4258with support for other RnRS standards and a tolerant mode that continues on
4259errors.")
4260 (license license:expat)))
465a951c
MO
4261
4262(define-public guile-avahi
d7f2b1e5
MO
4263 (let ((commit "6d43caf64f672a9694bf6c98bbf7a734f17a51e8")
4264 (revision "1"))
4265 (package
4266 (name "guile-avahi")
4267 (version (git-version "0.4.0" revision commit))
4268 (source (origin
4269 (method git-fetch)
4270 (uri (git-reference
4271 (url "git://git.sv.gnu.org/guile-avahi.git")
4272 (commit commit)))
4273 (file-name (git-file-name name version))
4274 (sha256
4275 (base32
4276 "0fvrf8x22yvc71180hd3xkhspg9yvadi0pbv8shzlsaxqncwy1m9"))
4277 (modules '((guix build utils)))))
4278 (build-system gnu-build-system)
4279 (arguments
4280 `(#:modules (((guix build guile-build-system)
4281 #:select (target-guile-effective-version))
4282 ,@%gnu-build-system-modules)
4283 #:imported-modules ((guix build guile-build-system)
4284 ,@%gnu-build-system-modules)
4285 #:make-flags
4286 '("GUILE_AUTO_COMPILE=0") ;to prevent guild warnings
4287 #:phases
4288 (modify-phases %standard-phases
4289 (add-before 'check 'fix-guile-avahi-file-name
4290 (lambda* (#:key outputs #:allow-other-keys)
4291 (with-directory-excursion "src"
4292 (invoke "make" "install"
4293 "-j" (number->string
4294 (parallel-job-count))))
4295 (let* ((out (assoc-ref outputs "out"))
4296 (files (find-files "modules" ".scm")))
4297 (substitute* files
4298 (("\"guile-avahi-v-0\"")
4299 (format #f "\"~a/lib/guile/~a/extensions/guile-avahi-v-0\""
4300 out (target-guile-effective-version))))
4301 #t))))))
4302 (inputs
4303 `(("guile" ,guile-3.0)
4304 ("avahi" ,avahi)))
4305 (native-inputs
4306 `(("autoconf" ,autoconf)
4307 ("automake" ,automake)
4308 ("libtool" ,libtool)
d7f2b1e5
MO
4309 ("pkg-config" ,pkg-config)
4310 ("texinfo" ,texinfo)))
4311 (synopsis "Guile bindings to Avahi")
4312 (description
4313 "This package provides bindings for Avahi. It allows programmers to
4314use functionalities of the Avahi client library from Guile Scheme programs.
4315Avahi itself is an implementation of multicast DNS (mDNS) and DNS Service
465a951c 4316Discovery (DNS-SD).")
d7f2b1e5
MO
4317 (home-page "https://www.nongnu.org/guile-avahi/")
4318 (license license:lgpl3+))))
a8c1eaba 4319
4320(define-public guile-mkdir-p
4321 (package
4322 (name "guile-mkdir-p")
4323 (version "1.0.1")
4324 (source
4325 (origin
4326 (method git-fetch)
4327 (uri (git-reference
4328 (url "https://code.divoplade.fr/mkdir-p.git")
4329 (commit (string-append "v" version))))
4330 (sha256
4331 (base32 "01k20rjcv6p0spmw8ls776aar6bfw0jxw46d2n12w0cb2p79xjv8"))
4332 (file-name (git-file-name name version))
4333 (snippet
4334 `(begin
4335 (with-output-to-file ".tarball-version"
4336 (lambda _ (format #t "~a~%" ,version)))
4337 #t))))
4338 (build-system gnu-build-system)
4339 (arguments `())
4340 (native-inputs
4341 `(("guile" ,guile-3.0)
4342 ("texinfo" ,texinfo)
4343 ("autoconf" ,autoconf)
4344 ("autoconf-archive" ,autoconf-archive)
4345 ("automake" ,automake)
4346 ("pkg-config" ,pkg-config)
fccc0127 4347 ("gettext" ,gettext-minimal)))
a8c1eaba 4348 (inputs `(("guile" ,guile-3.0)))
4349 (synopsis "Implementation of a recursive @code{mkdir} for Guile")
4350 (description
4351 "This package provides within the @code{(mkdir-p)} module the
4352@code{mkdir-p} function that tries to create the chain of directories
4353recursively. It also provides new versions of @code{open-output-file},
4354@code{call-with-output-file} and @code{with-output-to-file} to create the
4355directory of its argument if it does not exist.")
4356 (home-page "https://mkdir-p.divoplade.fr")
4357 (license license:asl2.0)))
f53c1005 4358
01b59dea
RW
4359(define-public guile-jwt
4360 (package
4361 (name "guile-jwt")
4362 (version "0.2.0")
4363 (source
4364 (origin
4365 (method git-fetch)
4366 (uri (git-reference
4367 (url "https://github.com/aconchillo/guile-jwt")
4368 (commit version)))
4369 (file-name (git-file-name name version))
4370 (sha256
4371 (base32
4372 "1p8sapiv5im18rjnzc8xnw6y7dr661rycf9g10z5ww0dl4rfz3z1"))))
4373 (build-system gnu-build-system)
4374 (native-inputs
4375 `(("autoconf" ,autoconf)
4376 ("automake" ,automake)
4377 ("pkg-config" ,pkg-config)))
4378 (propagated-inputs
4379 `(("guile-json" ,guile-json-4)))
4380 (inputs
4381 `(("guile" ,guile-3.0)))
4382 (home-page "https://github.com/aconchillo/guile-jwt")
4383 (synopsis "JSON Web Token library for Guile")
4384 (description
4385 "guile-jwt is a JSON Web Token module for Guile. JSON Web Tokens are an
4386open, industry standard (RFC 7519) method for representing claims securely
4387between two parties. guile-jwt allows you to decode, verify and generate
4388JWT. Supported algorithms: HS256, HS384, HS512.")
4389 (license license:gpl3+)))
4390
f53c1005 4391(define-public guile-sodium
4392 (package
4393 (name "guile-sodium")
4394 (version "0.1.0")
4395 (source
4396 (origin
4397 (method git-fetch)
4398 (uri (git-reference
4399 (url "https://inqlab.net/git/guile-sodium.git")
4400 (commit (string-append "v" version))))
4401 (file-name (git-file-name name version))
4402 (sha256 (base32 "189jsj87hycs57a54x0b9lifwvhr63nypb9vfxdrq7rwrpcvi5f8"))))
4403 (build-system gnu-build-system)
4404 (arguments `())
4405 (native-inputs
4406 `(("autoconf" ,autoconf)
4407 ("automake" ,automake)
4408 ("pkg-config" ,pkg-config)
4409 ("texinfo" ,texinfo)))
4410 (inputs `(("guile" ,guile-3.0)))
4411 (propagated-inputs `(("libsodium" ,libsodium)))
4412 (synopsis "Guile bindings to the libsodium cryptographic library")
4413 (description
4414 "This package provides Guile bindings to the libsodium cryptographic library
4415which provides core cryptographic primitives needed to build higher-level
4416tools.")
4417 (home-page "https://inqlab.net/git/guile-sodium.git")
4418 (license license:gpl3+)))
208cb960 4419
4420(define-public guile-eris
4421 (package
4422 (name "guile-eris")
4423 (version "0.2.0")
4424 (source
4425 (origin
4426 (method git-fetch)
4427 (uri (git-reference
4428 (url "https://inqlab.net/git/eris.git")
4429 (commit (string-append "v" version))))
4430 (file-name (git-file-name name version))
4431 (sha256 (base32 "1ijglmwkdy1l87gj429qfjis0v8b1zlxhbyfhx5za8664h68nqka"))))
4432 (build-system gnu-build-system)
4433 (arguments '())
4434 (native-inputs
4435 `(("autoconf" ,autoconf)
4436 ("automake" ,automake)
4437 ("pkg-config" ,pkg-config)
4438 ("texinfo" ,texinfo)
4439 ;; test dependency
4440 ("guile-srfi-180" ,guile-srfi-180)))
4441 (inputs `(("guile" ,guile-3.0)))
4442 (propagated-inputs
4443 `(("guile-sodium" ,guile-sodium)))
4444 (synopsis "Guile implementation of the Encoding for Robust Immutable Storage (ERIS)")
4445 (description
4446 "Guile-ERIS is the reference implementation of the Encoding for Robust
4447Immutable Storage (ERIS). ERIS allows arbirtary content to be encoded into
4448uniformly sized, encrypted blocks that can be reassembled using a short
4449read-capability.")
4450 (home-page "https://inqlab.net/git/eris.git")
4451 (license license:gpl3+)))
67a60840
RW
4452
4453(define-public guile-r6rs-protobuf
4454 (package
4455 (name "guile-r6rs-protobuf")
4456 (version "0.9")
4457 (source
4458 (origin
4459 (method git-fetch)
4460 (uri (git-reference
4461 (url "https://gitlab.com/joolean/r6rs-protobuf")
4462 (commit (string-append "v" version))))
4463 (file-name (git-file-name name version))
4464 (sha256
4465 (base32
4466 "1xmn7jlr1xiqgd35klq910p1bnil1iwdvqxkjr3zzml3spy8p2aa"))))
4467 (build-system guile-build-system)
4468 (arguments
4469 `(#:compile-flags '("--r6rs")))
4470 (inputs
4471 `(("guile" ,guile-3.0)))
4472 (home-page "https://gitlab.com/joolean/r6rs-protobuf/")
4473 (synopsis "Scheme implementation of Protocol Buffers")
4474 (description
4475 "This project provides a pure Scheme implementation of Protocol Buffers,
4476including parsing and code generation.")
4477 (license license:gpl3+)))
e47a5711
RW
4478
4479(define-public guile-shapefile
4480 (package
4481 (name "guile-shapefile")
4482 (version "0.1.2")
4483 (source
4484 (origin
4485 (method git-fetch)
4486 (uri (git-reference
4487 (url "https://github.com/HugoNikanor/guile-shapefile")
4488 (commit (string-append "v" version))))
4489 (file-name (git-file-name name version))
4490 (sha256
4491 (base32
4492 "1zvrpc8bshw9w0vhdpmhv00j07mzsdyg2f9hfabr83v08zhfi8ml"))))
4493 (build-system guile-build-system)
4494 (arguments
4495 `(#:phases
4496 (modify-phases %standard-phases
4497 (add-after 'unpack 'delete-pre-generated-docs
4498 (lambda _
4499 (delete-file-recursively "docs")
4500 #t))
4501 (add-after 'install 'install-info-documentation
4502 (lambda* (#:key outputs #:allow-other-keys)
4503 (let* ((share (string-append (assoc-ref outputs "out") "/share"))
4504 (doc (string-append share "/doc/" ,name "-" ,version))
4505 (info (string-append share "/info/"))
4506 (makeinfo (string-append (assoc-ref %build-inputs "texinfo")
4507 "/bin/makeinfo")))
4508 (invoke makeinfo "guile-shapefile.texi" "-o" info)
4509 #t))))))
4510 (inputs
4511 `(("guile" ,guile-3.0)))
4512 (native-inputs
4513 `(("texinfo" ,texinfo)))
4514 (home-page "https://github.com/HugoNikanor/guile-shapefile")
4515 (synopsis "Parse shapefiles in Guile")
4516 (description
4517 "Guile Shapefile is a Guile library for reading shapefiles.")
4518 (license license:expat)))
0a40da60 4519
559feb66
RW
4520(define-public guile-libyaml
4521 (let ((commit "f5d33a6880e96571d3cb079ed7755ffc156cac46")
4522 (revision "1"))
4523 (package
4524 (name "guile-libyaml")
4525 (version (git-version "0" revision commit))
4526 (source
4527 (origin
4528 (method git-fetch)
4529 (uri (git-reference
4530 (url "https://github.com/mwette/guile-libyaml")
4531 (commit commit)))
4532 (file-name (git-file-name name version))
4533 (sha256
4534 (base32
4535 "12x91983fh1j39zy7kbk19acc1rqdh8515ddx1mh7l26j04k9wgq"))))
4536 (build-system gnu-build-system)
4537 (arguments
4538 `(#:modules (((guix build guile-build-system)
4539 #:prefix guile:)
4540 ,@%gnu-build-system-modules)
4541 #:imported-modules ((guix build guile-build-system)
4542 ,@%gnu-build-system-modules)
4543 #:tests? #false ; there are none
4544 #:phases
4545 (modify-phases %standard-phases
4546 (delete 'configure)
4547 (add-after 'unpack 'remove-unused-files
4548 (lambda* (#:key inputs #:allow-other-keys)
4549 (for-each delete-file
4550 '("guix.scm" "demo1.yml" "demo1.scm"
4551 "yaml/libyaml.scm"
4552 ;; This file is mismatched with the generated FFI code.
4553 "yaml/ffi-help-rt.scm"))
4554 (copy-file (string-append (assoc-ref inputs "nyacc")
4555 "/share/guile/site/3.0/system/ffi-help-rt.scm")
4556 "yaml/ffi-help-rt.scm")
4557 (substitute* "yaml/ffi-help-rt.scm"
4558 (("system ffi-help-rt") "yaml ffi-help-rt"))
4559 #true))
4560 (add-before 'build 'build-ffi
4561 (lambda* (#:key inputs #:allow-other-keys)
4562 (invoke "guild" "compile-ffi"
4563 "--no-exec" ; allow us to patch the generated file
4564 "yaml/libyaml.ffi")
4565 (substitute* "yaml/libyaml.scm"
4566 (("system ffi-help-rt") "yaml ffi-help-rt")
4567 (("dynamic-link \"libyaml\"")
4568 (format #false "dynamic-link \"~a/lib/libyaml\""
4569 (assoc-ref inputs "libyaml"))))
4570 #true))
4571 (replace 'build
4572 (assoc-ref guile:%standard-phases 'build))
4573 (delete 'install))))
4574 (inputs
4575 `(("guile" ,guile-3.0)
4576 ("libyaml" ,libyaml)))
4577 (propagated-inputs
4578 `(("guile-bytestructures" ,guile-bytestructures)))
4579 (native-inputs
4580 `(("nyacc" ,nyacc)))
4581 (home-page "https://github.com/mwette/guile-libyaml")
4582 (synopsis "Guile wrapper for libyaml")
4583 (description
4584 "This package provides a simple yaml module for Guile using the
4585ffi-helper from nyacc.")
4586 (license license:lgpl3+))))
4587
0a40da60
RW
4588(define-public schmutz
4589 (let ((commit "add24588c59552537b8f1316df99a0cdd62c221e")
4590 (revision "1"))
4591 (package
4592 (name "schmutz")
4593 (version (git-version "0" revision commit))
4594 (source (origin
4595 (method git-fetch)
4596 (uri (git-reference
4597 (url "https://github.com/arximboldi/schmutz")
4598 (commit commit)))
4599 (file-name (git-file-name name version))
4600 (sha256
4601 (base32
4602 "1z3n61sj62lnn15mandvyrpjzli07rp9r62ypvgg3a8bvh37yc89"))))
4603 (build-system cmake-build-system)
4604 (arguments `(#:tests? #f))
4605 (native-inputs
4606 `(("pkg-config" ,pkg-config)))
4607 (inputs
4608 `(("guile" ,guile-2.2)))
4609 (home-page "https://github.com/arximboldi/schmutz")
4610 (synopsis "Bind C++ code to Scheme")
4611 (description "Schmutz is a header-only library to declare Scheme bindings
4612for C++ code using a simple embedded DSL. Think of it as @code{Boost.Python}
4613or @code{LuaBind} but for Scheme.")
4614 (license license:boost1.0))))
ff9f2463 4615
4616(define-public guile-cbor
4617 (package
4618 (name "guile-cbor")
4619 (version "0.1.0")
4620 (source
4621 (origin
4622 (method git-fetch)
4623 (uri (git-reference
4624 (url "https://inqlab.net/git/guile-cbor.git")
4625 (commit (string-append "v" version))))
4626 (file-name (git-file-name name version))
4627 (sha256 (base32 "0bdqg3ifayf7m2j09lqrgdfprbdaa67azf09bcq9b4k71inxfnxl"))))
4628 (build-system gnu-build-system)
4629 (arguments `())
4630 (native-inputs
4631 `(("autoconf" ,autoconf)
4632 ("automake" ,automake)
4633 ("pkg-config" ,pkg-config)
4634 ("texinfo" ,texinfo)))
4635 (inputs `(("guile" ,guile-3.0)))
4636 (synopsis "Guile implementation of CBOR")
4637 (description
4638 "The Concise Binary Object Representation (CBOR), as specified by RFC 8949, is
4639a binary data serialization format. CBOR is similar to JSON but serializes to
4640binary which is smaller and faster to generate and parse. This package provides
4641a Guile implementation of CBOR.")
4642 (home-page "https://inqlab.net/git/guile-cbor.git")
4643 (license license:gpl3+)))