gnu: nnn: Don't use NAME in source URI.
[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")
1254 (version "0.1.1")
1255 (source
1256 (origin
1257 (method git-fetch)
1258 (uri (git-reference
1259 (url "https://gitlab.com/a-sassmannshausen/guile-hall")
1260 (commit "7d1094a12fe917209ce5b76c681cc8c862d4c65b")))
1261 (file-name "guile-hall-0.1.1-checkout")
1262 (sha256
1263 (base32
1264 "03kb09cjca98hlbx9mj12mqinzsnnvp6ci6i975n88pjhaxigyp1"))))
1265 (build-system gnu-build-system)
1266 (arguments
1267 `(#:modules
1268 ((ice-9 match)
1269 (ice-9 ftw)
1270 ,@%gnu-build-system-modules)
1271 #:phases
395a95bb
RW
1272 (modify-phases %standard-phases
1273 (add-after 'install 'hall-wrap-binaries
1274 (lambda* (#:key inputs outputs #:allow-other-keys)
1275 (let* ((out (assoc-ref outputs "out"))
1276 (bin (string-append out "/bin/"))
1277 (site (string-append out "/share/guile/site"))
1278 (config (assoc-ref inputs "guile-config")))
0791437f
RW
1279 (match (scandir site)
1280 (("." ".." version)
1281 (let ((modules (string-append site "/" version))
395a95bb
RW
1282 (compiled-modules (string-append
1283 out "/lib/guile/" version
1284 "/site-ccache")))
1285 (wrap-program (string-append bin "hall")
1286 `("GUILE_LOAD_PATH" ":" prefix
1287 (,modules
1288 ,(string-append config
1289 "/share/guile/site/"
1290 version)))
1291 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
1292 (,compiled-modules
1293 ,(string-append config "/lib/guile/"
1294 version
1295 "/site-ccache"))))
0791437f
RW
1296 #t)))))))))
1297 (native-inputs
1298 `(("autoconf" ,autoconf)
1299 ("automake" ,automake)
1300 ("pkg-config" ,pkg-config)
1301 ("texinfo" ,texinfo)))
1302 (inputs `(("guile" ,guile-2.2)))
1303 (propagated-inputs
1304 `(("guile-config" ,guile-config)))
1305 (synopsis "Guile project tooling")
1306 (description
1307 "Hall is a command-line application and a set of Guile libraries that
1308allow you to quickly create and publish Guile projects. It allows you to
1309transparently support the GNU build system, manage a project hierarchy &
1310provides tight coupling to Guix.")
395a95bb 1311 (home-page "https://gitlab.com/a-sassmannshausen/guile-hall")
0791437f
RW
1312 (license license:gpl3+)))
1313
1314(define-public guile-ics
1315 (package
1316 (name "guile-ics")
1317 (version "0.2.0")
1318 (source (origin
1319 (method git-fetch)
1320 (uri (git-reference
1321 (url "https://github.com/artyom-poptsov/guile-ics")
1322 (commit (string-append "v" version))))
1323 (file-name (string-append name "-" version "-checkout"))
1324 (sha256
1325 (base32
1326 "0qjjvadr7gibdq9jvwkmlkb4afsw9n2shfj9phpiadinxk3p4m2g"))))
1327 (build-system gnu-build-system)
1328 (native-inputs
1329 `(("autoconf" ,autoconf-wrapper)
1330 ("automake" ,automake)
1331 ("texinfo" ,texinfo)
1332 ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'.
1333 ("gettext" ,gettext-minimal)
1334 ("pkg-config" ,pkg-config)))
1335 (inputs `(("guile" ,guile-2.2) ("which" ,which)))
1336 (propagated-inputs `(("guile-lib" ,guile-lib)))
1337 (home-page "https://github.com/artyom-poptsov/guile-ics")
1338 (synopsis "Guile parser library for the iCalendar format")
1339 (description
1340 "Guile-ICS is an iCalendar (RFC5545) format parser library written in
1341pure Scheme. The library can be used to read and write iCalendar data.
1342
1343The library is shipped with documentation in Info format and usage examples.")
1344 (license license:gpl3+)))
1345
1346(define-public guile-wisp
1347 (package
1348 (name "guile-wisp")
15218d4e 1349 (version "0.9.9.1")
0791437f
RW
1350 (source (origin
1351 (method url-fetch)
1352 (uri (string-append "https://bitbucket.org/ArneBab/"
1353 "wisp/downloads/wisp-"
1354 version ".tar.gz"))
1355 (sha256
1356 (base32
15218d4e 1357 "1ii14qz1lx7ffhb8i9q7dgaiwbif8g2q182skx17j11skp65c8r3"))))
0791437f
RW
1358 (build-system gnu-build-system)
1359 (arguments
1360 `(#:modules ((guix build gnu-build-system)
15218d4e 1361 ((guix build emacs-build-system) #:prefix emacs:)
0791437f 1362 (guix build utils)
15218d4e 1363 (guix build emacs-utils)
0791437f
RW
1364 (ice-9 rdelim)
1365 (ice-9 popen))
15218d4e
RW
1366 #:imported-modules (,@%gnu-build-system-modules
1367 (guix build emacs-build-system)
1368 (guix build emacs-utils))
0791437f
RW
1369 #:phases
1370 (modify-phases %standard-phases
1371 (add-before 'configure 'patch-/usr/bin/env
1372 (lambda _
1373 (substitute* "Makefile.in"
1374 (("/usr/bin/env bash") (which "bash"))
1375 (("\\$\\(GUILE_EFFECTIVE_VERSION\\)/site")
1376 "site/$(GUILE_EFFECTIVE_VERSION)")) ;use the right order
1377 #t))
1378 ;; auto compilation breaks, but if we set HOME to /tmp,
1379 ;; that works ok
1380 (add-before 'check 'auto-compile-hacky-workaround
1381 (lambda _ (setenv "HOME" "/tmp") #t))
1382 (add-after 'install 'install-go-files
1383 (lambda* (#:key outputs inputs #:allow-other-keys)
1384 (let* ((out (assoc-ref outputs "out"))
1385 (effective (read-line
1386 (open-pipe* OPEN_READ
1387 "guile" "-c"
1388 "(display (effective-version))")))
1389 (module-dir (string-append out "/share/guile/site/"
1390 effective))
1391 (object-dir (string-append out "/lib/guile/" effective
1392 "/site-ccache"))
1393 (prefix (string-length module-dir)))
1394 ;; compile to the destination
1395 (for-each (lambda (file)
1396 (let* ((base (string-drop (string-drop-right file 4)
1397 prefix))
1398 (go (string-append object-dir base ".go")))
1399 (invoke "guild" "compile" "-L" module-dir
1400 file "-o" go)))
1401 (find-files module-dir "\\.scm$"))
15218d4e
RW
1402 #t)))
1403 (add-after 'install 'install-emacs-files
1404 (assoc-ref emacs:%standard-phases 'install))
1405 (add-after 'install-emacs-files 'compile-emacs-files
1406 (assoc-ref emacs:%standard-phases 'build))
1407 (add-after 'compile-emacs-files 'make-autoloads
1408 (assoc-ref emacs:%standard-phases 'make-autoloads)))))
0791437f
RW
1409 (home-page "https://draketo.de/english/wisp")
1410 (inputs
1411 `(("guile" ,guile-2.2)))
1412 (native-inputs
15218d4e
RW
1413 `(("emacs" ,emacs-minimal)
1414 ("python" ,python)
0791437f
RW
1415 ("pkg-config" ,pkg-config)))
1416 (synopsis "Whitespace to lisp syntax for Guile")
1417 (description "Wisp is a syntax for Guile which provides a Python-like
1418whitespace-significant language. It may be easier on the eyes for some
1419users and in some situations.")
1420 (license license:gpl3+)))
1421
1422(define-public guile-sly
1423 (package
1424 (name "guile-sly")
1425 (version "0.1")
1426 (source (origin
1427 (method url-fetch)
1428 (uri (string-append "https://files.dthompson.us/sly/sly-"
1429 version ".tar.gz"))
1430 (sha256
1431 (base32
1432 "1svzlbz2vripmyq2kjh0rig16bsrnbkwbsm558pjln9l65mcl4qq"))
1433 (modules '((guix build utils)))
1434 (snippet
1435 '(begin
1436 (substitute* "configure"
1437 (("_guile_required_version=\"2.0.11\"")
1438 "_guile_required_version=\"2\"")
1439 (("ac_subst_vars='")
1440 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
1441 (substitute* (find-files "." "Makefile.in")
1442 (("moddir = .*$")
1443 (string-append
1444 "moddir = "
1445 "$(prefix)/share/guile/site/@GUILE_EFFECTIVE_VERSION@\n"))
1446 (("godir = .*$")
1447 (string-append
1448 "godir = "
1449 "$(prefix)/lib/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n")))
1450 #t))))
1451 (build-system gnu-build-system)
1452 (arguments
1453 '(#:configure-flags
1454 (list (string-append "--with-libfreeimage-prefix="
1455 (assoc-ref %build-inputs "freeimage"))
1456 (string-append "--with-libgslcblas-prefix="
1457 (assoc-ref %build-inputs "gsl")))))
1458 (native-inputs
1459 `(("pkg-config" ,pkg-config)))
1460 (propagated-inputs
1461 `(("guile-sdl" ,guile-sdl)
1462 ("guile-opengl" ,guile-opengl)))
1463 (inputs
1464 `(("guile" ,guile-2.2)
1465 ("gsl" ,gsl)
1466 ("freeimage" ,freeimage)
1467 ("mesa" ,mesa)))
1468 (synopsis "2D/3D game engine for GNU Guile")
1469 (description "Sly is a 2D/3D game engine written in Guile Scheme. Sly
1470features a functional reactive programming interface and live coding
1471capabilities.")
1472 (home-page "https://dthompson.us/projects/sly.html")
1473 (license license:gpl3+)))
1474
1475(define-public g-wrap
1476 (package
1477 (name "g-wrap")
1478 (version "1.9.15")
1479 (source (origin
1480 (method url-fetch)
1481 (uri (string-append "mirror://savannah/g-wrap/g-wrap-"
1482 version ".tar.gz"))
1483 (sha256
1484 (base32
1485 "0ak0bha37dfpj9kmyw1r8fj8nva639aw5xr66wr5gd3l1rqf5xhg"))))
1486 (build-system gnu-build-system)
1487 (native-inputs
1488 `(("pkg-config" ,pkg-config)))
1489 (propagated-inputs
1490 `(("guile" ,guile-2.2)
1491 ("guile-lib" ,guile-lib)))
1492 (inputs
1493 `(("libffi" ,libffi)))
1494 (arguments
1495 `(#:configure-flags '("--disable-Werror")
1496 #:phases
1497 (modify-phases %standard-phases
1498 (add-before 'configure 'pre-configure
1499 (lambda* (#:key outputs #:allow-other-keys)
1500 (let ((out (assoc-ref outputs "out")))
1501 (substitute* (find-files "." "^Makefile.in$")
1502 (("guilemoduledir =.*guile/site" all)
1503 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))
1504 #t))))))
1505 (synopsis "Generate C bindings for Guile")
1506 (description "G-Wrap is a tool and Guile library for generating function
1507wrappers for inter-language calls. It currently only supports generating Guile
1508wrappers for C functions. Given a definition of the types and prototypes for
1509a given C interface, G-Wrap will automatically generate the C code that
1510provides access to that interface and its types from the Scheme level.")
1511 (home-page "https://www.nongnu.org/g-wrap/index.html")
1512 (license license:lgpl2.1+)))
1513
1514(define-public guile-miniadapton
1515 (let ((commit "1b5749422304567c96ac5367f2221dda9eff5880")
1516 (revision "1"))
1517 (package
1518 (name "guile-miniadapton")
1519 (version (string-append "0-" revision "." (string-take commit 9)))
1520 (source (origin
1521 (method git-fetch)
1522 (uri (git-reference
1523 (url "https://github.com/fisherdj/miniAdapton.git")
1524 (commit commit)))
1525 (file-name (string-append name "-" version "-checkout"))
1526 (sha256
1527 (base32
1528 "09q51zkw2fypad5xixskfzw2cjhjgs5cswdp3i7cpp651rb3zndh"))))
1529 (build-system guile-build-system)
1530 (native-inputs
1531 `(("guile" ,guile-2.2)))
1532 (home-page "https://github.com/fisherdj/miniAdapton")
1533 (synopsis "Minimal implementation of incremental computation in Guile
1534Scheme")
1535 (description "This package provides a complete Scheme implementation of
1536miniAdapton, which implements the core functionality of the Adapton system for
1537incremental computation (also known as self-adjusting computation). Like
1538Adapton, miniAdapton allows programmers to safely combine mutation and
1539memoization. miniAdapton is built on top of an even simpler system,
1540microAdapton. Both miniAdapton and microAdapton are designed to be easy to
1541understand, extend, and port to host languages other than Scheme.")
1542 (license license:expat))))
1543
1544(define-public guile-reader
1545 (package
1546 (name "guile-reader")
1547 (version "0.6.2")
1548 (source (origin
1549 (method url-fetch)
1550 (uri (string-append "mirror://savannah/guile-reader/guile-reader-"
1551 version ".tar.gz"))
1552 (sha256
1553 (base32
1554 "0592s2s8ampqmqwilc4fvcild6rb9gy79di6vxv5kcdmv23abkgx"))))
1555 (build-system gnu-build-system)
1556 (native-inputs `(("pkgconfig" ,pkg-config)
1557 ("gperf" ,gperf-3.0)))
1558 (inputs `(("guile" ,guile-2.2)))
1559 (synopsis "Framework for building readers for GNU Guile")
1560 (description
1561 "Guile-Reader is a simple framework for building readers for GNU Guile.
1562
1563The idea is to make it easy to build procedures that extend Guile’s read
1564procedure. Readers supporting various syntax variants can easily be written,
1565possibly by re-using existing “token readers” of a standard Scheme
1566readers. For example, it is used to implement Skribilo’s R5RS-derived
1567document syntax.
1568
1569Guile-Reader’s approach is similar to Common Lisp’s “read table”, but
1570hopefully more powerful and flexible (for instance, one may instantiate as
1571many readers as needed).")
1572 (home-page "https://www.nongnu.org/guile-reader/")
1573 (license license:gpl3+)))
1574
1575(define-public guile2.2-reader
1576 (deprecated-package "guile2.2-reader" guile-reader))
1577
1578(define-public guile-ncurses
1579 (package
1580 (name "guile-ncurses")
1581 (version "2.2")
1582 (source (origin
1583 (method url-fetch)
1584 (uri (string-append "mirror://gnu/guile-ncurses/guile-ncurses-"
1585 version ".tar.gz"))
1586 (sha256
1587 (base32
1588 "1wvggbr4xv8idh1hzd8caj4xfp4pln78a7w1wqzd4zgzwmnzxr2f"))))
1589 (build-system gnu-build-system)
1590 (inputs `(("ncurses" ,ncurses)
1591 ("guile" ,guile-2.2)))
1592 (native-inputs `(("pkg-config" ,pkg-config)))
1593 (arguments
1594 '(#:configure-flags (list "--with-ncursesw" ; Unicode support
1595 "--with-gnu-filesystem-hierarchy")
1596 #:phases
1597 (modify-phases %standard-phases
1598 (add-before 'build 'fix-libguile-ncurses-file-name
1599 (lambda* (#:key outputs #:allow-other-keys)
1600 (invoke "make" "install"
1601 "-C" "src/ncurses"
1602 "-j" (number->string
1603 (parallel-job-count)))
1604 (let* ((out (assoc-ref outputs "out"))
1605 (dir "src/ncurses")
1606 (files (find-files dir ".scm")))
1607 (substitute* files
1608 (("\"libguile-ncurses\"")
1609 (format #f "\"~a/lib/guile/2.2/libguile-ncurses\""
1610 out)))
1611 #t))))))
1612 (home-page "https://www.gnu.org/software/guile-ncurses/")
1613 (synopsis "Guile bindings to ncurses")
1614 (description
1615 "guile-ncurses provides Guile language bindings for the ncurses
1616library.")
1617 (license license:lgpl3+)))
1618
1619(define-public guile-ncurses/gpm
1620 (package
1621 (inherit guile-ncurses)
1622 (name "guile-ncurses-with-gpm")
1623 (inputs `(("ncurses" ,ncurses/gpm)
1624 ("guile" ,guile-2.2)))))
1625
1626(define-public guile-lib
1627 (package
1628 (name "guile-lib")
1629 (version "0.2.6.1")
1630 (source (origin
1631 (method url-fetch)
1632 (uri (string-append "mirror://savannah/guile-lib/guile-lib-"
1633 version ".tar.gz"))
1634 (sha256
1635 (base32
1636 "0aizxdif5dpch9cvs8zz5g8ds5s4xhfnwza2il5ji7fv2h7ks7bd"))))
1637 (build-system gnu-build-system)
1638 (arguments
1639 '(#:make-flags
1640 '("GUILE_AUTO_COMPILE=0") ; to prevent guild errors
1641 #:phases
1642 (modify-phases %standard-phases
1643 (add-before 'configure 'patch-module-dir
1644 (lambda _
1645 (substitute* "src/Makefile.in"
1646 (("^moddir = ([[:graph:]]+)")
1647 "moddir = $(datadir)/guile/site/@GUILE_EFFECTIVE_VERSION@\n")
1648 (("^godir = ([[:graph:]]+)")
1649 "godir = \
1650$(libdir)/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n"))
1651 #t)))))
1652 (native-inputs `(("pkg-config" ,pkg-config)))
1653 (inputs `(("guile" ,guile-2.2)))
1654 (home-page "https://www.nongnu.org/guile-lib/")
1655 (synopsis "Collection of useful Guile Scheme modules")
1656 (description
1657 "Guile-Lib is intended as an accumulation place for pure-scheme Guile
1658modules, allowing for people to cooperate integrating their generic Guile
1659modules into a coherent library. Think \"a down-scaled, limited-scope CPAN
1660for Guile\".")
1661
1662 ;; The whole is under GPLv3+, but some modules are under laxer
1663 ;; distribution terms such as LGPL and public domain. See `COPYING' for
1664 ;; details.
1665 (license license:gpl3+)))
1666
1667(define-public guile2.0-lib
1668 (package
1669 (inherit guile-lib)
1670 (name "guile2.0-lib")
1671 (inputs `(("guile" ,guile-2.0)))))
1672
1673(define-public guile2.2-lib
1674 (deprecated-package "guile2.2-lib" guile-lib))
1675
1676(define-public guile-minikanren
1677 (package
1678 (name "guile-minikanren")
1679 (version "20150424.e844d85")
1680 (source (origin
1681 (method git-fetch)
1682 (uri (git-reference
1683 (url "https://github.com/ijp/minikanren.git")
1684 (commit "e844d85512f8c055d3f96143ee506007389a25e3")))
1685 (file-name (string-append name "-" version "-checkout"))
1686 (sha256
1687 (base32
1688 "0r50jlpzi940jlmxyy3ddqqwmj5r12gb4bcv0ssini9v8km13xz6"))))
1689 (build-system guile-build-system)
1690 (native-inputs
1691 `(("guile" ,guile-2.2)))
1692 (home-page "https://github.com/ijp/minikanren")
1693 (synopsis "MiniKanren declarative logic system, packaged for Guile")
1694 (description
1695 "MiniKanren is a relational programming extension to the Scheme
1696programming Language, written as a smaller version of Kanren suitable for
1697pedagogical purposes. It is featured in the book, The Reasoned Schemer,
1698written by Dan Friedman, William Byrd, and Oleg Kiselyov.
1699
1700This is Ian Price's r6rs packaged version of miniKanren, which deviates
1701slightly from miniKanren mainline.
1702
1703See http://minikanren.org/ for more on miniKanren generally.")
1704 (license license:expat)))
1705
1706(define-public guile2.0-minikanren
1707 (package
1708 (inherit guile-minikanren)
1709 (name "guile2.0-minikanren")
1710 (native-inputs `(("guile" ,guile-2.0)))))
1711
1712(define-public guile2.2-minikanren
1713 (deprecated-package "guile2.2-minikanren" guile-minikanren))
1714
1715(define-public guile-irregex
1716 (package
1717 (name "guile-irregex")
1718 (version "0.9.6")
1719 (source (origin
1720 (method url-fetch)
1721 (uri (string-append
1722 "http://synthcode.com/scheme/irregex/irregex-"
1723 version ".tar.gz"))
1724 (sha256
1725 (base32
1726 "1ia3m7dp3lcxa048q0gqbiwwsyvn99baw6xkhb4bhhzn4k7bwyqq"))))
1727 (build-system guile-build-system)
1728 (arguments
1729 '(#:phases (modify-phases %standard-phases
1730 (add-after 'unpack 'move-files-around
1731 (lambda _
1732 ;; Move the relevant source files to src/ and create the
1733 ;; rx/ directory to match the expected module hierarchy.
1734 (mkdir-p "src/rx/source")
1735 (rename-file "irregex-guile.scm"
1736 "src/rx/irregex.scm")
1737 (rename-file "irregex.scm"
1738 "src/rx/source/irregex.scm")
1739 ;; Not really reachable via guile's packaging system,
1740 ;; but nice to have around.
1741 (rename-file "irregex-utils.scm"
1742 "src/rx/source/irregex-utils.scm")
1743 #t)))
1744 #:source-directory "src"))
1745 (native-inputs
1746 `(("guile" ,guile-2.2)))
1747 (home-page "http://synthcode.com/scheme/irregex")
1748 (synopsis "S-expression based regular expressions")
1749 (description
1750 "Irregex is an s-expression based alternative to your classic
1751string-based regular expressions. It implements SRFI 115 and is deeply
1752inspired by the SCSH regular expression system.")
1753 (license license:bsd-3)))
1754
1755(define-public guile2.0-irregex
1756 (package
1757 (inherit guile-irregex)
1758 (name "guile2.0-irregex")
1759 (native-inputs `(("guile" ,guile-2.0)))))
1760
1761(define-public guile2.2-irregex
1762 (deprecated-package "guile2.2-irregex" guile-irregex))
1763
1764(define-public haunt
1765 (package
1766 (name "haunt")
1767 (version "0.2.4")
1768 (source (origin
1769 (method url-fetch)
1770 (uri (string-append "https://files.dthompson.us/haunt/haunt-"
1771 version ".tar.gz"))
1772 (sha256
1773 (base32
1774 "056z4znikk83nr5mr0x2ac3iinqbywa2bvb37mhr566a1q50isfc"))))
1775 (build-system gnu-build-system)
1776 (arguments
1777 `(#:modules ((ice-9 match) (ice-9 ftw)
1778 ,@%gnu-build-system-modules)
1779 #:tests? #f ; test suite is non-deterministic :(
1780 #:phases (modify-phases %standard-phases
1781 (add-after 'install 'wrap-haunt
1782 (lambda* (#:key inputs outputs #:allow-other-keys)
1783 ;; Wrap the 'haunt' command to refer to the right
1784 ;; modules.
1785 (let* ((out (assoc-ref outputs "out"))
1786 (bin (string-append out "/bin"))
1787 (site (string-append
1788 out "/share/guile/site"))
1789 (deps (list (assoc-ref inputs "guile-reader")
1790 (assoc-ref inputs "guile-commonmark"))))
1791 (match (scandir site)
1792 (("." ".." version)
1793 (let ((modules (string-append site "/" version))
1794 (compiled-modules (string-append
1795 out "/lib/guile/" version
1796 "/site-ccache")))
1797 (wrap-program (string-append bin "/haunt")
1798 `("GUILE_LOAD_PATH" ":" prefix
1799 (,modules
1800 ,@(map (lambda (dep)
1801 (string-append dep
1802 "/share/guile/site/"
1803 version))
1804 deps)))
1805 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
1806 (,compiled-modules
1807 ,@(map (lambda (dep)
1808 (string-append dep "/lib/guile/"
1809 version
1810 "/site-ccache"))
1811 deps))))
1812 #t)))))))))
1813 (native-inputs
1814 `(("pkg-config" ,pkg-config)
1815 ("texinfo" ,texinfo)))
1816 (inputs
1817 `(("guile" ,guile-2.2)))
1818 (propagated-inputs
1819 `(("guile-reader" ,guile-reader)
1820 ("guile-commonmark" ,guile-commonmark)))
1821 (synopsis "Functional static site generator")
1822 (description "Haunt is a static site generator written in Guile
1823Scheme. Haunt features a functional build system and an extensible
1824interface for reading articles in any format.")
1825 (home-page "http://haunt.dthompson.us")
1826 (license license:gpl3+)))
1827
1828(define-public guile2.0-haunt
1829 (package
1830 (inherit haunt)
1831 (name "guile2.0-haunt")
1832 (inputs `(("guile" ,guile-2.0)))))
1833
1834(define-public guile2.2-haunt
1835 (deprecated-package "guile2.2-haunt" haunt))
1836
1837(define-public guile-redis
1838 (package
1839 (name "guile-redis")
f57bf15c 1840 (version "1.3.0")
0791437f
RW
1841 (home-page "https://github.com/aconchillo/guile-redis")
1842 (source (origin
1843 (method url-fetch)
1844 (uri (string-append home-page "/archive/" version ".tar.gz"))
1845 (sha256
1846 (base32
f57bf15c 1847 "1li70a2716my9q9zfq0qn2x5d1cir9k2vx0jm9glm464yaf1vj39"))))
0791437f
RW
1848 (build-system gnu-build-system)
1849 (native-inputs
1850 `(("autoconf" ,autoconf)
1851 ("automake" ,automake)
1852 ("pkg-config" ,pkg-config)
1853 ("guile" ,guile-2.2)))
1854 (synopsis "Redis client library for Guile")
1855 (description "Guile-redis provides a Scheme interface to the Redis
1856key-value cache and store.")
1857 (license license:lgpl3+)))
1858
1859(define-public guile2.0-redis
1860 (package
1861 (inherit guile-redis)
1862 (name "guile2.0-redis")
1863 (native-inputs `(("guile" ,guile-2.0)
1864 ,@(alist-delete "guile"
1865 (package-native-inputs guile-redis))))))
1866
1867(define-public guile2.2-redis
1868 (deprecated-package "guile2.2-redis" guile-redis))
1869
1870(define-public guile-commonmark
1871 (package
1872 (name "guile-commonmark")
b552e307 1873 (version "0.1.2")
0791437f
RW
1874 (source (origin
1875 (method url-fetch)
1876 (uri (string-append "https://github.com/OrangeShark/" name
1877 "/releases/download/v" version
1878 "/" name "-" version ".tar.gz"))
1879 (sha256
1880 (base32
b552e307 1881 "17lrsdisa3kckh24q114vfmzdc4wkqa6ccwl4hdlrng5wpn1iman"))))
0791437f
RW
1882 (build-system gnu-build-system)
1883 (inputs
1884 `(("guile" ,guile-2.2)))
1885 (native-inputs
1886 `(("pkg-config" ,pkg-config)))
1887 (synopsis "CommonMark parser for Guile")
1888 (description
1889 "guile-commonmark is a library for parsing CommonMark, a fully specified
1890variant of Markdown. The library is written in Guile Scheme and is designed
1891to transform a CommonMark document to SXML. guile-commonmark tries to closely
1892follow the @uref{http://commonmark.org/, CommonMark spec}, the main difference
1893is no support for parsing block and inline level HTML.")
1894 (home-page "https://github.com/OrangeShark/guile-commonmark")
1895 (license license:lgpl3+)))
1896
1897(define-public guile2.0-commonmark
1898 (package
1899 (inherit guile-commonmark)
1900 (name "guile2.0-commonmark")
1901 (inputs `(("guile" ,guile-2.0)))))
1902
1903(define-public guile2.2-commonmark
1904 (deprecated-package "guile2.2-commonmark" guile-commonmark))
1905
1906(define-public mcron
1907 (package
1908 (name "mcron")
1909 (version "1.1.1")
1910 (source (origin
1911 (method url-fetch)
1912 (uri (string-append "mirror://gnu/mcron/mcron-"
1913 version ".tar.gz"))
1914 (sha256
1915 (base32
1916 "1i9mcp6r6my61zfiydsm3n6my41mwvl7dfala4q29qx0zn1ynlm4"))))
1917 (build-system gnu-build-system)
1918 (arguments
1919 '(#:phases (modify-phases %standard-phases
1920 (add-before 'check 'set-timezone
1921 (lambda* (#:key inputs #:allow-other-keys)
1922 ;; 'tests/job-specifier.scm' expects to be running in
1923 ;; UTC-2 or something.
1924 ;; FIXME: This issue is being investigated upstream, for
1925 ;; now we'll just skip the tests (see below):
1926 ;; <https://lists.gnu.org/archive/html/bug-mcron/2018-04/msg00005.html>.
1927 (let ((tzdata (assoc-ref inputs "tzdata")))
1928 (setenv "TZDIR"
1929 (string-append tzdata
1930 "/share/zoneinfo"))
1931 (setenv "TZ" "UTC-2")
1932 #t)))
1933 (add-before 'check 'adjust-tests
1934 (lambda _
1935 (substitute* "tests/job-specifier.scm"
1936 ;; (getpw) fails with "entry not found" in the build
1937 ;; environment, so pass an argument.
1938 (("\\(getpw\\)")
1939 "(getpwnam (getuid))")
1940 ;; The build environment lacks an entry for root in
1941 ;; /etc/passwd.
1942 (("\\(getpw 0\\)")
1943 "(getpwnam \"nobody\")")
1944
1945 ;; FIXME: Skip the 4 faulty tests (see above).
1946 (("\\(test-equal \"next-year\"" all)
1947 (string-append "(test-skip 4)\n" all)))
1948 #t)))))
1949 (native-inputs `(("pkg-config" ,pkg-config)
1950 ("tzdata" ,tzdata-for-tests)))
1951 (inputs `(("ed" ,ed) ("which" ,which) ("guile" ,guile-2.2)))
1952 (home-page "https://www.gnu.org/software/mcron/")
1953 (synopsis "Run jobs at scheduled times")
1954 (description
1955 "GNU Mcron is a complete replacement for Vixie cron. It is used to run
1956tasks on a schedule, such as every hour or every Monday. Mcron is written in
1957Guile, so its configuration can be written in Scheme; the original cron
1958format is also supported.")
1959 (license license:gpl3+)))
1960
1961(define-public mcron2
1962 ;; This was mthl's mcron development branch, and it became mcron 1.1.
1963 (deprecated-package "mcron2" mcron))
6bb5f88e
RW
1964
1965(define-public guile-picture-language
1966 (let ((commit "1531116036d1b5e0d2482ff2c8d77ad21f1d2bef")
1967 (revision "1"))
1968 (package
1969 (name "guile-picture-language")
1970 (version (git-version "0" revision commit))
1971 (source (origin
1972 (method git-fetch)
1973 (uri (git-reference
1974 (url "https://git.elephly.net/software/guile-picture-language.git")
1975 (commit commit)))
1976 (sha256
1977 (base32
1978 "04salmqf5x84vb3qkkxx47b64jyl290zsf3ik81l9hg6fwvvlmq3"))))
1979 (build-system guile-build-system)
1980 (inputs
1981 `(("guile" ,guile-2.2)))
1982 (home-page "https://git.elephly.net/software/guile-picture-language.git")
1983 (synopsis "Picture language for Guile")
1984 (description
1985 "This package provides a simple SVG-based picture language for Guile.
1986The picture values can directly be displayed in Geiser.")
1987 (license license:lgpl3+))))