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