gnu: guile-hall: Use license: prefix.
[jackhill/guix/guix.git] / gnu / packages / guile-xyz.scm
CommitLineData
0791437f
RW
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
3;;; Copyright © 2014, 2015, 2018 Mark H Weaver <mhw@netris.org>
4;;; Copyright © 2015, 2017 Christopher Allan Webber <cwebber@dustycloud.org>
5;;; Copyright © 2016 Alex Sassmannshausen <alex@pompo.co>
6;;; Copyright © 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
7;;; Copyright © 2016 Erik Edrosa <erik.edrosa@gmail.com>
8;;; Copyright © 2016 Eraim Flashner <efraim@flashner.co.il>
9;;; Copyright © 2016, 2017 Alex Kost <alezost@gmail.com>
10;;; Copyright © 2016, 2017 Adonay "adfeno" Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno@openmailbox.org>
11;;; Copyright © 2016 Amirouche <amirouche@hypermove.net>
12;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
13;;; Copyright © 2017 Andy Wingo <wingo@igalia.com>
14;;; Copyright © 2017 David Thompson <davet@gnu.org>
15;;; Copyright © 2017, 2018 Mathieu Othacehe <m.othacehe@gmail.com>
16;;; Copyright © 2017 Theodoros Foradis <theodoros@foradis.org>
17;;; Copyright © 2017 Nils Gillmann <ng0@n0.is>
18;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
19;;; Copyright © 2018 Maxim Cournoyer <maxim.cournoyer@gmail.com>
20;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
21;;; Copyright © 2018 Pierre-Antoine Rouby <pierre-antoine.rouby@inria.fr>
22;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
cd81199c 23;;; Copyright © 2019 swedebugia <swedebugia@riseup.net>
0791437f
RW
24;;;
25;;; This file is part of GNU Guix.
26;;;
27;;; GNU Guix is free software; you can redistribute it and/or modify it
28;;; under the terms of the GNU General Public License as published by
29;;; the Free Software Foundation; either version 3 of the License, or (at
30;;; your option) any later version.
31;;;
32;;; GNU Guix is distributed in the hope that it will be useful, but
33;;; WITHOUT ANY WARRANTY; without even the implied warranty of
34;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35;;; GNU General Public License for more details.
36;;;
37;;; You should have received a copy of the GNU General Public License
38;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
39
40(define-module (gnu packages guile-xyz)
41 #:use-module ((guix licenses) #:prefix license:)
42 #:use-module (gnu packages)
43 #:use-module (gnu packages aspell)
44 #:use-module (gnu packages autotools)
45 #:use-module (gnu packages base)
46 #:use-module (gnu packages bash)
47 #:use-module (gnu packages compression)
406ef442 48 #:use-module (gnu packages databases)
0791437f
RW
49 #:use-module (gnu packages disk)
50 #:use-module (gnu packages ed)
15218d4e 51 #:use-module (gnu packages emacs)
0791437f
RW
52 #:use-module (gnu packages gawk)
53 #:use-module (gnu packages gettext)
54 #:use-module (gnu packages gl)
55 #:use-module (gnu packages gperf)
56 #:use-module (gnu packages guile)
57 #:use-module (gnu packages hurd)
58 #:use-module (gnu packages image)
59 #:use-module (gnu packages libffi)
60 #:use-module (gnu packages libunistring)
61 #:use-module (gnu packages linux)
62 #:use-module (gnu packages man)
63 #:use-module (gnu packages maths)
64 #:use-module (gnu packages multiprecision)
65 #:use-module (gnu packages ncurses)
66 #:use-module (gnu packages networking)
406ef442 67 #:use-module (gnu packages perl)
0791437f
RW
68 #:use-module (gnu packages pkg-config)
69 #:use-module (gnu packages python)
70 #:use-module (gnu packages readline)
71 #:use-module (gnu packages sdl)
72 #:use-module (gnu packages slang)
73 #:use-module (gnu packages sqlite)
74 #:use-module (gnu packages texinfo)
75 #:use-module (gnu packages tls)
76 #:use-module (gnu packages version-control)
77 #:use-module (gnu packages xdisorg)
78 #:use-module (gnu packages xorg)
79 #:use-module (guix packages)
80 #:use-module (guix download)
81 #:use-module (guix git-download)
82 #:use-module (guix build-system gnu)
83 #:use-module (guix build-system guile)
84 #:use-module (guix utils)
85 #:use-module (ice-9 match)
86 #:use-module ((srfi srfi-1) #:select (alist-delete)))
87
88(define-public artanis
cd81199c 89 (let ((release "0.3.1")
fd9a6d83 90 (revision 0))
0791437f
RW
91 (package
92 (name "artanis")
93 (version (if (zero? revision)
94 release
95 (string-append release "-"
96 (number->string revision))))
97 (source (origin
98 (method url-fetch)
99 (uri (string-append "mirror://gnu/artanis/artanis-"
100 release ".tar.gz"))
101 (file-name (string-append name "-" version ".tar.gz"))
102 (sha256
103 (base32
cd81199c 104 "0hqr5m3mb558bdhkc2sadmd9cbrhp3y525wx7cwirgy6i0zmay68"))
0791437f
RW
105 (modules '((guix build utils)))
106 (snippet
107 '(begin
cd81199c 108 ;; Unbundle guile-redis and guile-json
0791437f
RW
109 (delete-file-recursively "artanis/third-party/json.scm")
110 (delete-file-recursively "artanis/third-party/json")
cd81199c 111 (delete-file-recursively "artanis/third-party/redis.scm")
112 (delete-file-recursively "artanis/third-party/redis")
0791437f 113 (substitute* '("artanis/artanis.scm"
cd81199c 114 "artanis/lpc.scm"
0791437f
RW
115 "artanis/oht.scm")
116 (("(#:use-module \\()artanis third-party (json\\))" _
117 use-module json)
118 (string-append use-module json)))
cd81199c 119 (substitute* '("artanis/lpc.scm"
120 "artanis/session.scm")
121 (("(#:use-module \\()artanis third-party (redis\\))" _
122 use-module redis)
123 (string-append use-module redis)))
0791437f
RW
124 (substitute* "artanis/oht.scm"
125 (("([[:punct:][:space:]]+)(->json-string)([[:punct:][:space:]]+)"
126 _ pre json-string post)
127 (string-append pre
128 "scm" json-string
129 post)))
130 (substitute* "artanis/artanis.scm"
131 (("[[:punct:][:space:]]+->json-string[[:punct:][:space:]]+")
132 ""))
133 #t))))
134 (build-system gnu-build-system)
cd81199c 135 ;; FIXME the bundled csv contains one more exported procedure
136 ;; (sxml->csv-string) than guile-csv. The author is maintainer of both
137 ;; projects.
0791437f
RW
138 ;; TODO: Add guile-dbi and guile-dbd optional dependencies.
139 (inputs `(("guile" ,guile-2.2)
cd81199c 140 ("guile-json" ,guile-json)
141 ("guile-redis" ,guile-redis)))
0791437f
RW
142 (native-inputs `(("bash" ,bash) ;for the `source' builtin
143 ("pkgconfig" ,pkg-config)
144 ("util-linux" ,util-linux))) ;for the `script' command
145 (arguments
146 '(#:make-flags
147 ;; TODO: The documentation must be built with the `docs' target.
148 (let* ((out (assoc-ref %outputs "out"))
149 (scm (string-append out "/share/guile/site/2.2"))
150 (go (string-append out "/lib/guile/2.2/site-ccache")))
151 ;; Don't use (%site-dir) for site paths.
152 (list (string-append "MOD_PATH=" scm)
153 (string-append "MOD_COMPILED_PATH=" go)))
154 #:test-target "test"
155 #:phases
156 (modify-phases %standard-phases
fd9a6d83
CB
157 (add-after 'unpack 'patch-site-dir
158 (lambda* (#:key outputs #:allow-other-keys)
159 (substitute* "artanis/commands/help.scm"
160 (("\\(%site-dir\\)")
161 (string-append "\""
162 (assoc-ref outputs "out")
163 "/share/guile/site/2.2\"")))))
0791437f
RW
164 (add-before 'install 'substitute-root-dir
165 (lambda* (#:key outputs #:allow-other-keys)
166 (let ((out (assoc-ref outputs "out")))
167 (substitute* "Makefile" ;ignore the execution of bash.bashrc
168 ((" /etc/bash.bashrc") " /dev/null"))
169 (substitute* "Makefile" ;set the root of config files to OUT
170 ((" /etc") (string-append " " out "/etc")))
171 (mkdir-p (string-append out "/bin")) ;for the `art' executable
172 #t)))
173 (add-after 'install 'wrap-art
fd9a6d83 174 (lambda* (#:key inputs outputs #:allow-other-keys)
0791437f
RW
175 (let* ((out (assoc-ref outputs "out"))
176 (bin (string-append out "/bin"))
177 (scm (string-append out "/share/guile/site/2.2"))
178 (go (string-append out "/lib/guile/2.2/site-ccache")))
179 (wrap-program (string-append bin "/art")
fd9a6d83
CB
180 `("GUILE_LOAD_PATH" ":" prefix
181 (,scm ,(getenv "GUILE_LOAD_PATH")))
182 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
183 (,go ,(getenv "GUILE_LOAD_COMPILED_PATH"))))
0791437f
RW
184 #t))))))
185 (synopsis "Web application framework written in Guile")
186 (description "GNU Artanis is a web application framework written in Guile
187Scheme. A web application framework (WAF) is a software framework that is
188designed to support the development of dynamic websites, web applications, web
189services and web resources. The framework aims to alleviate the overhead
190associated with common activities performed in web development. Artanis
191provides several tools for web development: database access, templating
192frameworks, session management, URL-remapping for RESTful, page caching, and
193more.")
194 (home-page "https://www.gnu.org/software/artanis/")
195 (license (list license:gpl3+ license:lgpl3+))))) ;dual license
196
197;; There has not been any release yet.
198(define-public guildhall
199 (let ((commit "2fe2cc539f4b811bbcd69e58738db03eb5a2b778")
200 (revision "1"))
201 (package
202 (name "guildhall")
203 (version (string-append "0-" revision "." (string-take commit 9)))
204 (source (origin
205 (method git-fetch)
206 (uri (git-reference
207 (url "https://github.com/ijp/guildhall.git")
208 (commit commit)))
209 (file-name (string-append name "-" version "-checkout"))
210 (sha256
211 (base32
212 "115bym7bg66h3gs399yb2vkzc2ygriaqsn4zbrg8f054mgy8wzn1"))))
213 (build-system gnu-build-system)
214 (arguments
215 `(#:phases
216 (modify-phases %standard-phases
217 ;; Tests fail without this fix because they try to load the bash
218 ;; executable as a Scheme file. See bug report at
219 ;; https://github.com/ijp/guildhall/issues/22
220 (add-after 'unpack 'fix-bug-22
221 (lambda _
222 (substitute* "Makefile.am"
223 (("TESTS_ENVIRONMENT=.*")
224 "AM_TESTS_ENVIRONMENT=srcdir=$(abs_top_srcdir)/tests/
225TEST_EXTENSIONS = .scm
226SCM_LOG_COMPILER= $(top_builddir)/env $(GUILE)
227AM_SCM_LOG_FLAGS = --no-auto-compile -s")
228 ;; FIXME: one of the database tests fails for unknown
229 ;; reasons. It does not fail when run outside of Guix.
230 (("tests/database.scm") ""))
231 #t)))))
232 (inputs
233 `(("guile" ,guile-2.0)))
234 (native-inputs
235 `(("zip" ,zip) ; for tests
236 ("autoconf" ,autoconf)
237 ("automake" ,automake)
238 ("texinfo" ,texinfo)))
239 (synopsis "Package manager for Guile")
240 (description
241 "Guildhall is a package manager written for Guile Scheme. A guild is
242an association of independent craftspeople. A guildhall is where they meet.
243This Guildhall aims to make a virtual space for Guile wizards and journeyfolk
244to share code.
245
246On a practical level, Guildhall lets you share Scheme modules and programs
247over the internet, and install code that has been shared by others. Guildhall
248can handle dependencies, so when a program requires several libraries, and
249each of those has further dependencies, all of the prerequisites for the
250program can be installed in one go.")
251 (home-page "https://github.com/ijp/guildhall")
252 (license license:gpl3+))))
253
254(define-public guile-aspell
255 (package
256 (name "guile-aspell")
257 (version "0.4")
258 (source (origin
259 (method url-fetch)
260 (uri (string-append
261 "http://lonelycactus.com/tarball/guile_aspell-"
262 version ".tar.gz"))
263 (sha256
264 (base32
265 "0vpk5xj9m9qc702z3khmkwhgpb949qbsyz8kw2qycda6qnxk0077"))))
266 (build-system gnu-build-system)
267 (arguments
268 '(#:phases (modify-phases %standard-phases
269 (add-before 'configure 'set-guilesitedir
270 (lambda _
271 (substitute* "Makefile.in"
272 (("^guilesitedir =.*$")
273 "guilesitedir = \
274$(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
275 #t))
276 (add-before 'build 'set-libaspell-file-name
277 (lambda* (#:key inputs #:allow-other-keys)
278 (let ((aspell (assoc-ref inputs "aspell")))
279 (substitute* "aspell.scm"
280 (("\"libaspell\\.so\"")
281 (string-append "\"" aspell
282 "/lib/libaspell\"")))
283 #t))))))
284 (native-inputs `(("pkg-config" ,pkg-config)))
285 (inputs `(("guile" ,guile-2.2)
286 ("aspell" ,aspell)))
287 (home-page "https://github.com/spk121/guile-aspell")
288 (synopsis "Spell-checking from Guile")
289 (description
290 "guile-aspell is a Guile Scheme library for comparing a string against a
291dictionary and suggesting spelling corrections.")
292 (license license:gpl3+)))
293
294(define-public guile-bash
295 ;; This project is currently retired. It was initially announced here:
296 ;; <https://lists.gnu.org/archive/html/guile-user/2015-02/msg00003.html>.
297 (let ((commit "1eabc563ca5692b3e08d84f1f0e6fd2283284469")
298 (revision "0"))
299 (package
300 (name "guile-bash")
301 (version (string-append "0.1.6-" revision "." (string-take commit 7)))
302 (home-page
303 "https://anonscm.debian.org/cgit/users/kaction-guest/retired/dev.guile-bash.git")
304 (source (origin
305 (method git-fetch)
306 (uri (git-reference
307 (commit commit)
308 (url home-page)))
309 (sha256
310 (base32
311 "097vny990wp2qpjij6a5a5gwc6fxzg5wk56inhy18iki5v6pif1p"))
312 (file-name (string-append name "-" version "-checkout"))))
313 (build-system gnu-build-system)
314 (arguments
315 '(#:configure-flags
316 ;; Add -I to match 'bash.pc' of Bash 4.4.
317 (list (string-append "CPPFLAGS=-I"
318 (assoc-ref %build-inputs "bash:include")
319 "/include/bash/include")
320
321 ;; The '.a' file is useless.
322 "--disable-static"
323
324 ;; Install 'lib/bash' as Bash 4.4 expects.
325 (string-append "--libdir=" (assoc-ref %outputs "out")
326 "/lib/bash"))))
327 (native-inputs `(("pkg-config" ,pkg-config)
328 ("autoconf" ,autoconf-wrapper)
329 ("automake" ,automake)
330 ("libtool" ,libtool)
331 ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'.
332 ("gettext" ,gettext-minimal)
333
334 ;; Bash with loadable module support, for the test
335 ;; suite.
336 ("bash-full" ,bash)))
337 (inputs `(("guile" ,guile-2.0)
338 ("bash:include" ,bash "include")))
339 (synopsis "Extend Bash using Guile")
340 (description
341 "Guile-Bash provides a shared library and set of Guile modules,
342allowing you to extend Bash in Scheme. Scheme interfaces allow you to access
343the following aspects of Bash:
344
345@itemize
346@item aliases;
347@item setting and getting Bash variables;
348@item creating dynamic variables;
349@item creating Bash functions with a Scheme implementation;
350@item reader macro for output capturing;
351@item reader macro for evaluating raw Bash commands.
352@end itemize
353
354To enable it, run:
355
356@example
357enable -f ~/.guix-profile/lib/bash/libguile-bash.so scm
358@end example
359
360and then run @command{scm example.scm}.")
361 (license license:gpl3+))))
362
363(define-public guile-8sync
364 (package
365 (name "guile-8sync")
366 (version "0.4.2")
367 (source (origin
368 (method url-fetch)
369 (uri (string-append "mirror://gnu/8sync/8sync-" version
370 ".tar.gz"))
371 (sha256
372 (base32
373 "031wm13srak3wsnll7j2mbbi29g1pcm4swdb71ds9yn567pn20qw"))))
374 (build-system gnu-build-system)
375 (native-inputs `(("autoconf" ,autoconf)
376 ("automake" ,automake)
377 ("guile" ,guile-2.2)
378 ("pkg-config" ,pkg-config)
379 ("texinfo" ,texinfo)))
380 (arguments
381 `(#:phases (modify-phases %standard-phases
382 (add-before 'configure 'setenv
383 (lambda _
384 ;; quiet warnings
385 (setenv "GUILE_AUTO_COMPILE" "0")
386 #t)))))
387 (home-page "https://gnu.org/s/8sync/")
388 (synopsis "Asynchronous actor model library for Guile")
389 (description
390 "GNU 8sync (pronounced \"eight-sync\") is an asynchronous programming
391library for GNU Guile based on the actor model.
392
393Note that 8sync is only available for Guile 2.2.")
394 (license license:lgpl3+)))
395
396(define-public guile-daemon
397 (package
398 (name "guile-daemon")
399 (version "0.1.2")
400 (source (origin
401 (method url-fetch)
402 (uri (string-append "https://github.com/alezost/" name
403 "/releases/download/v" version
404 "/" name "-" version ".tar.gz"))
405 (sha256
406 (base32
407 "0hh6gq6b6phpxm0b1dkxyzj3f4sxdf7dji63609lzypa5v1ad2gv"))))
408 (build-system gnu-build-system)
409 (native-inputs
410 `(("pkg-config" ,pkg-config)))
411 (inputs
412 `(("guile" ,guile-2.2)))
413 (home-page "https://github.com/alezost/guile-daemon")
414 (synopsis "Evaluate code in a running Guile process")
415 (description
416 "Guile-Daemon is a small Guile program that loads your initial
417configuration file, and then reads and evaluates Guile expressions that
418you send to a FIFO file.")
419 (license license:gpl3+)))
420
421(define-public guile-dsv
422 (package
423 (name "guile-dsv")
424 (version "0.2.1")
425 (source (origin
426 (method git-fetch)
427 (uri (git-reference
428 (url "https://github.com/artyom-poptsov/guile-dsv")
429 (commit "bdc5267d007478abc20ea96d7c459b7dd9560b3d")))
430 (file-name (string-append name "-" version "-checkout"))
431 (sha256
432 (base32
433 "1irw6mz8998nwyhzrw9g94jcz60b9zljgqfmipaz1ybn8579qjx0"))))
434 (build-system gnu-build-system)
435 (native-inputs
436 `(("autoconf" ,autoconf)
437 ("automake" ,automake)
438 ("pkg-config" ,pkg-config)
439 ("texinfo" ,texinfo)))
440 (inputs `(("guile" ,guile-2.2)))
441 (propagated-inputs `(("guile-lib" ,guile-lib)))
442 (arguments
443 '(#:phases (modify-phases %standard-phases
444 (add-before 'configure 'set-guilesitedir
445 (lambda _
446 (substitute* "Makefile.in"
447 (("^guilesitedir =.*$")
448 "guilesitedir = \
449$(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
450 (substitute* "modules/Makefile.in"
451 (("^guilesitedir =.*$")
452 "guilesitedir = \
453$(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
454 (substitute* "modules/dsv/Makefile.in"
455 (("^guilesitedir =.*$")
456 "guilesitedir = \
457$(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
458 #t)))))
459 (home-page "https://github.com/artyom-poptsov/guile-dsv")
460 (synopsis "DSV module for Guile")
461 (description
462 "Guile-DSV is a GNU Guile module for working with the
463delimiter-separated values (DSV) data format. Guile-DSV supports the
464Unix-style DSV format and RFC 4180 format.")
465 (license license:gpl3+)))
466
467(define-public guile-fibers
468 (package
469 (name "guile-fibers")
470 (version "1.0.0")
471 (source (origin
472 (method url-fetch)
473 (uri (string-append "https://wingolog.org/pub/fibers/fibers-"
474 version ".tar.gz"))
475 (sha256
476 (base32
477 "0vjkg72ghgdgphzbjz9ig8al8271rq8974viknb2r1rg4lz92ld0"))))
478 (build-system gnu-build-system)
479 (arguments
480 '(#:phases (modify-phases %standard-phases
481 (add-after 'install 'mode-guile-objects
482 (lambda* (#:key outputs #:allow-other-keys)
483 ;; .go files are installed to "lib/guile/X.Y/cache".
484 ;; This phase moves them to "…/site-ccache".
485 (let* ((out (assoc-ref outputs "out"))
486 (lib (string-append out "/lib/guile"))
487 (old (car (find-files lib "^ccache$"
488 #:directories? #t)))
489 (new (string-append (dirname old)
490 "/site-ccache")))
491 (rename-file old new)
492 #t))))))
493 (native-inputs
494 `(("texinfo" ,texinfo)
495 ("pkg-config" ,pkg-config)))
496 (inputs
497 `(("guile" ,guile-2.2)))
498 (synopsis "Lightweight concurrency facility for Guile")
499 (description
500 "Fibers is a Guile library that implements a a lightweight concurrency
501facility, inspired by systems like Concurrent ML, Go, and Erlang. A fiber is
502like a \"goroutine\" from the Go language: a lightweight thread-like
503abstraction. Systems built with Fibers can scale up to millions of concurrent
504fibers, tens of thousands of concurrent socket connections, and many parallel
505cores. The Fibers library also provides Concurrent ML-like channels for
506communication between fibers.
507
508Note that Fibers makes use of some Guile 2.1/2.2-specific features and
509is not available for Guile 2.0.")
510 (home-page "https://github.com/wingo/fibers")
511 (license license:lgpl3+)))
512
513(define-public guile-syntax-highlight
514 (package
515 (name "guile-syntax-highlight")
516 (version "0.1")
517 (source (origin
518 (method url-fetch)
519 (uri (string-append "https://files.dthompson.us/"
520 "guile-syntax-highlight/"
521 "guile-syntax-highlight-"
522 version ".tar.gz"))
523 (sha256
524 (base32
525 "1p771kq15x83483m23bhah1sz6vkalg3drm7x279f4j1cxligkzi"))))
526 (build-system gnu-build-system)
527 (native-inputs
528 `(("pkg-config" ,pkg-config)))
529 (inputs
530 `(("guile" ,guile-2.2)))
531 (synopsis "General-purpose syntax highlighter for GNU Guile")
532 (description "Guile-syntax-highlight is a general-purpose syntax
533highlighting library for GNU Guile. It can parse code written in various
534programming languages into a simple s-expression that can be converted to
535HTML (via SXML) or any other format for rendering.")
536 (home-page "http://dthompson.us/projects/guile-syntax-highlight.html")
537 (license license:lgpl3+)))
538
539(define-public guile-sjson
540 (package
541 (name "guile-sjson")
542 (version "0.2.1")
543 (source (origin
544 (method url-fetch)
545 (uri (string-append "https://dustycloud.org/misc/sjson-" version
546 ".tar.gz"))
547 (sha256
548 (base32
549 "1mzmapln79vv10qxaggz9qwcdbag3jnrj19xx8bgkmxss8h03sv3"))))
550 (build-system gnu-build-system)
551 (native-inputs
552 `(("autoconf" ,autoconf)
553 ("automake" ,automake)
554 ("pkg-config" ,pkg-config)))
555 (inputs
556 `(("guile" ,guile-2.2)))
557 (home-page "https://gitlab.com/dustyweb/guile-sjson")
558 (synopsis "S-expression based json reader/writer for Guile")
559 (description "guile-sjson is a json reader/writer for Guile.
560It has a nice, simple s-expression based syntax.")
561 (license license:lgpl3+)))
562
61dafdc0
CB
563(define-public guile-squee
564 (let ((commit "a85902a92bf6f58a1d35fd974a01ade163deda8d")
565 (revision "0"))
566 (package
567 (name "guile-squee")
568 (version (string-append "0-" revision "." (string-take commit 7)))
569 (source (origin
570 (method git-fetch)
571 (uri (git-reference
572 (url "https://notabug.org/cwebber/guile-squee.git")
573 (commit commit)))
574 (file-name (git-file-name name version))
575 (sha256
576 (base32
577 "0p1lpsp4kx57j3ai1dkxilm4ziavzzx8wbbc42m3hpziq0a7qz5z"))))
578 (build-system guile-build-system)
579 (arguments
580 '(#:phases
581 (modify-phases %standard-phases
582 (add-after 'unpack 'patch
583 (lambda* (#:key inputs #:allow-other-keys)
584 (substitute* "squee.scm"
585 (("dynamic-link \"libpq\"")
586 (string-append
587 "dynamic-link \""
588 (assoc-ref inputs "postgresql") "/lib/libpq.so"
589 "\"")))
590 #t)))))
591 (inputs
592 `(("postgresql" ,postgresql)))
593 (native-inputs
594 `(("guile" ,guile-2.2)))
595 (home-page "https://notabug.org/cwebber/guile-squee")
596 (synopsis "Connect to PostgreSQL using Guile")
597 (description
598 "@code{squee} is a Guile library for connecting to PostgreSQL databases
599using Guile's foreign function interface.")
6fd72f70 600 (license license:lgpl3+))))
61dafdc0 601
0791437f
RW
602(define-public guile-colorized
603 (package
604 (name "guile-colorized")
605 (version "0.1")
606 (source (origin
607 (method url-fetch)
608 (uri (string-append "https://github.com/NalaGinrut/guile-colorized/"
609 "archive/v" version ".tar.gz"))
610 (file-name (string-append name "-" version ".tar.gz"))
611 (sha256
612 (base32
613 "16xhc3an6aglnca8xl3mvgi8hsqzqn68vsl5ga4bz8bvbap5fn4p"))))
614 (build-system guile-build-system)
615 (native-inputs
616 `(("guile" ,guile-2.2)))
617 (home-page "https://github.com/NalaGinrut/guile-colorized")
618 (synopsis "Colorized REPL for Guile")
619 (description
620 "Guile-colorized provides you with a colorized REPL for GNU Guile.")
621 (license license:gpl3+)))
622
623(define-public guile-pfds
624 (package
625 (name "guile-pfds")
626 (version "0.3")
627 (home-page "https://github.com/ijp/pfds")
628 (source (origin
629 (method git-fetch)
630 (uri (git-reference
631 (url home-page)
632 (commit (string-append "v" version))))
633 (sha256
634 (base32
635 "19y33wg94pf0n98dkfqd1zbw93fgky4sawxsxl6s3vyqwl0yi5vh"))
636 (file-name (string-append name "-" version "-checkout"))))
637 (build-system guile-build-system)
638 (arguments
639 '(#:source-directory "src"
640 #:phases (modify-phases %standard-phases
641 (add-after 'unpack 'move-files-around
642 (lambda _
643 ;; Move files under a pfds/ directory to reflect the
644 ;; module hierarchy.
645 (mkdir-p "src/pfds")
646 (for-each (lambda (file)
647 (rename-file file
648 (string-append "src/pfds/"
649 file)))
650 '("bbtrees.sls"
651 "deques"
652 "deques.sls"
653 "dlists.sls"
654 "fingertrees.sls"
655 "hamts.sls"
656 "heaps.sls"
657 "private"
658 "psqs.sls"
659 "queues"
660 "queues.sls"
661 "sequences.sls"
662 "sets.sls"))
663
664 ;; In Guile <= 2.2.4, there's no way to tell 'guild
665 ;; compile' to accept the ".sls" extension. So...
666 (for-each (lambda (file)
667 (rename-file file
668 (string-append
669 (string-drop-right file 4)
670 ".scm")))
671 (find-files "." "\\.sls$"))
672 #t)))))
673 (native-inputs
674 `(("guile" ,guile-2.2)))
675 (synopsis "Purely functional data structures for Guile")
676 (description
677 "This package provides purely functional data structures written in R6RS
678Scheme and compiled for Guile. It has been tested with Racket, Guile 2,
679Vicare Scheme and IronScheme. Right now it contains:
680
681@itemize
682@item queues
683@item deques
684@item bbtrees
685@item sets
686@item dlists
687@item priority search queues (PSQs)
688@item finger trees
689@item sequences
690@item heaps
691@item hash array mapped tries (HAMTs).
692@end itemize\n")
693 (license license:bsd-3)))
694
695(define-public guile-aa-tree
696 (package
697 (name "guile-aa-tree")
698 (version "3.1.1")
699 (source (origin
700 (method url-fetch)
701 (uri (string-append "mirror://savannah/guile-aa-tree/guile-aa-tree-"
702 version ".tar.gz"))
703 (sha256
704 (base32
705 "0044c105r3q9vpl17pv3phl1b79kjm1llhkakqgiasixyav01blh"))))
706 (build-system guile-build-system)
707 (native-inputs `(("guile" ,guile-2.2)))
708 ;; https://savannah.nongnu.org/projects/guile-aa-tree
709 (home-page "https://qlfiles.net/guile-aa-tree/")
710 (synopsis "AA tree data structure for Guile")
711 (description
712 "This package provides an implementation of @dfn{AA trees}, a
713self-balancing binary tree data structure, for Guile. It ensure @math{O(log
714n)} worst case performance for core operations. The module provides
715non-mutating insert, delete, and search operations, with support for
716convenient nested tree operations.")
717 (license license:gpl3+)))
718
719(define-public guile-simple-zmq
720 (let ((commit "68bedb6679716214fb9d3472da57544526f7a618")
721 (revision "3"))
722 (package
723 (name "guile-simple-zmq")
724 (version (git-version "0.0.0" revision commit))
725 (source
726 (origin
727 (method git-fetch)
728 (uri (git-reference
729 (url "https://github.com/jerry40/guile-simple-zmq")
730 (commit commit)))
731 (sha256
732 (base32
733 "1ad3xg69qqviy1f6dnlw0ysmfdbmp1jq65rfqb8nfd8dsrq2syli"))
734 (file-name (git-file-name name version))))
735 (build-system guile-build-system)
736 (arguments
737 `(#:source-directory "src"
738 #:phases (modify-phases %standard-phases
739 (add-after 'unpack 'set-libzmq-file-name
740 (lambda* (#:key inputs #:allow-other-keys)
741 (substitute* "src/simple-zmq.scm"
742 (("\\(dynamic-link \"libzmq\"\\)")
743 (format #f "(dynamic-link \"~a/lib/libzmq.so\")"
744 (assoc-ref inputs "zeromq"))))
745 #t)))))
746 (native-inputs
747 `(("guile" ,guile-2.2)))
748 (inputs
749 `(("zeromq" ,zeromq)))
750 (home-page "https://github.com/jerry40/guile-simple-zmq")
751 (synopsis "Guile wrapper over ZeroMQ library")
752 (description
753 "This package provides a Guile programming interface to the ZeroMQ
754messaging library.")
755 (license license:gpl3+))))
756
757(define-public jupyter-guile-kernel
758 (let ((commit "a7db9245a886e104138474df46c3e88b95cff629")
759 (revision "1"))
760 (package
761 (name "jupyter-guile-kernel")
762 (version (git-version "0.0.0" revision commit))
763 (source
764 (origin
765 (method git-fetch)
766 (uri (git-reference
767 (url "https://github.com/jerry40/guile-kernel")
768 (commit commit)))
769 (sha256
770 (base32
771 "0aj04853bqm47ivfcmrgpb7w3wkis847kc7qrwsa5zcn9h38qh2f"))))
772 (build-system guile-build-system)
773 (arguments
774 '(#:phases (modify-phases %standard-phases
775 (add-after 'unpack 'set-openssl-file-name
776 (lambda* (#:key inputs #:allow-other-keys)
777 ;; Record the absolute file name of the 'openssl'
778 ;; command.
779 (substitute* "src/hmac.scm"
780 (("openssl")
781 (string-append (assoc-ref inputs "openssl")
782 "/bin/openssl")))
783 #t))
784
785 ;; XXX: The code uses 'include' to include its own source
786 ;; files, and "-L src" isn't enough in this case.
787 (add-before 'build 'chdir
788 (lambda _ (chdir "src") #t))
789 (add-after 'build 'chdir-back
790 (lambda _ (chdir "..") #t))
791
792 (add-after 'install 'install-kernel
793 (lambda* (#:key inputs outputs #:allow-other-keys)
794 (let* ((out (assoc-ref outputs "out"))
795 (json (assoc-ref inputs "guile-json"))
796 (zmq (assoc-ref inputs "guile-simple-zmq"))
797 (deps (list json zmq))
798 (dir (string-append
799 out "/share/jupyter/kernels/guile"))
800 (effective (target-guile-effective-version)))
801 ;; Install kernel.
802 (install-file "src/kernel.json" dir)
803
804 ;; Fix hard-coded file name in the kernel.
805 (substitute* (string-append dir "/kernel.json")
806 (("/home/.*/guile-jupyter-kernel.scm")
807 (string-append out "/share/guile/site/"
808 (target-guile-effective-version)
809 "/guile-jupyter-kernel.scm"))
810 (("\"guile\"")
811 (string-append "\"" (assoc-ref inputs "guile")
812 "/bin/guile\""))
813 (("-s")
814 ;; Add '-L' and '-C' flags so that the kernel
815 ;; finds its dependencies.
816 (let ((-L (map (lambda (item)
817 (string-append "\"" item
818 "/share/guile/site/"
819 effective "\""))
820 deps))
821 (-C (map (lambda (item)
822 (string-append "\"" item
823 "/lib/guile/"
824 effective
825 "/site-ccache\""))
826 deps)))
827 (string-append "--no-auto-compile\""
828 (string-join -L ", \"-L\", "
829 'prefix)
830 (string-join -C ", \"-C\", "
831 'prefix)
832 ", \"-s"))))
833 #t))))))
834 (inputs
835 `(("openssl" ,openssl)
836 ("guile" ,guile-2.2)
837 ("guile-json" ,guile-json)
838 ("guile-simple-zmq" ,guile-simple-zmq)))
839 (synopsis "Guile kernel for the Jupyter Notebook")
840 (description
841 "This package provides a Guile 2.x kernel for the Jupyter Notebook. It
842allows users to interact with the Guile REPL through Jupyter.")
843 (home-page "https://github.com/jerry40/guile-kernel")
844 (license license:gpl3+))))
845
846(define-public guile-sparql
847 (package
848 (name "guile-sparql")
849 (version "0.0.7")
850 (source (origin
851 (method url-fetch)
852 (uri (string-append
853 "https://github.com/roelj/guile-sparql/releases/download/"
854 version "/guile-sparql-" version ".tar.gz"))
855 (sha256
856 (base32 "1drnvhsgl0gc5crmb16yyw1j98nkhwwcgssv9vgm36ng43nnzffd"))))
857 (build-system gnu-build-system)
858 (arguments `(#:tests? #f)) ; There are no tests.
859 (native-inputs
860 `(("pkg-config" ,pkg-config)))
861 (inputs
862 `(("guile" ,guile-2.2)))
863 (home-page "https://github.com/roelj/guile-sparql")
864 (synopsis "SPARQL module for Guile")
865 (description "This package provides the functionality to query a SPARQL
866endpoint. Additionally, it provides an interface to write SPARQL queries
867using S-expressions.")
868 (license license:gpl3+)))
869
870(define-public guile-debbugs
871 (package
872 (name "guile-debbugs")
873 (version "0.0.2")
874 (source (origin
875 (method url-fetch)
876 (uri (string-append "mirror://gnu/guile-debbugs/guile-debbugs-"
877 version ".tar.gz"))
878 (sha256
879 (base32
880 "16l8910p57im6s3j93xhdaqvgfy6ms5n97177mrch3y961z5hy0i"))
881 (modules '((guix build utils)))
882 (snippet
883 '(substitute* "Makefile.in"
884 (("^godir = (.*)/ccache" _ prefix)
885 (string-append "godir = " prefix "/site-ccache"))))))
886 (build-system gnu-build-system)
887 (native-inputs
888 `(("guile" ,guile-2.2)
889 ("pkg-config" ,pkg-config)))
890 (home-page "https://savannah.gnu.org/projects/guile-debbugs/")
891 (synopsis "Guile interface to the Debbugs bug tracking service")
892 (description
893 "This package provides a Guile library to communicate with a Debbugs bug
894tracker's SOAP service, such as @url{https://bugs.gnu.org}.")
895 (license license:gpl3+)))
896
897(define-public guile-email
898 (let ((commit "fa52eac55e5946db89621a6c583d2aa357864dee")
899 (revision "1"))
900 (package
901 (name "guile-email")
902 (version (git-version "0.1.0" revision commit))
903 (source
904 (origin
905 (method git-fetch)
906 (uri (git-reference
907 (url "https://git.systemreboot.net/guile-email")
908 (commit commit)))
909 (file-name (git-file-name name version))
910 (sha256
911 (base32
912 "1037mbz7qd9bzaqp8ysyhnl9ipd97fmj3b9jr8qfzx9179vvsj63"))))
913 (build-system gnu-build-system)
914 (native-inputs
915 `(("pkg-config" ,pkg-config)
916 ("autoconf" ,autoconf)
917 ("automake" ,automake)))
918 (inputs
919 `(("guile" ,guile-2.2)))
920 (home-page "https://git.systemreboot.net/guile-email")
921 (synopsis "Guile email parser")
922 (description "This package provides an email parser written in pure
923Guile.")
924 (license license:agpl3+))))
925
926(define-public guile-debbugs-next
927 (let ((commit "75a331d561c8b6f8efcf16216dab961c17759efe")
928 (revision "1"))
929 (package (inherit guile-debbugs)
930 (name "guile-debbugs")
931 (version (git-version "0.0.3" revision commit))
932 (source (origin
933 (method git-fetch)
934 (uri (git-reference
935 (url "https://git.savannah.gnu.org/git/guile-debbugs.git")
936 (commit commit)))
937 (file-name (git-file-name name version))
938 (sha256
939 (base32
940 "0br3mgbw41bpc9x57jlghl0i8dz9nl63r4wzs5l47aqszf84870y"))))
941 (build-system gnu-build-system)
942 (native-inputs
943 `(("pkg-config" ,pkg-config)
944 ("autoconf" ,autoconf)
945 ("automake" ,automake)
946 ("texinfo" ,texinfo)))
947 (inputs
948 `(("guile" ,guile-2.2)
949 ("guile-email" ,guile-email))))))
950
951;; There has not been any release yet.
952(define-public guile-newt
953 (let ((commit "80c1e9e71945f833386d1632b52573e59325804f")
954 (revision "4"))
955 (package
956 (name "guile-newt")
957 (version (string-append "0-" revision "." (string-take commit 9)))
958 (source (origin
959 (method git-fetch)
960 (uri (git-reference
961 (url "https://gitlab.com/mothacehe/guile-newt")
962 (commit commit)))
963 (file-name (string-append name "-" version "-checkout"))
964 (sha256
965 (base32
966 "1w7qy4dw1f4bx622l6hw8mv49sf1ha8kch8j4nganyk8fj0wn695"))))
967 (build-system gnu-build-system)
968 (arguments
969 '(#:make-flags
970 '("GUILE_AUTO_COMPILE=0"))) ;to prevent guild warnings
971 (inputs
972 `(("guile" ,guile-2.2)
973 ("newt" ,newt)))
974 (native-inputs
975 `(("autoconf" ,autoconf)
976 ("automake" ,automake)
977 ("pkg-config" ,pkg-config)))
978 (synopsis "Guile bindings to Newt")
979 (description
980 "This package provides bindings for Newt, a programming library for
981color text mode, widget based user interfaces. The bindings are written in pure
982Scheme by using Guile’s foreign function interface.")
983 (home-page "https://gitlab.com/mothacehe/guile-newt")
984 (license license:gpl3+))))
985
986(define-public guile-mastodon
987 (package
988 (name "guile-mastodon")
989 (version "0.0.1")
990 (source (origin
991 (method git-fetch)
992 (uri (git-reference
993 (url "https://framagit.org/prouby/guile-mastodon.git")
994 (commit (string-append "v" version))))
995 (file-name (git-file-name name version))
996 (sha256
997 (base32
998 "1vblf3d1bbwna3l09p2ap5y8ycvl549bz6whgk78imyfmn28ygry"))))
999 (build-system gnu-build-system)
1000 (native-inputs
1001 `(("autoconf" ,autoconf)
1002 ("automake" ,automake)
1003 ("pkg-config" ,pkg-config)))
1004 (inputs
1005 `(("guile" ,guile-2.2)
1006 ("gnutls" ,gnutls)
1007 ("guile-json" ,guile-json)))
1008 (home-page "https://framagit.org/prouby/guile-mastodon")
1009 (synopsis "Guile Mastodon REST API module")
1010 (description "This package provides Guile modules to access the
1011@uref{https://docs.joinmastodon.org/api/, REST API of Mastodon}, a federated
1012microblogging service.")
1013 (license license:gpl3+)))
1014
1015;; There has not been any release yet.
1016(define-public guile-parted
1017 (let ((commit "ea3f1a1f6844775fc59d3078d2a09c62ffb341b8")
1018 (revision "0"))
1019 (package
1020 (name "guile-parted")
1021 (version (string-append "0-" revision "." (string-take commit 9)))
1022 (source (origin
1023 (method git-fetch)
1024 (uri (git-reference
1025 (url "https://gitlab.com/mothacehe/guile-parted")
1026 (commit commit)))
1027 (file-name (string-append name "-" version "-checkout"))
1028 (sha256
1029 (base32
1030 "1q7425gpjlwi2wvhzq7kw046yyx7v6j6jyzkd1cr861iz34mjwiq"))))
1031 (build-system gnu-build-system)
1032 (arguments
1033 '(#:make-flags
1034 '("GUILE_AUTO_COMPILE=0"))) ;to prevent guild warnings
1035 (inputs
1036 `(("guile" ,guile-2.2)
1037 ("parted" ,parted)))
1038 (propagated-inputs
1039 `(("guile-bytestructures" ,guile-bytestructures)))
1040 (native-inputs
1041 `(("autoconf" ,autoconf)
1042 ("automake" ,automake)
1043 ("pkg-config" ,pkg-config)))
1044 (synopsis "Guile bindings to GNU Parted")
1045 (description
1046 "This package provides bindings for GNU Parted library, a C library
1047allowing disk partition tables creation and manipulation. The bindings are
1048written in pure Scheme by using Guile's foreign function interface.")
1049 (home-page "https://gitlab.com/mothacehe/guile-parted")
1050 (license license:gpl3+))))
1051
1052(define-public guile-xosd
1053 (package
1054 (name "guile-xosd")
1055 (version "0.2.1")
1056 (source (origin
1057 (method url-fetch)
1058 (uri (string-append "https://github.com/alezost/" name
1059 "/releases/download/v" version
1060 "/" name "-" version ".tar.gz"))
1061 (sha256
1062 (base32
1063 "1ri5065c16kmgrf2pysn2ymxjqi5302lhpb07wkl1jr75ym8fn8p"))))
1064 (build-system gnu-build-system)
1065 (native-inputs
1066 `(("pkg-config" ,pkg-config)))
1067 (inputs
1068 `(("guile" ,guile-2.2)
1069 ("libx11" ,libx11)
1070 ("libxext" ,libxext)
1071 ("libxinerama" ,libxinerama)
1072 ("xosd" ,xosd)))
1073 (home-page "https://github.com/alezost/guile-xosd")
1074 (synopsis "XOSD bindings for Guile")
1075 (description
1076 "Guile-XOSD provides Guile bindings for @code{libxosd},
1077@uref{http://sourceforge.net/projects/libxosd/, the X On Screen Display
1078library}.")
1079 (license license:gpl3+)))
1080
1081(define-public guile-dbi
1082 (package
1083 (name "guile-dbi")
1084 (version "2.1.6")
1085 (source (origin
1086 (method url-fetch)
1087 (uri (string-append
1088 "http://download.gna.org/guile-dbi/guile-dbi-"
1089 version ".tar.gz"))
1090 (sha256
1091 (base32
1092 "116njrprhgrsv1qm904sp3b02rq01fx639r433d657gyhw3x159n"))))
1093 (build-system gnu-build-system)
1094 (arguments
1095 '(#:configure-flags
1096 (list (string-append
1097 "--with-guile-site-dir=" %output "/share/guile/site/2.2"))
1098 #:make-flags
406ef442
CB
1099 (list (string-append
1100 "LDFLAGS=-Wl,-rpath=" %output "/lib:"
1101 (assoc-ref %build-inputs "guile-dbd-sqlite3") "/lib" ":"
1102 (assoc-ref %build-inputs "guile-dbd-postgresql") "/lib"))
0791437f
RW
1103 #:phases
1104 (modify-phases %standard-phases
1105 (add-after 'install 'patch-extension-path
1106 (lambda* (#:key outputs #:allow-other-keys)
1107 (let* ((out (assoc-ref outputs "out"))
1108 (dbi.scm (string-append
1109 out "/share/guile/site/2.2/dbi/dbi.scm"))
1110 (ext (string-append out "/lib/libguile-dbi")))
1111 (substitute* dbi.scm (("libguile-dbi") ext))
1112 #t))))))
1113 (inputs
406ef442
CB
1114 `(("guile-dbd-sqlite3" ,guile-dbd-sqlite3)
1115 ("guile-dbd-postgresql" ,guile-dbd-postgresql))) ; only shared library, no scheme files
0791437f
RW
1116 (propagated-inputs
1117 `(("guile" ,guile-2.2)))
1118 (synopsis "Guile database abstraction layer")
1119 (home-page "http://home.gna.org/guile-dbi/guile-dbi.html")
1120 (description
1121 "guile-dbi is a library for Guile that provides a convenient interface to
1122SQL databases. Database programming with guile-dbi is generic in that the same
1123programming interface is presented regardless of which database system is used.
1124It currently supports MySQL, Postgres and SQLite3.")
1125 (license license:gpl2+)))
1126
1127(define guile-dbi-bootstrap
1128 (package
1129 (inherit guile-dbi)
1130 (name "guile-dbi-bootstrap")
1131 (inputs '())
1132 (arguments
1133 (substitute-keyword-arguments (package-arguments guile-dbi)
1134 ((#:make-flags _) '(list))))))
1135
1136(define-public guile-dbd-sqlite3
1137 (package
1138 (name "guile-dbd-sqlite3")
1139 (version "2.1.6")
1140 (source (origin
1141 (method url-fetch)
1142 (uri (string-append
1143 "http://download.gna.org/guile-dbi/guile-dbd-sqlite3-"
1144 version ".tar.gz"))
1145 (sha256
1146 (base32
1147 "0rg71jchxd2y8x496s8zmfmikr5g8zxi8zv2ar3f7a23pph92iw2"))))
1148 (build-system gnu-build-system)
1149 (native-inputs
1150 `(("pkg-config" ,pkg-config)
1151 ("guile-dbi-bootstrap" ,guile-dbi-bootstrap))) ; only required for headers
1152 (inputs
1153 `(("sqlite" ,sqlite)
1154 ("zlib" ,(@ (gnu packages compression) zlib))))
1155 (synopsis "Guile DBI driver for SQLite")
1156 (home-page "https://github.com/jkalbhenn/guile-dbd-sqlite3")
1157 (description
1158 "guile-dbi is a library for Guile that provides a convenient interface to
1159SQL databases. This package implements the interface for SQLite.")
1160 (license license:gpl2+)))
1161
406ef442
CB
1162(define-public guile-dbd-postgresql
1163 (let ((commit "e97589b6b018b206c901e4cc24db463407a4036b")
1164 (revision 0))
1165 (package
1166 (name "guile-dbd-postgresql")
1167 (version (string-append
1168 "2.1.6-" (number->string revision) "." (string-take commit 7)))
1169 (source
1170 (origin
1171 (method git-fetch)
1172 (uri (git-reference
1173 (url "https://github.com/opencog/guile-dbi.git")
1174 (commit commit)))
1175 (file-name (git-file-name name version))
1176 (sha256
1177 (base32 "0n1gv9a0kdys10a4qmnrwvg5sydwb03880asri4gqdchcj3fimni"))))
1178 (build-system gnu-build-system)
1179 (arguments
1180 '(#:phases
1181 (modify-phases %standard-phases
1182 (add-after 'unpack 'chdir
1183 (lambda _
1184 ;; The upstream Git repository contains all the code, so change
1185 ;; to the relevant directory.
1186 (chdir "guile-dbd-postgresql")
1187 #t))
1188 (add-after 'chdir 'patch-src/Makefile.am
1189 (lambda* (#:key inputs #:allow-other-keys)
1190 (substitute* "src/Makefile.am"
1191 (("/usr/include")
1192 (string-append (assoc-ref inputs "postgresql") "/include")))
1193 #t))
1194 (add-after 'patch-src/Makefile.am 'patch-src
1195 (lambda _
1196 (substitute* "src/guile-dbd-postgresql.c"
1197 (("postgresql/libpq-fe\\.h") "libpq-fe.h"))
1198 #t)))))
1199 (native-inputs
1200 `(("pkg-config" ,pkg-config)
1201 ("automake" ,automake)
1202 ("autoconf" ,autoconf)
1203 ("perl" ,perl)
1204 ("libtool" ,libtool)
1205 ("guile-dbi-bootstrap" ,guile-dbi-bootstrap)))
1206 (inputs
1207 `(("postgresql" ,postgresql)
1208 ("zlib" ,zlib)))
1209 (synopsis "Guile DBI driver for PostgreSQL")
1210 (home-page
1211 "https://github.com/opencog/guile-dbi/tree/master/guile-dbd-postgresql")
1212 (description
1213 "@code{guile-dbi} is a library for Guile that provides a convenient
1214interface to SQL databases. This package implements the interface for
1215PostgreSQL.")
1216 (license license:gpl2+))))
1217
0791437f
RW
1218(define-public guile-config
1219 (package
1220 (name "guile-config")
1221 (version "0.3")
1222 (source
1223 (origin
1224 (method git-fetch)
1225 (uri (git-reference
1226 (url "https://gitlab.com/a-sassmannshausen/guile-config")
1227 (commit "ce12de3f438c6b2b59c43ee21bcd58251835fdf3")))
1228 (file-name "guile-config-0.3-checkout")
1229 (sha256 (base32 "02zbpin0r9m2vxmr7mv68v3xdn247dcck56kbzjn0gj4c2rhih85"))))
1230 (build-system gnu-build-system)
1231 (native-inputs
1232 `(("autoconf" ,autoconf)
1233 ("automake" ,automake)
1234 ("pkg-config" ,pkg-config)
1235 ("texinfo" ,texinfo)))
1236 (inputs `(("guile" ,guile-2.2)))
1237 (synopsis
1238 "Guile application configuration parsing library.")
1239 (description
1240 "Guile Config is a library providing a declarative approach to
1241application configuration specification. The library provides clean
1242configuration declaration forms, and processors that take care of:
1243configuration file creation; configuration file parsing; command-line
1244parameter parsing using getopt-long; basic GNU command-line parameter
1245generation (--help, --usage, --version); automatic output generation for the
1246above command-line parameters.")
1247 (home-page
1248 "https://gitlab.com/a-sassmannshausen/guile-config")
1249 (license license:gpl3+)))
1250
1251(define-public guile-hall
1252 (package
1253 (name "guile-hall")
63bf0afd 1254 (version "0.2")
0791437f 1255 (source
63bf0afd
AS
1256 (origin
1257 (method git-fetch)
1258 (uri (git-reference
1259 (url "https://gitlab.com/a-sassmannshausen/guile-hall")
1260 (commit "54aeeb088ea2f1168090b7cdb95e3e70884f52f3")))
1261 (file-name "guile-hall-0.2-checkout")
1262 (sha256 (base32
1263 "1bkbqgj24xh5b65sw2m98iggpi67b72szx1dsiq3cpzlcxplmgaz"))))
0791437f
RW
1264 (build-system gnu-build-system)
1265 (arguments
63bf0afd
AS
1266 `(#:modules
1267 ((ice-9 match)
1268 (ice-9 ftw)
1269 ,@%gnu-build-system-modules)
1270 #:phases
1271 (modify-phases
1272 %standard-phases
1273 (add-after 'install 'hall-wrap-binaries
1274 (lambda* (#:key inputs outputs #:allow-other-keys)
1275 (let* ((compiled-dir
1276 (lambda (out version)
1277 (string-append
1278 out "/lib/guile/" version "/site-ccache")))
1279 (uncompiled-dir
1280 (lambda (out version)
1281 (string-append
1282 out "/share/guile/site"
1283 (if (string-null? version) "" "/") version)))
1284 (dep-path
1285 (lambda (env modules path)
1286 (list env ":" 'prefix
1287 (cons modules
1288 (map (lambda (input)
1289 (string-append
1290 (assoc-ref inputs input)
1291 path))
1292 ,''("guile-config"))))))
1293 (out (assoc-ref outputs "out"))
1294 (bin (string-append out "/bin/"))
1295 (site (uncompiled-dir out "")))
1296 (match (scandir site)
1297 (("." ".." version)
1298 (for-each
1299 (lambda (file)
1300 (wrap-program
1301 (string-append bin file)
1302 (dep-path
1303 "GUILE_LOAD_PATH"
1304 (uncompiled-dir out version)
1305 (uncompiled-dir "" version))
1306 (dep-path
1307 "GUILE_LOAD_COMPILED_PATH"
1308 (compiled-dir out version)
1309 (compiled-dir "" version))))
1310 ,''("hall"))
1311 #t))))))))
0791437f 1312 (native-inputs
63bf0afd
AS
1313 `(("autoconf" ,autoconf)
1314 ("automake" ,automake)
1315 ("pkg-config" ,pkg-config)
1316 ("texinfo" ,texinfo)))
0791437f
RW
1317 (inputs `(("guile" ,guile-2.2)))
1318 (propagated-inputs
63bf0afd 1319 `(("guile-config" ,guile-config "out")))
0791437f
RW
1320 (synopsis "Guile project tooling")
1321 (description
63bf0afd
AS
1322 "Hall is a command-line application and a set of Guile libraries that allow you to quickly create and publish Guile projects. It allows you to transparently support the GNU build system, manage a project hierarchy & provides tight coupling to Guix.")
1323 (home-page
1324 "https://gitlab.com/a-sassmannshausen/guile-hall")
06085fac 1325 (license license:gpl3+)))
0791437f
RW
1326
1327(define-public guile-ics
1328 (package
1329 (name "guile-ics")
1330 (version "0.2.0")
1331 (source (origin
1332 (method git-fetch)
1333 (uri (git-reference
1334 (url "https://github.com/artyom-poptsov/guile-ics")
1335 (commit (string-append "v" version))))
1336 (file-name (string-append name "-" version "-checkout"))
1337 (sha256
1338 (base32
1339 "0qjjvadr7gibdq9jvwkmlkb4afsw9n2shfj9phpiadinxk3p4m2g"))))
1340 (build-system gnu-build-system)
1341 (native-inputs
1342 `(("autoconf" ,autoconf-wrapper)
1343 ("automake" ,automake)
1344 ("texinfo" ,texinfo)
1345 ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'.
1346 ("gettext" ,gettext-minimal)
1347 ("pkg-config" ,pkg-config)))
1348 (inputs `(("guile" ,guile-2.2) ("which" ,which)))
1349 (propagated-inputs `(("guile-lib" ,guile-lib)))
1350 (home-page "https://github.com/artyom-poptsov/guile-ics")
1351 (synopsis "Guile parser library for the iCalendar format")
1352 (description
1353 "Guile-ICS is an iCalendar (RFC5545) format parser library written in
1354pure Scheme. The library can be used to read and write iCalendar data.
1355
1356The library is shipped with documentation in Info format and usage examples.")
1357 (license license:gpl3+)))
1358
1359(define-public guile-wisp
1360 (package
1361 (name "guile-wisp")
15218d4e 1362 (version "0.9.9.1")
0791437f
RW
1363 (source (origin
1364 (method url-fetch)
1365 (uri (string-append "https://bitbucket.org/ArneBab/"
1366 "wisp/downloads/wisp-"
1367 version ".tar.gz"))
1368 (sha256
1369 (base32
15218d4e 1370 "1ii14qz1lx7ffhb8i9q7dgaiwbif8g2q182skx17j11skp65c8r3"))))
0791437f
RW
1371 (build-system gnu-build-system)
1372 (arguments
1373 `(#:modules ((guix build gnu-build-system)
15218d4e 1374 ((guix build emacs-build-system) #:prefix emacs:)
0791437f 1375 (guix build utils)
15218d4e 1376 (guix build emacs-utils)
0791437f
RW
1377 (ice-9 rdelim)
1378 (ice-9 popen))
15218d4e
RW
1379 #:imported-modules (,@%gnu-build-system-modules
1380 (guix build emacs-build-system)
1381 (guix build emacs-utils))
0791437f
RW
1382 #:phases
1383 (modify-phases %standard-phases
1384 (add-before 'configure 'patch-/usr/bin/env
1385 (lambda _
1386 (substitute* "Makefile.in"
1387 (("/usr/bin/env bash") (which "bash"))
1388 (("\\$\\(GUILE_EFFECTIVE_VERSION\\)/site")
1389 "site/$(GUILE_EFFECTIVE_VERSION)")) ;use the right order
1390 #t))
1391 ;; auto compilation breaks, but if we set HOME to /tmp,
1392 ;; that works ok
1393 (add-before 'check 'auto-compile-hacky-workaround
1394 (lambda _ (setenv "HOME" "/tmp") #t))
1395 (add-after 'install 'install-go-files
1396 (lambda* (#:key outputs inputs #:allow-other-keys)
1397 (let* ((out (assoc-ref outputs "out"))
1398 (effective (read-line
1399 (open-pipe* OPEN_READ
1400 "guile" "-c"
1401 "(display (effective-version))")))
1402 (module-dir (string-append out "/share/guile/site/"
1403 effective))
1404 (object-dir (string-append out "/lib/guile/" effective
1405 "/site-ccache"))
1406 (prefix (string-length module-dir)))
1407 ;; compile to the destination
1408 (for-each (lambda (file)
1409 (let* ((base (string-drop (string-drop-right file 4)
1410 prefix))
1411 (go (string-append object-dir base ".go")))
1412 (invoke "guild" "compile" "-L" module-dir
1413 file "-o" go)))
1414 (find-files module-dir "\\.scm$"))
15218d4e
RW
1415 #t)))
1416 (add-after 'install 'install-emacs-files
1417 (assoc-ref emacs:%standard-phases 'install))
1418 (add-after 'install-emacs-files 'compile-emacs-files
1419 (assoc-ref emacs:%standard-phases 'build))
1420 (add-after 'compile-emacs-files 'make-autoloads
1421 (assoc-ref emacs:%standard-phases 'make-autoloads)))))
0791437f
RW
1422 (home-page "https://draketo.de/english/wisp")
1423 (inputs
1424 `(("guile" ,guile-2.2)))
1425 (native-inputs
15218d4e
RW
1426 `(("emacs" ,emacs-minimal)
1427 ("python" ,python)
0791437f
RW
1428 ("pkg-config" ,pkg-config)))
1429 (synopsis "Whitespace to lisp syntax for Guile")
1430 (description "Wisp is a syntax for Guile which provides a Python-like
1431whitespace-significant language. It may be easier on the eyes for some
1432users and in some situations.")
1433 (license license:gpl3+)))
1434
1435(define-public guile-sly
1436 (package
1437 (name "guile-sly")
1438 (version "0.1")
1439 (source (origin
1440 (method url-fetch)
1441 (uri (string-append "https://files.dthompson.us/sly/sly-"
1442 version ".tar.gz"))
1443 (sha256
1444 (base32
1445 "1svzlbz2vripmyq2kjh0rig16bsrnbkwbsm558pjln9l65mcl4qq"))
1446 (modules '((guix build utils)))
1447 (snippet
1448 '(begin
1449 (substitute* "configure"
1450 (("_guile_required_version=\"2.0.11\"")
1451 "_guile_required_version=\"2\"")
1452 (("ac_subst_vars='")
1453 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
1454 (substitute* (find-files "." "Makefile.in")
1455 (("moddir = .*$")
1456 (string-append
1457 "moddir = "
1458 "$(prefix)/share/guile/site/@GUILE_EFFECTIVE_VERSION@\n"))
1459 (("godir = .*$")
1460 (string-append
1461 "godir = "
1462 "$(prefix)/lib/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n")))
1463 #t))))
1464 (build-system gnu-build-system)
1465 (arguments
1466 '(#:configure-flags
1467 (list (string-append "--with-libfreeimage-prefix="
1468 (assoc-ref %build-inputs "freeimage"))
1469 (string-append "--with-libgslcblas-prefix="
1470 (assoc-ref %build-inputs "gsl")))))
1471 (native-inputs
1472 `(("pkg-config" ,pkg-config)))
1473 (propagated-inputs
1474 `(("guile-sdl" ,guile-sdl)
1475 ("guile-opengl" ,guile-opengl)))
1476 (inputs
1477 `(("guile" ,guile-2.2)
1478 ("gsl" ,gsl)
1479 ("freeimage" ,freeimage)
1480 ("mesa" ,mesa)))
1481 (synopsis "2D/3D game engine for GNU Guile")
1482 (description "Sly is a 2D/3D game engine written in Guile Scheme. Sly
1483features a functional reactive programming interface and live coding
1484capabilities.")
1485 (home-page "https://dthompson.us/projects/sly.html")
1486 (license license:gpl3+)))
1487
1488(define-public g-wrap
1489 (package
1490 (name "g-wrap")
1491 (version "1.9.15")
1492 (source (origin
1493 (method url-fetch)
1494 (uri (string-append "mirror://savannah/g-wrap/g-wrap-"
1495 version ".tar.gz"))
1496 (sha256
1497 (base32
1498 "0ak0bha37dfpj9kmyw1r8fj8nva639aw5xr66wr5gd3l1rqf5xhg"))))
1499 (build-system gnu-build-system)
1500 (native-inputs
1501 `(("pkg-config" ,pkg-config)))
1502 (propagated-inputs
1503 `(("guile" ,guile-2.2)
1504 ("guile-lib" ,guile-lib)))
1505 (inputs
1506 `(("libffi" ,libffi)))
1507 (arguments
1508 `(#:configure-flags '("--disable-Werror")
1509 #:phases
1510 (modify-phases %standard-phases
1511 (add-before 'configure 'pre-configure
1512 (lambda* (#:key outputs #:allow-other-keys)
1513 (let ((out (assoc-ref outputs "out")))
1514 (substitute* (find-files "." "^Makefile.in$")
1515 (("guilemoduledir =.*guile/site" all)
1516 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))
1517 #t))))))
1518 (synopsis "Generate C bindings for Guile")
1519 (description "G-Wrap is a tool and Guile library for generating function
1520wrappers for inter-language calls. It currently only supports generating Guile
1521wrappers for C functions. Given a definition of the types and prototypes for
1522a given C interface, G-Wrap will automatically generate the C code that
1523provides access to that interface and its types from the Scheme level.")
1524 (home-page "https://www.nongnu.org/g-wrap/index.html")
1525 (license license:lgpl2.1+)))
1526
1527(define-public guile-miniadapton
1528 (let ((commit "1b5749422304567c96ac5367f2221dda9eff5880")
1529 (revision "1"))
1530 (package
1531 (name "guile-miniadapton")
1532 (version (string-append "0-" revision "." (string-take commit 9)))
1533 (source (origin
1534 (method git-fetch)
1535 (uri (git-reference
1536 (url "https://github.com/fisherdj/miniAdapton.git")
1537 (commit commit)))
1538 (file-name (string-append name "-" version "-checkout"))
1539 (sha256
1540 (base32
1541 "09q51zkw2fypad5xixskfzw2cjhjgs5cswdp3i7cpp651rb3zndh"))))
1542 (build-system guile-build-system)
1543 (native-inputs
1544 `(("guile" ,guile-2.2)))
1545 (home-page "https://github.com/fisherdj/miniAdapton")
1546 (synopsis "Minimal implementation of incremental computation in Guile
1547Scheme")
1548 (description "This package provides a complete Scheme implementation of
1549miniAdapton, which implements the core functionality of the Adapton system for
1550incremental computation (also known as self-adjusting computation). Like
1551Adapton, miniAdapton allows programmers to safely combine mutation and
1552memoization. miniAdapton is built on top of an even simpler system,
1553microAdapton. Both miniAdapton and microAdapton are designed to be easy to
1554understand, extend, and port to host languages other than Scheme.")
1555 (license license:expat))))
1556
1557(define-public guile-reader
1558 (package
1559 (name "guile-reader")
1560 (version "0.6.2")
1561 (source (origin
1562 (method url-fetch)
1563 (uri (string-append "mirror://savannah/guile-reader/guile-reader-"
1564 version ".tar.gz"))
1565 (sha256
1566 (base32
1567 "0592s2s8ampqmqwilc4fvcild6rb9gy79di6vxv5kcdmv23abkgx"))))
1568 (build-system gnu-build-system)
1569 (native-inputs `(("pkgconfig" ,pkg-config)
1570 ("gperf" ,gperf-3.0)))
1571 (inputs `(("guile" ,guile-2.2)))
1572 (synopsis "Framework for building readers for GNU Guile")
1573 (description
1574 "Guile-Reader is a simple framework for building readers for GNU Guile.
1575
1576The idea is to make it easy to build procedures that extend Guile’s read
1577procedure. Readers supporting various syntax variants can easily be written,
1578possibly by re-using existing “token readers” of a standard Scheme
1579readers. For example, it is used to implement Skribilo’s R5RS-derived
1580document syntax.
1581
1582Guile-Reader’s approach is similar to Common Lisp’s “read table”, but
1583hopefully more powerful and flexible (for instance, one may instantiate as
1584many readers as needed).")
1585 (home-page "https://www.nongnu.org/guile-reader/")
1586 (license license:gpl3+)))
1587
1588(define-public guile2.2-reader
1589 (deprecated-package "guile2.2-reader" guile-reader))
1590
1591(define-public guile-ncurses
1592 (package
1593 (name "guile-ncurses")
1594 (version "2.2")
1595 (source (origin
1596 (method url-fetch)
1597 (uri (string-append "mirror://gnu/guile-ncurses/guile-ncurses-"
1598 version ".tar.gz"))
1599 (sha256
1600 (base32
1601 "1wvggbr4xv8idh1hzd8caj4xfp4pln78a7w1wqzd4zgzwmnzxr2f"))))
1602 (build-system gnu-build-system)
1603 (inputs `(("ncurses" ,ncurses)
1604 ("guile" ,guile-2.2)))
1605 (native-inputs `(("pkg-config" ,pkg-config)))
1606 (arguments
1607 '(#:configure-flags (list "--with-ncursesw" ; Unicode support
1608 "--with-gnu-filesystem-hierarchy")
1609 #:phases
1610 (modify-phases %standard-phases
1611 (add-before 'build 'fix-libguile-ncurses-file-name
1612 (lambda* (#:key outputs #:allow-other-keys)
1613 (invoke "make" "install"
1614 "-C" "src/ncurses"
1615 "-j" (number->string
1616 (parallel-job-count)))
1617 (let* ((out (assoc-ref outputs "out"))
1618 (dir "src/ncurses")
1619 (files (find-files dir ".scm")))
1620 (substitute* files
1621 (("\"libguile-ncurses\"")
1622 (format #f "\"~a/lib/guile/2.2/libguile-ncurses\""
1623 out)))
1624 #t))))))
1625 (home-page "https://www.gnu.org/software/guile-ncurses/")
1626 (synopsis "Guile bindings to ncurses")
1627 (description
1628 "guile-ncurses provides Guile language bindings for the ncurses
1629library.")
1630 (license license:lgpl3+)))
1631
1632(define-public guile-ncurses/gpm
1633 (package
1634 (inherit guile-ncurses)
1635 (name "guile-ncurses-with-gpm")
1636 (inputs `(("ncurses" ,ncurses/gpm)
1637 ("guile" ,guile-2.2)))))
1638
1639(define-public guile-lib
1640 (package
1641 (name "guile-lib")
1642 (version "0.2.6.1")
1643 (source (origin
1644 (method url-fetch)
1645 (uri (string-append "mirror://savannah/guile-lib/guile-lib-"
1646 version ".tar.gz"))
1647 (sha256
1648 (base32
1649 "0aizxdif5dpch9cvs8zz5g8ds5s4xhfnwza2il5ji7fv2h7ks7bd"))))
1650 (build-system gnu-build-system)
1651 (arguments
1652 '(#:make-flags
1653 '("GUILE_AUTO_COMPILE=0") ; to prevent guild errors
1654 #:phases
1655 (modify-phases %standard-phases
1656 (add-before 'configure 'patch-module-dir
1657 (lambda _
1658 (substitute* "src/Makefile.in"
1659 (("^moddir = ([[:graph:]]+)")
1660 "moddir = $(datadir)/guile/site/@GUILE_EFFECTIVE_VERSION@\n")
1661 (("^godir = ([[:graph:]]+)")
1662 "godir = \
1663$(libdir)/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n"))
1664 #t)))))
1665 (native-inputs `(("pkg-config" ,pkg-config)))
1666 (inputs `(("guile" ,guile-2.2)))
1667 (home-page "https://www.nongnu.org/guile-lib/")
1668 (synopsis "Collection of useful Guile Scheme modules")
1669 (description
1670 "Guile-Lib is intended as an accumulation place for pure-scheme Guile
1671modules, allowing for people to cooperate integrating their generic Guile
1672modules into a coherent library. Think \"a down-scaled, limited-scope CPAN
1673for Guile\".")
1674
1675 ;; The whole is under GPLv3+, but some modules are under laxer
1676 ;; distribution terms such as LGPL and public domain. See `COPYING' for
1677 ;; details.
1678 (license license:gpl3+)))
1679
1680(define-public guile2.0-lib
1681 (package
1682 (inherit guile-lib)
1683 (name "guile2.0-lib")
1684 (inputs `(("guile" ,guile-2.0)))))
1685
1686(define-public guile2.2-lib
1687 (deprecated-package "guile2.2-lib" guile-lib))
1688
1689(define-public guile-minikanren
1690 (package
1691 (name "guile-minikanren")
1692 (version "20150424.e844d85")
1693 (source (origin
1694 (method git-fetch)
1695 (uri (git-reference
1696 (url "https://github.com/ijp/minikanren.git")
1697 (commit "e844d85512f8c055d3f96143ee506007389a25e3")))
1698 (file-name (string-append name "-" version "-checkout"))
1699 (sha256
1700 (base32
1701 "0r50jlpzi940jlmxyy3ddqqwmj5r12gb4bcv0ssini9v8km13xz6"))))
1702 (build-system guile-build-system)
1703 (native-inputs
1704 `(("guile" ,guile-2.2)))
1705 (home-page "https://github.com/ijp/minikanren")
1706 (synopsis "MiniKanren declarative logic system, packaged for Guile")
1707 (description
1708 "MiniKanren is a relational programming extension to the Scheme
1709programming Language, written as a smaller version of Kanren suitable for
1710pedagogical purposes. It is featured in the book, The Reasoned Schemer,
1711written by Dan Friedman, William Byrd, and Oleg Kiselyov.
1712
1713This is Ian Price's r6rs packaged version of miniKanren, which deviates
1714slightly from miniKanren mainline.
1715
1716See http://minikanren.org/ for more on miniKanren generally.")
1717 (license license:expat)))
1718
1719(define-public guile2.0-minikanren
1720 (package
1721 (inherit guile-minikanren)
1722 (name "guile2.0-minikanren")
1723 (native-inputs `(("guile" ,guile-2.0)))))
1724
1725(define-public guile2.2-minikanren
1726 (deprecated-package "guile2.2-minikanren" guile-minikanren))
1727
1728(define-public guile-irregex
1729 (package
1730 (name "guile-irregex")
1731 (version "0.9.6")
1732 (source (origin
1733 (method url-fetch)
1734 (uri (string-append
1735 "http://synthcode.com/scheme/irregex/irregex-"
1736 version ".tar.gz"))
1737 (sha256
1738 (base32
1739 "1ia3m7dp3lcxa048q0gqbiwwsyvn99baw6xkhb4bhhzn4k7bwyqq"))))
1740 (build-system guile-build-system)
1741 (arguments
1742 '(#:phases (modify-phases %standard-phases
1743 (add-after 'unpack 'move-files-around
1744 (lambda _
1745 ;; Move the relevant source files to src/ and create the
1746 ;; rx/ directory to match the expected module hierarchy.
1747 (mkdir-p "src/rx/source")
1748 (rename-file "irregex-guile.scm"
1749 "src/rx/irregex.scm")
1750 (rename-file "irregex.scm"
1751 "src/rx/source/irregex.scm")
1752 ;; Not really reachable via guile's packaging system,
1753 ;; but nice to have around.
1754 (rename-file "irregex-utils.scm"
1755 "src/rx/source/irregex-utils.scm")
1756 #t)))
1757 #:source-directory "src"))
1758 (native-inputs
1759 `(("guile" ,guile-2.2)))
1760 (home-page "http://synthcode.com/scheme/irregex")
1761 (synopsis "S-expression based regular expressions")
1762 (description
1763 "Irregex is an s-expression based alternative to your classic
1764string-based regular expressions. It implements SRFI 115 and is deeply
1765inspired by the SCSH regular expression system.")
1766 (license license:bsd-3)))
1767
1768(define-public guile2.0-irregex
1769 (package
1770 (inherit guile-irregex)
1771 (name "guile2.0-irregex")
1772 (native-inputs `(("guile" ,guile-2.0)))))
1773
1774(define-public guile2.2-irregex
1775 (deprecated-package "guile2.2-irregex" guile-irregex))
1776
1777(define-public haunt
1778 (package
1779 (name "haunt")
1780 (version "0.2.4")
1781 (source (origin
1782 (method url-fetch)
1783 (uri (string-append "https://files.dthompson.us/haunt/haunt-"
1784 version ".tar.gz"))
1785 (sha256
1786 (base32
1787 "056z4znikk83nr5mr0x2ac3iinqbywa2bvb37mhr566a1q50isfc"))))
1788 (build-system gnu-build-system)
1789 (arguments
1790 `(#:modules ((ice-9 match) (ice-9 ftw)
1791 ,@%gnu-build-system-modules)
1792 #:tests? #f ; test suite is non-deterministic :(
1793 #:phases (modify-phases %standard-phases
1794 (add-after 'install 'wrap-haunt
1795 (lambda* (#:key inputs outputs #:allow-other-keys)
1796 ;; Wrap the 'haunt' command to refer to the right
1797 ;; modules.
1798 (let* ((out (assoc-ref outputs "out"))
1799 (bin (string-append out "/bin"))
1800 (site (string-append
1801 out "/share/guile/site"))
1802 (deps (list (assoc-ref inputs "guile-reader")
1803 (assoc-ref inputs "guile-commonmark"))))
1804 (match (scandir site)
1805 (("." ".." version)
1806 (let ((modules (string-append site "/" version))
1807 (compiled-modules (string-append
1808 out "/lib/guile/" version
1809 "/site-ccache")))
1810 (wrap-program (string-append bin "/haunt")
1811 `("GUILE_LOAD_PATH" ":" prefix
1812 (,modules
1813 ,@(map (lambda (dep)
1814 (string-append dep
1815 "/share/guile/site/"
1816 version))
1817 deps)))
1818 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
1819 (,compiled-modules
1820 ,@(map (lambda (dep)
1821 (string-append dep "/lib/guile/"
1822 version
1823 "/site-ccache"))
1824 deps))))
1825 #t)))))))))
1826 (native-inputs
1827 `(("pkg-config" ,pkg-config)
1828 ("texinfo" ,texinfo)))
1829 (inputs
1830 `(("guile" ,guile-2.2)))
1831 (propagated-inputs
1832 `(("guile-reader" ,guile-reader)
1833 ("guile-commonmark" ,guile-commonmark)))
1834 (synopsis "Functional static site generator")
1835 (description "Haunt is a static site generator written in Guile
1836Scheme. Haunt features a functional build system and an extensible
1837interface for reading articles in any format.")
1838 (home-page "http://haunt.dthompson.us")
1839 (license license:gpl3+)))
1840
1841(define-public guile2.0-haunt
1842 (package
1843 (inherit haunt)
1844 (name "guile2.0-haunt")
1845 (inputs `(("guile" ,guile-2.0)))))
1846
1847(define-public guile2.2-haunt
1848 (deprecated-package "guile2.2-haunt" haunt))
1849
1850(define-public guile-redis
1851 (package
1852 (name "guile-redis")
f57bf15c 1853 (version "1.3.0")
0791437f
RW
1854 (home-page "https://github.com/aconchillo/guile-redis")
1855 (source (origin
1856 (method url-fetch)
1857 (uri (string-append home-page "/archive/" version ".tar.gz"))
1858 (sha256
1859 (base32
f57bf15c 1860 "1li70a2716my9q9zfq0qn2x5d1cir9k2vx0jm9glm464yaf1vj39"))))
0791437f
RW
1861 (build-system gnu-build-system)
1862 (native-inputs
1863 `(("autoconf" ,autoconf)
1864 ("automake" ,automake)
1865 ("pkg-config" ,pkg-config)
1866 ("guile" ,guile-2.2)))
1867 (synopsis "Redis client library for Guile")
1868 (description "Guile-redis provides a Scheme interface to the Redis
1869key-value cache and store.")
1870 (license license:lgpl3+)))
1871
1872(define-public guile2.0-redis
1873 (package
1874 (inherit guile-redis)
1875 (name "guile2.0-redis")
1876 (native-inputs `(("guile" ,guile-2.0)
1877 ,@(alist-delete "guile"
1878 (package-native-inputs guile-redis))))))
1879
1880(define-public guile2.2-redis
1881 (deprecated-package "guile2.2-redis" guile-redis))
1882
1883(define-public guile-commonmark
1884 (package
1885 (name "guile-commonmark")
b552e307 1886 (version "0.1.2")
0791437f
RW
1887 (source (origin
1888 (method url-fetch)
1889 (uri (string-append "https://github.com/OrangeShark/" name
1890 "/releases/download/v" version
1891 "/" name "-" version ".tar.gz"))
1892 (sha256
1893 (base32
b552e307 1894 "17lrsdisa3kckh24q114vfmzdc4wkqa6ccwl4hdlrng5wpn1iman"))))
0791437f
RW
1895 (build-system gnu-build-system)
1896 (inputs
1897 `(("guile" ,guile-2.2)))
1898 (native-inputs
1899 `(("pkg-config" ,pkg-config)))
1900 (synopsis "CommonMark parser for Guile")
1901 (description
1902 "guile-commonmark is a library for parsing CommonMark, a fully specified
1903variant of Markdown. The library is written in Guile Scheme and is designed
1904to transform a CommonMark document to SXML. guile-commonmark tries to closely
1905follow the @uref{http://commonmark.org/, CommonMark spec}, the main difference
1906is no support for parsing block and inline level HTML.")
1907 (home-page "https://github.com/OrangeShark/guile-commonmark")
1908 (license license:lgpl3+)))
1909
1910(define-public guile2.0-commonmark
1911 (package
1912 (inherit guile-commonmark)
1913 (name "guile2.0-commonmark")
1914 (inputs `(("guile" ,guile-2.0)))))
1915
1916(define-public guile2.2-commonmark
1917 (deprecated-package "guile2.2-commonmark" guile-commonmark))
1918
1919(define-public mcron
1920 (package
1921 (name "mcron")
1922 (version "1.1.1")
1923 (source (origin
1924 (method url-fetch)
1925 (uri (string-append "mirror://gnu/mcron/mcron-"
1926 version ".tar.gz"))
1927 (sha256
1928 (base32
1929 "1i9mcp6r6my61zfiydsm3n6my41mwvl7dfala4q29qx0zn1ynlm4"))))
1930 (build-system gnu-build-system)
1931 (arguments
1932 '(#:phases (modify-phases %standard-phases
1933 (add-before 'check 'set-timezone
1934 (lambda* (#:key inputs #:allow-other-keys)
1935 ;; 'tests/job-specifier.scm' expects to be running in
1936 ;; UTC-2 or something.
1937 ;; FIXME: This issue is being investigated upstream, for
1938 ;; now we'll just skip the tests (see below):
1939 ;; <https://lists.gnu.org/archive/html/bug-mcron/2018-04/msg00005.html>.
1940 (let ((tzdata (assoc-ref inputs "tzdata")))
1941 (setenv "TZDIR"
1942 (string-append tzdata
1943 "/share/zoneinfo"))
1944 (setenv "TZ" "UTC-2")
1945 #t)))
1946 (add-before 'check 'adjust-tests
1947 (lambda _
1948 (substitute* "tests/job-specifier.scm"
1949 ;; (getpw) fails with "entry not found" in the build
1950 ;; environment, so pass an argument.
1951 (("\\(getpw\\)")
1952 "(getpwnam (getuid))")
1953 ;; The build environment lacks an entry for root in
1954 ;; /etc/passwd.
1955 (("\\(getpw 0\\)")
1956 "(getpwnam \"nobody\")")
1957
1958 ;; FIXME: Skip the 4 faulty tests (see above).
1959 (("\\(test-equal \"next-year\"" all)
1960 (string-append "(test-skip 4)\n" all)))
1961 #t)))))
1962 (native-inputs `(("pkg-config" ,pkg-config)
1963 ("tzdata" ,tzdata-for-tests)))
1964 (inputs `(("ed" ,ed) ("which" ,which) ("guile" ,guile-2.2)))
1965 (home-page "https://www.gnu.org/software/mcron/")
1966 (synopsis "Run jobs at scheduled times")
1967 (description
1968 "GNU Mcron is a complete replacement for Vixie cron. It is used to run
1969tasks on a schedule, such as every hour or every Monday. Mcron is written in
1970Guile, so its configuration can be written in Scheme; the original cron
1971format is also supported.")
1972 (license license:gpl3+)))
1973
1974(define-public mcron2
1975 ;; This was mthl's mcron development branch, and it became mcron 1.1.
1976 (deprecated-package "mcron2" mcron))
6bb5f88e
RW
1977
1978(define-public guile-picture-language
8d11b6dd
RW
1979 (let ((commit "1ea8b78a8bceb4f7e5eaeb3e76987072267f99bb")
1980 (revision "2"))
6bb5f88e
RW
1981 (package
1982 (name "guile-picture-language")
1983 (version (git-version "0" revision commit))
1984 (source (origin
1985 (method git-fetch)
1986 (uri (git-reference
1987 (url "https://git.elephly.net/software/guile-picture-language.git")
1988 (commit commit)))
1989 (sha256
1990 (base32
8d11b6dd 1991 "1rvq6q2zq21x7dx0qq1hn568wglsl4bkd8gacbarcx1fs0rrxcqw"))))
6bb5f88e
RW
1992 (build-system guile-build-system)
1993 (inputs
1994 `(("guile" ,guile-2.2)))
1995 (home-page "https://git.elephly.net/software/guile-picture-language.git")
1996 (synopsis "Picture language for Guile")
1997 (description
1998 "This package provides a simple SVG-based picture language for Guile.
1999The picture values can directly be displayed in Geiser.")
2000 (license license:lgpl3+))))