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