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