import: crate: Honor crate version for recursive imports.
[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>
f61f424d 8;;; Copyright © 2016, 2019 Eraim Flashner <efraim@flashner.co.il>
0791437f
RW
9;;; Copyright © 2016, 2017 Alex Kost <alezost@gmail.com>
10;;; Copyright © 2016, 2017 Adonay "adfeno" Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno@openmailbox.org>
11;;; Copyright © 2016 Amirouche <amirouche@hypermove.net>
bdf2dd79 12;;; Copyright © 2016, 2019 Jan Nieuwenhuizen <janneke@gnu.org>
0791437f
RW
13;;; Copyright © 2017 Andy Wingo <wingo@igalia.com>
14;;; Copyright © 2017 David Thompson <davet@gnu.org>
a3246602 15;;; Copyright © 2017, 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
0791437f 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>
c99f32b9 24;;; Copyright © 2019 Amar Singh <nly@disroot.org>
f9ec89f4 25;;; Copyright © 2019 Timothy Sample <samplet@ngyro.com>
0791437f
RW
26;;;
27;;; This file is part of GNU Guix.
28;;;
29;;; GNU Guix is free software; you can redistribute it and/or modify it
30;;; under the terms of the GNU General Public License as published by
31;;; the Free Software Foundation; either version 3 of the License, or (at
32;;; your option) any later version.
33;;;
34;;; GNU Guix is distributed in the hope that it will be useful, but
35;;; WITHOUT ANY WARRANTY; without even the implied warranty of
36;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
37;;; GNU General Public License for more details.
38;;;
39;;; You should have received a copy of the GNU General Public License
40;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
41
42(define-module (gnu packages guile-xyz)
43 #:use-module ((guix licenses) #:prefix license:)
44 #:use-module (gnu packages)
7ff157c1 45 #:use-module (gnu packages algebra)
0791437f
RW
46 #:use-module (gnu packages aspell)
47 #:use-module (gnu packages autotools)
48 #:use-module (gnu packages base)
49 #:use-module (gnu packages bash)
50 #:use-module (gnu packages compression)
406ef442 51 #:use-module (gnu packages databases)
0791437f 52 #:use-module (gnu packages disk)
15218d4e 53 #:use-module (gnu packages emacs)
5531782d 54 #:use-module (gnu packages emacs-xyz)
0791437f
RW
55 #:use-module (gnu packages gawk)
56 #:use-module (gnu packages gettext)
57 #:use-module (gnu packages gl)
bdf2dd79 58 #:use-module (gnu packages glib)
5531782d 59 #:use-module (gnu packages gnome)
e8c2da41 60 #:use-module (gnu packages gnupg)
0791437f 61 #:use-module (gnu packages gperf)
bdf2dd79 62 #:use-module (gnu packages gtk)
0791437f
RW
63 #:use-module (gnu packages guile)
64 #:use-module (gnu packages hurd)
65 #:use-module (gnu packages image)
d1a3a8e1 66 #:use-module (gnu packages imagemagick)
0791437f
RW
67 #:use-module (gnu packages libffi)
68 #:use-module (gnu packages libunistring)
69 #:use-module (gnu packages linux)
70 #:use-module (gnu packages man)
71 #:use-module (gnu packages maths)
72 #:use-module (gnu packages multiprecision)
73 #:use-module (gnu packages ncurses)
74 #:use-module (gnu packages networking)
f0de9544 75 #:use-module (gnu packages noweb)
1a37fd1e 76 #:use-module (gnu packages nss)
e8c2da41 77 #:use-module (gnu packages password-utils)
406ef442 78 #:use-module (gnu packages perl)
0791437f
RW
79 #:use-module (gnu packages pkg-config)
80 #:use-module (gnu packages python)
81 #:use-module (gnu packages readline)
82 #:use-module (gnu packages sdl)
83 #:use-module (gnu packages slang)
84 #:use-module (gnu packages sqlite)
f0de9544 85 #:use-module (gnu packages tex)
0791437f
RW
86 #:use-module (gnu packages texinfo)
87 #:use-module (gnu packages tls)
88 #:use-module (gnu packages version-control)
bdf2dd79 89 #:use-module (gnu packages webkit)
0791437f
RW
90 #:use-module (gnu packages xdisorg)
91 #:use-module (gnu packages xorg)
92 #:use-module (guix packages)
93 #:use-module (guix download)
94 #:use-module (guix git-download)
dec4b3aa 95 #:use-module (guix hg-download)
0791437f
RW
96 #:use-module (guix build-system gnu)
97 #:use-module (guix build-system guile)
98 #:use-module (guix utils)
99 #:use-module (ice-9 match)
100 #:use-module ((srfi srfi-1) #:select (alist-delete)))
101
102(define-public artanis
1a37fd1e
RW
103 (package
104 (name "artanis")
105 (version "0.4.1")
106 (source (origin
107 (method url-fetch)
108 (uri (string-append "mirror://gnu/artanis/artanis-"
109 version ".tar.gz"))
110 (sha256
111 (base32
112 "0nnmdfx5xwcc3kck64var7msz7g3qk817d7bv9l159nkmic0v9w4"))
113 (modules '((guix build utils)))
114 (snippet
115 '(begin
116 ;; Unbundle guile-redis and guile-json
117 (delete-file-recursively "artanis/third-party/json.scm")
118 (delete-file-recursively "artanis/third-party/json")
119 (delete-file-recursively "artanis/third-party/redis.scm")
120 (delete-file-recursively "artanis/third-party/redis")
121 (substitute* '("artanis/artanis.scm"
122 "artanis/lpc.scm"
123 "artanis/oht.scm")
124 (("(#:use-module \\()artanis third-party (json\\))" _
125 use-module json)
126 (string-append use-module json)))
127 (substitute* '("artanis/lpc.scm"
128 "artanis/session.scm")
129 (("(#:use-module \\()artanis third-party (redis\\))" _
130 use-module redis)
131 (string-append use-module redis)))
132 (substitute* "artanis/oht.scm"
133 (("([[:punct:][:space:]]+)(->json-string)([[:punct:][:space:]]+)"
134 _ pre json-string post)
135 (string-append pre
136 "scm" json-string
137 post)))
138 (substitute* "artanis/artanis.scm"
139 (("[[:punct:][:space:]]+->json-string[[:punct:][:space:]]+")
140 ""))
141 #t))))
142 (build-system gnu-build-system)
143 (inputs
144 `(("guile" ,guile-2.2)
145 ("nss" ,nss)))
146 ;; FIXME the bundled csv contains one more exported procedure
147 ;; (sxml->csv-string) than guile-csv. The author is maintainer of both
148 ;; projects.
149 ;; TODO: Add guile-dbi and guile-dbd optional dependencies.
150 (propagated-inputs
151 `(("guile-json" ,guile-json-1)
152 ("guile-readline" ,guile-readline)
153 ("guile-redis" ,guile-redis)))
154 (native-inputs
155 `(("bash" ,bash) ;for the `source' builtin
156 ("pkgconfig" ,pkg-config)
157 ("util-linux" ,util-linux))) ;for the `script' command
158 (arguments
159 '(#:make-flags
160 ;; TODO: The documentation must be built with the `docs' target.
161 (let* ((out (assoc-ref %outputs "out"))
162 (scm (string-append out "/share/guile/site/2.2"))
163 (go (string-append out "/lib/guile/2.2/site-ccache")))
164 ;; Don't use (%site-dir) for site paths.
165 (list (string-append "MOD_PATH=" scm)
166 (string-append "MOD_COMPILED_PATH=" go)))
167 #:test-target "test"
168 #:phases
169 (modify-phases %standard-phases
170 (add-after 'unpack 'patch-site-dir
171 (lambda* (#:key outputs #:allow-other-keys)
172 (substitute* "artanis/commands/help.scm"
173 (("\\(%site-dir\\)")
174 (string-append "\""
175 (assoc-ref outputs "out")
176 "/share/guile/site/2.2\"")))))
177 (add-after 'unpack 'patch-reference-to-libnss
178 (lambda* (#:key inputs #:allow-other-keys)
179 (substitute* "artanis/security/nss.scm"
180 (("ffi-binding \"libnss3\"")
181 (string-append
182 "ffi-binding \""
183 (assoc-ref inputs "nss") "/lib/nss/libnss3.so"
184 "\"")))
185 #t))
186 (add-before 'install 'substitute-root-dir
187 (lambda* (#:key outputs #:allow-other-keys)
188 (let ((out (assoc-ref outputs "out")))
189 (substitute* "Makefile" ;ignore the execution of bash.bashrc
190 ((" /etc/bash.bashrc") " /dev/null"))
191 (substitute* "Makefile" ;set the root of config files to OUT
192 ((" /etc") (string-append " " out "/etc")))
193 (mkdir-p (string-append out "/bin")) ;for the `art' executable
194 #t)))
195 (add-after 'install 'wrap-art
196 (lambda* (#:key inputs outputs #:allow-other-keys)
197 (let* ((out (assoc-ref outputs "out"))
198 (bin (string-append out "/bin"))
199 (scm (string-append out "/share/guile/site/2.2"))
200 (go (string-append out "/lib/guile/2.2/site-ccache")))
201 (wrap-program (string-append bin "/art")
202 `("GUILE_LOAD_PATH" ":" prefix
203 (,scm ,(getenv "GUILE_LOAD_PATH")))
204 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
205 (,go ,(getenv "GUILE_LOAD_COMPILED_PATH"))))
206 #t))))))
207 (synopsis "Web application framework written in Guile")
208 (description "GNU Artanis is a web application framework written in Guile
0791437f
RW
209Scheme. A web application framework (WAF) is a software framework that is
210designed to support the development of dynamic websites, web applications, web
211services and web resources. The framework aims to alleviate the overhead
212associated with common activities performed in web development. Artanis
213provides several tools for web development: database access, templating
214frameworks, session management, URL-remapping for RESTful, page caching, and
215more.")
1a37fd1e
RW
216 (home-page "https://www.gnu.org/software/artanis/")
217 (license (list license:gpl3+ license:lgpl3+)))) ;dual license
0791437f
RW
218
219;; There has not been any release yet.
220(define-public guildhall
221 (let ((commit "2fe2cc539f4b811bbcd69e58738db03eb5a2b778")
222 (revision "1"))
223 (package
224 (name "guildhall")
225 (version (string-append "0-" revision "." (string-take commit 9)))
226 (source (origin
227 (method git-fetch)
228 (uri (git-reference
229 (url "https://github.com/ijp/guildhall.git")
230 (commit commit)))
231 (file-name (string-append name "-" version "-checkout"))
232 (sha256
233 (base32
234 "115bym7bg66h3gs399yb2vkzc2ygriaqsn4zbrg8f054mgy8wzn1"))))
235 (build-system gnu-build-system)
236 (arguments
237 `(#:phases
238 (modify-phases %standard-phases
239 ;; Tests fail without this fix because they try to load the bash
240 ;; executable as a Scheme file. See bug report at
241 ;; https://github.com/ijp/guildhall/issues/22
242 (add-after 'unpack 'fix-bug-22
243 (lambda _
244 (substitute* "Makefile.am"
245 (("TESTS_ENVIRONMENT=.*")
246 "AM_TESTS_ENVIRONMENT=srcdir=$(abs_top_srcdir)/tests/
247TEST_EXTENSIONS = .scm
248SCM_LOG_COMPILER= $(top_builddir)/env $(GUILE)
249AM_SCM_LOG_FLAGS = --no-auto-compile -s")
250 ;; FIXME: one of the database tests fails for unknown
251 ;; reasons. It does not fail when run outside of Guix.
252 (("tests/database.scm") ""))
253 #t)))))
254 (inputs
255 `(("guile" ,guile-2.0)))
256 (native-inputs
257 `(("zip" ,zip) ; for tests
258 ("autoconf" ,autoconf)
259 ("automake" ,automake)
260 ("texinfo" ,texinfo)))
261 (synopsis "Package manager for Guile")
262 (description
263 "Guildhall is a package manager written for Guile Scheme. A guild is
264an association of independent craftspeople. A guildhall is where they meet.
265This Guildhall aims to make a virtual space for Guile wizards and journeyfolk
266to share code.
267
268On a practical level, Guildhall lets you share Scheme modules and programs
269over the internet, and install code that has been shared by others. Guildhall
270can handle dependencies, so when a program requires several libraries, and
271each of those has further dependencies, all of the prerequisites for the
272program can be installed in one go.")
273 (home-page "https://github.com/ijp/guildhall")
274 (license license:gpl3+))))
275
276(define-public guile-aspell
277 (package
278 (name "guile-aspell")
279 (version "0.4")
280 (source (origin
281 (method url-fetch)
282 (uri (string-append
283 "http://lonelycactus.com/tarball/guile_aspell-"
284 version ".tar.gz"))
285 (sha256
286 (base32
287 "0vpk5xj9m9qc702z3khmkwhgpb949qbsyz8kw2qycda6qnxk0077"))))
288 (build-system gnu-build-system)
289 (arguments
290 '(#:phases (modify-phases %standard-phases
291 (add-before 'configure 'set-guilesitedir
292 (lambda _
293 (substitute* "Makefile.in"
294 (("^guilesitedir =.*$")
295 "guilesitedir = \
296$(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
297 #t))
298 (add-before 'build 'set-libaspell-file-name
299 (lambda* (#:key inputs #:allow-other-keys)
300 (let ((aspell (assoc-ref inputs "aspell")))
301 (substitute* "aspell.scm"
302 (("\"libaspell\\.so\"")
303 (string-append "\"" aspell
304 "/lib/libaspell\"")))
305 #t))))))
306 (native-inputs `(("pkg-config" ,pkg-config)))
307 (inputs `(("guile" ,guile-2.2)
308 ("aspell" ,aspell)))
309 (home-page "https://github.com/spk121/guile-aspell")
310 (synopsis "Spell-checking from Guile")
311 (description
312 "guile-aspell is a Guile Scheme library for comparing a string against a
313dictionary and suggesting spelling corrections.")
314 (license license:gpl3+)))
315
316(define-public guile-bash
317 ;; This project is currently retired. It was initially announced here:
318 ;; <https://lists.gnu.org/archive/html/guile-user/2015-02/msg00003.html>.
319 (let ((commit "1eabc563ca5692b3e08d84f1f0e6fd2283284469")
320 (revision "0"))
321 (package
322 (name "guile-bash")
323 (version (string-append "0.1.6-" revision "." (string-take commit 7)))
324 (home-page
325 "https://anonscm.debian.org/cgit/users/kaction-guest/retired/dev.guile-bash.git")
326 (source (origin
327 (method git-fetch)
328 (uri (git-reference
329 (commit commit)
330 (url home-page)))
331 (sha256
332 (base32
333 "097vny990wp2qpjij6a5a5gwc6fxzg5wk56inhy18iki5v6pif1p"))
334 (file-name (string-append name "-" version "-checkout"))))
335 (build-system gnu-build-system)
336 (arguments
337 '(#:configure-flags
338 ;; Add -I to match 'bash.pc' of Bash 4.4.
339 (list (string-append "CPPFLAGS=-I"
340 (assoc-ref %build-inputs "bash:include")
341 "/include/bash/include")
342
343 ;; The '.a' file is useless.
344 "--disable-static"
345
346 ;; Install 'lib/bash' as Bash 4.4 expects.
347 (string-append "--libdir=" (assoc-ref %outputs "out")
348 "/lib/bash"))))
349 (native-inputs `(("pkg-config" ,pkg-config)
350 ("autoconf" ,autoconf-wrapper)
351 ("automake" ,automake)
352 ("libtool" ,libtool)
353 ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'.
354 ("gettext" ,gettext-minimal)
355
356 ;; Bash with loadable module support, for the test
357 ;; suite.
358 ("bash-full" ,bash)))
359 (inputs `(("guile" ,guile-2.0)
360 ("bash:include" ,bash "include")))
361 (synopsis "Extend Bash using Guile")
362 (description
363 "Guile-Bash provides a shared library and set of Guile modules,
364allowing you to extend Bash in Scheme. Scheme interfaces allow you to access
365the following aspects of Bash:
366
367@itemize
368@item aliases;
369@item setting and getting Bash variables;
370@item creating dynamic variables;
371@item creating Bash functions with a Scheme implementation;
372@item reader macro for output capturing;
373@item reader macro for evaluating raw Bash commands.
374@end itemize
375
376To enable it, run:
377
378@example
379enable -f ~/.guix-profile/lib/bash/libguile-bash.so scm
380@end example
381
382and then run @command{scm example.scm}.")
383 (license license:gpl3+))))
384
385(define-public guile-8sync
386 (package
387 (name "guile-8sync")
388 (version "0.4.2")
389 (source (origin
390 (method url-fetch)
391 (uri (string-append "mirror://gnu/8sync/8sync-" version
392 ".tar.gz"))
393 (sha256
394 (base32
395 "031wm13srak3wsnll7j2mbbi29g1pcm4swdb71ds9yn567pn20qw"))))
396 (build-system gnu-build-system)
397 (native-inputs `(("autoconf" ,autoconf)
398 ("automake" ,automake)
399 ("guile" ,guile-2.2)
400 ("pkg-config" ,pkg-config)
401 ("texinfo" ,texinfo)))
402 (arguments
403 `(#:phases (modify-phases %standard-phases
404 (add-before 'configure 'setenv
405 (lambda _
406 ;; quiet warnings
407 (setenv "GUILE_AUTO_COMPILE" "0")
408 #t)))))
409 (home-page "https://gnu.org/s/8sync/")
410 (synopsis "Asynchronous actor model library for Guile")
411 (description
412 "GNU 8sync (pronounced \"eight-sync\") is an asynchronous programming
413library for GNU Guile based on the actor model.
414
415Note that 8sync is only available for Guile 2.2.")
416 (license license:lgpl3+)))
417
418(define-public guile-daemon
419 (package
420 (name "guile-daemon")
421 (version "0.1.2")
422 (source (origin
423 (method url-fetch)
424 (uri (string-append "https://github.com/alezost/" name
425 "/releases/download/v" version
426 "/" name "-" version ".tar.gz"))
427 (sha256
428 (base32
429 "0hh6gq6b6phpxm0b1dkxyzj3f4sxdf7dji63609lzypa5v1ad2gv"))))
430 (build-system gnu-build-system)
431 (native-inputs
432 `(("pkg-config" ,pkg-config)))
433 (inputs
434 `(("guile" ,guile-2.2)))
435 (home-page "https://github.com/alezost/guile-daemon")
436 (synopsis "Evaluate code in a running Guile process")
437 (description
438 "Guile-Daemon is a small Guile program that loads your initial
439configuration file, and then reads and evaluates Guile expressions that
440you send to a FIFO file.")
441 (license license:gpl3+)))
442
443(define-public guile-dsv
444 (package
445 (name "guile-dsv")
446 (version "0.2.1")
447 (source (origin
448 (method git-fetch)
449 (uri (git-reference
450 (url "https://github.com/artyom-poptsov/guile-dsv")
451 (commit "bdc5267d007478abc20ea96d7c459b7dd9560b3d")))
452 (file-name (string-append name "-" version "-checkout"))
453 (sha256
454 (base32
455 "1irw6mz8998nwyhzrw9g94jcz60b9zljgqfmipaz1ybn8579qjx0"))))
456 (build-system gnu-build-system)
457 (native-inputs
458 `(("autoconf" ,autoconf)
459 ("automake" ,automake)
460 ("pkg-config" ,pkg-config)
461 ("texinfo" ,texinfo)))
462 (inputs `(("guile" ,guile-2.2)))
463 (propagated-inputs `(("guile-lib" ,guile-lib)))
464 (arguments
465 '(#:phases (modify-phases %standard-phases
466 (add-before 'configure 'set-guilesitedir
467 (lambda _
468 (substitute* "Makefile.in"
469 (("^guilesitedir =.*$")
470 "guilesitedir = \
471$(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
472 (substitute* "modules/Makefile.in"
473 (("^guilesitedir =.*$")
474 "guilesitedir = \
475$(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
476 (substitute* "modules/dsv/Makefile.in"
477 (("^guilesitedir =.*$")
478 "guilesitedir = \
479$(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
480 #t)))))
481 (home-page "https://github.com/artyom-poptsov/guile-dsv")
482 (synopsis "DSV module for Guile")
483 (description
484 "Guile-DSV is a GNU Guile module for working with the
485delimiter-separated values (DSV) data format. Guile-DSV supports the
486Unix-style DSV format and RFC 4180 format.")
487 (license license:gpl3+)))
488
489(define-public guile-fibers
490 (package
491 (name "guile-fibers")
492 (version "1.0.0")
493 (source (origin
494 (method url-fetch)
495 (uri (string-append "https://wingolog.org/pub/fibers/fibers-"
496 version ".tar.gz"))
497 (sha256
498 (base32
499 "0vjkg72ghgdgphzbjz9ig8al8271rq8974viknb2r1rg4lz92ld0"))))
500 (build-system gnu-build-system)
501 (arguments
502 '(#:phases (modify-phases %standard-phases
503 (add-after 'install 'mode-guile-objects
504 (lambda* (#:key outputs #:allow-other-keys)
505 ;; .go files are installed to "lib/guile/X.Y/cache".
506 ;; This phase moves them to "…/site-ccache".
507 (let* ((out (assoc-ref outputs "out"))
508 (lib (string-append out "/lib/guile"))
509 (old (car (find-files lib "^ccache$"
510 #:directories? #t)))
511 (new (string-append (dirname old)
512 "/site-ccache")))
513 (rename-file old new)
514 #t))))))
515 (native-inputs
516 `(("texinfo" ,texinfo)
517 ("pkg-config" ,pkg-config)))
518 (inputs
519 `(("guile" ,guile-2.2)))
520 (synopsis "Lightweight concurrency facility for Guile")
521 (description
522 "Fibers is a Guile library that implements a a lightweight concurrency
523facility, inspired by systems like Concurrent ML, Go, and Erlang. A fiber is
524like a \"goroutine\" from the Go language: a lightweight thread-like
525abstraction. Systems built with Fibers can scale up to millions of concurrent
526fibers, tens of thousands of concurrent socket connections, and many parallel
527cores. The Fibers library also provides Concurrent ML-like channels for
528communication between fibers.
529
530Note that Fibers makes use of some Guile 2.1/2.2-specific features and
531is not available for Guile 2.0.")
532 (home-page "https://github.com/wingo/fibers")
533 (license license:lgpl3+)))
534
535(define-public guile-syntax-highlight
536 (package
537 (name "guile-syntax-highlight")
538 (version "0.1")
539 (source (origin
540 (method url-fetch)
541 (uri (string-append "https://files.dthompson.us/"
542 "guile-syntax-highlight/"
543 "guile-syntax-highlight-"
544 version ".tar.gz"))
545 (sha256
546 (base32
547 "1p771kq15x83483m23bhah1sz6vkalg3drm7x279f4j1cxligkzi"))))
548 (build-system gnu-build-system)
549 (native-inputs
550 `(("pkg-config" ,pkg-config)))
551 (inputs
552 `(("guile" ,guile-2.2)))
553 (synopsis "General-purpose syntax highlighter for GNU Guile")
554 (description "Guile-syntax-highlight is a general-purpose syntax
555highlighting library for GNU Guile. It can parse code written in various
556programming languages into a simple s-expression that can be converted to
557HTML (via SXML) or any other format for rendering.")
558 (home-page "http://dthompson.us/projects/guile-syntax-highlight.html")
559 (license license:lgpl3+)))
560
561(define-public guile-sjson
562 (package
563 (name "guile-sjson")
564 (version "0.2.1")
565 (source (origin
566 (method url-fetch)
567 (uri (string-append "https://dustycloud.org/misc/sjson-" version
568 ".tar.gz"))
569 (sha256
570 (base32
571 "1mzmapln79vv10qxaggz9qwcdbag3jnrj19xx8bgkmxss8h03sv3"))))
572 (build-system gnu-build-system)
573 (native-inputs
574 `(("autoconf" ,autoconf)
575 ("automake" ,automake)
576 ("pkg-config" ,pkg-config)))
577 (inputs
578 `(("guile" ,guile-2.2)))
579 (home-page "https://gitlab.com/dustyweb/guile-sjson")
580 (synopsis "S-expression based json reader/writer for Guile")
581 (description "guile-sjson is a json reader/writer for Guile.
582It has a nice, simple s-expression based syntax.")
583 (license license:lgpl3+)))
584
61dafdc0
CB
585(define-public guile-squee
586 (let ((commit "a85902a92bf6f58a1d35fd974a01ade163deda8d")
587 (revision "0"))
588 (package
589 (name "guile-squee")
590 (version (string-append "0-" revision "." (string-take commit 7)))
591 (source (origin
592 (method git-fetch)
593 (uri (git-reference
594 (url "https://notabug.org/cwebber/guile-squee.git")
595 (commit commit)))
596 (file-name (git-file-name name version))
597 (sha256
598 (base32
599 "0p1lpsp4kx57j3ai1dkxilm4ziavzzx8wbbc42m3hpziq0a7qz5z"))))
600 (build-system guile-build-system)
601 (arguments
602 '(#:phases
603 (modify-phases %standard-phases
604 (add-after 'unpack 'patch
605 (lambda* (#:key inputs #:allow-other-keys)
606 (substitute* "squee.scm"
607 (("dynamic-link \"libpq\"")
608 (string-append
609 "dynamic-link \""
610 (assoc-ref inputs "postgresql") "/lib/libpq.so"
611 "\"")))
612 #t)))))
613 (inputs
614 `(("postgresql" ,postgresql)))
615 (native-inputs
616 `(("guile" ,guile-2.2)))
617 (home-page "https://notabug.org/cwebber/guile-squee")
618 (synopsis "Connect to PostgreSQL using Guile")
619 (description
620 "@code{squee} is a Guile library for connecting to PostgreSQL databases
621using Guile's foreign function interface.")
6fd72f70 622 (license license:lgpl3+))))
61dafdc0 623
0791437f
RW
624(define-public guile-colorized
625 (package
626 (name "guile-colorized")
627 (version "0.1")
1340ce28
TGR
628 (source
629 (origin
630 (method git-fetch)
631 (uri (git-reference
55f4282e 632 (url "https://gitlab.com/NalaGinrut/guile-colorized.git")
1340ce28
TGR
633 (commit (string-append "v" version))))
634 (file-name (git-file-name name version))
635 (sha256
636 (base32 "10mv8c63159r3qvwwdvsgnsvdg7nc2ghak85zapwqpv4ywrqp9zc"))))
0791437f
RW
637 (build-system guile-build-system)
638 (native-inputs
639 `(("guile" ,guile-2.2)))
55f4282e 640 (home-page "https://gitlab.com/NalaGinrut/guile-colorized")
0791437f
RW
641 (synopsis "Colorized REPL for Guile")
642 (description
643 "Guile-colorized provides you with a colorized REPL for GNU Guile.")
644 (license license:gpl3+)))
645
646(define-public guile-pfds
647 (package
648 (name "guile-pfds")
649 (version "0.3")
650 (home-page "https://github.com/ijp/pfds")
651 (source (origin
652 (method git-fetch)
653 (uri (git-reference
654 (url home-page)
655 (commit (string-append "v" version))))
656 (sha256
657 (base32
658 "19y33wg94pf0n98dkfqd1zbw93fgky4sawxsxl6s3vyqwl0yi5vh"))
659 (file-name (string-append name "-" version "-checkout"))))
660 (build-system guile-build-system)
661 (arguments
662 '(#:source-directory "src"
663 #:phases (modify-phases %standard-phases
664 (add-after 'unpack 'move-files-around
665 (lambda _
666 ;; Move files under a pfds/ directory to reflect the
667 ;; module hierarchy.
668 (mkdir-p "src/pfds")
669 (for-each (lambda (file)
670 (rename-file file
671 (string-append "src/pfds/"
672 file)))
673 '("bbtrees.sls"
674 "deques"
675 "deques.sls"
676 "dlists.sls"
677 "fingertrees.sls"
678 "hamts.sls"
679 "heaps.sls"
680 "private"
681 "psqs.sls"
682 "queues"
683 "queues.sls"
684 "sequences.sls"
685 "sets.sls"))
686
687 ;; In Guile <= 2.2.4, there's no way to tell 'guild
688 ;; compile' to accept the ".sls" extension. So...
689 (for-each (lambda (file)
690 (rename-file file
691 (string-append
692 (string-drop-right file 4)
693 ".scm")))
694 (find-files "." "\\.sls$"))
695 #t)))))
696 (native-inputs
697 `(("guile" ,guile-2.2)))
698 (synopsis "Purely functional data structures for Guile")
699 (description
700 "This package provides purely functional data structures written in R6RS
701Scheme and compiled for Guile. It has been tested with Racket, Guile 2,
702Vicare Scheme and IronScheme. Right now it contains:
703
704@itemize
705@item queues
706@item deques
707@item bbtrees
708@item sets
709@item dlists
710@item priority search queues (PSQs)
711@item finger trees
712@item sequences
713@item heaps
714@item hash array mapped tries (HAMTs).
715@end itemize\n")
716 (license license:bsd-3)))
717
718(define-public guile-aa-tree
719 (package
720 (name "guile-aa-tree")
721 (version "3.1.1")
722 (source (origin
723 (method url-fetch)
724 (uri (string-append "mirror://savannah/guile-aa-tree/guile-aa-tree-"
725 version ".tar.gz"))
726 (sha256
727 (base32
728 "0044c105r3q9vpl17pv3phl1b79kjm1llhkakqgiasixyav01blh"))))
729 (build-system guile-build-system)
730 (native-inputs `(("guile" ,guile-2.2)))
731 ;; https://savannah.nongnu.org/projects/guile-aa-tree
732 (home-page "https://qlfiles.net/guile-aa-tree/")
733 (synopsis "AA tree data structure for Guile")
734 (description
735 "This package provides an implementation of @dfn{AA trees}, a
736self-balancing binary tree data structure, for Guile. It ensure @math{O(log
737n)} worst case performance for core operations. The module provides
738non-mutating insert, delete, and search operations, with support for
739convenient nested tree operations.")
740 (license license:gpl3+)))
741
742(define-public guile-simple-zmq
743 (let ((commit "68bedb6679716214fb9d3472da57544526f7a618")
744 (revision "3"))
745 (package
746 (name "guile-simple-zmq")
747 (version (git-version "0.0.0" revision commit))
748 (source
749 (origin
750 (method git-fetch)
751 (uri (git-reference
752 (url "https://github.com/jerry40/guile-simple-zmq")
753 (commit commit)))
754 (sha256
755 (base32
756 "1ad3xg69qqviy1f6dnlw0ysmfdbmp1jq65rfqb8nfd8dsrq2syli"))
757 (file-name (git-file-name name version))))
758 (build-system guile-build-system)
759 (arguments
760 `(#:source-directory "src"
761 #:phases (modify-phases %standard-phases
762 (add-after 'unpack 'set-libzmq-file-name
763 (lambda* (#:key inputs #:allow-other-keys)
764 (substitute* "src/simple-zmq.scm"
765 (("\\(dynamic-link \"libzmq\"\\)")
766 (format #f "(dynamic-link \"~a/lib/libzmq.so\")"
767 (assoc-ref inputs "zeromq"))))
768 #t)))))
769 (native-inputs
770 `(("guile" ,guile-2.2)))
771 (inputs
772 `(("zeromq" ,zeromq)))
773 (home-page "https://github.com/jerry40/guile-simple-zmq")
774 (synopsis "Guile wrapper over ZeroMQ library")
775 (description
776 "This package provides a Guile programming interface to the ZeroMQ
777messaging library.")
778 (license license:gpl3+))))
779
780(define-public jupyter-guile-kernel
781 (let ((commit "a7db9245a886e104138474df46c3e88b95cff629")
782 (revision "1"))
783 (package
784 (name "jupyter-guile-kernel")
785 (version (git-version "0.0.0" revision commit))
786 (source
787 (origin
788 (method git-fetch)
789 (uri (git-reference
790 (url "https://github.com/jerry40/guile-kernel")
791 (commit commit)))
f1d4d79f 792 (file-name (git-file-name name version))
0791437f
RW
793 (sha256
794 (base32
795 "0aj04853bqm47ivfcmrgpb7w3wkis847kc7qrwsa5zcn9h38qh2f"))))
796 (build-system guile-build-system)
797 (arguments
798 '(#:phases (modify-phases %standard-phases
799 (add-after 'unpack 'set-openssl-file-name
800 (lambda* (#:key inputs #:allow-other-keys)
801 ;; Record the absolute file name of the 'openssl'
802 ;; command.
803 (substitute* "src/hmac.scm"
804 (("openssl")
805 (string-append (assoc-ref inputs "openssl")
806 "/bin/openssl")))
807 #t))
808
809 ;; XXX: The code uses 'include' to include its own source
810 ;; files, and "-L src" isn't enough in this case.
811 (add-before 'build 'chdir
812 (lambda _ (chdir "src") #t))
813 (add-after 'build 'chdir-back
814 (lambda _ (chdir "..") #t))
815
816 (add-after 'install 'install-kernel
817 (lambda* (#:key inputs outputs #:allow-other-keys)
818 (let* ((out (assoc-ref outputs "out"))
819 (json (assoc-ref inputs "guile-json"))
820 (zmq (assoc-ref inputs "guile-simple-zmq"))
821 (deps (list json zmq))
822 (dir (string-append
823 out "/share/jupyter/kernels/guile"))
824 (effective (target-guile-effective-version)))
825 ;; Install kernel.
826 (install-file "src/kernel.json" dir)
827
828 ;; Fix hard-coded file name in the kernel.
829 (substitute* (string-append dir "/kernel.json")
830 (("/home/.*/guile-jupyter-kernel.scm")
831 (string-append out "/share/guile/site/"
832 (target-guile-effective-version)
833 "/guile-jupyter-kernel.scm"))
834 (("\"guile\"")
835 (string-append "\"" (assoc-ref inputs "guile")
836 "/bin/guile\""))
837 (("-s")
838 ;; Add '-L' and '-C' flags so that the kernel
839 ;; finds its dependencies.
840 (let ((-L (map (lambda (item)
841 (string-append "\"" item
842 "/share/guile/site/"
843 effective "\""))
844 deps))
845 (-C (map (lambda (item)
846 (string-append "\"" item
847 "/lib/guile/"
848 effective
849 "/site-ccache\""))
850 deps)))
851 (string-append "--no-auto-compile\""
852 (string-join -L ", \"-L\", "
853 'prefix)
854 (string-join -C ", \"-C\", "
855 'prefix)
856 ", \"-s"))))
857 #t))))))
858 (inputs
859 `(("openssl" ,openssl)
860 ("guile" ,guile-2.2)
91f55717 861 ("guile-json" ,guile-json-1)
0791437f
RW
862 ("guile-simple-zmq" ,guile-simple-zmq)))
863 (synopsis "Guile kernel for the Jupyter Notebook")
864 (description
865 "This package provides a Guile 2.x kernel for the Jupyter Notebook. It
866allows users to interact with the Guile REPL through Jupyter.")
867 (home-page "https://github.com/jerry40/guile-kernel")
868 (license license:gpl3+))))
869
870(define-public guile-sparql
871 (package
872 (name "guile-sparql")
873 (version "0.0.7")
874 (source (origin
875 (method url-fetch)
876 (uri (string-append
877 "https://github.com/roelj/guile-sparql/releases/download/"
878 version "/guile-sparql-" version ".tar.gz"))
879 (sha256
880 (base32 "1drnvhsgl0gc5crmb16yyw1j98nkhwwcgssv9vgm36ng43nnzffd"))))
881 (build-system gnu-build-system)
882 (arguments `(#:tests? #f)) ; There are no tests.
883 (native-inputs
884 `(("pkg-config" ,pkg-config)))
885 (inputs
886 `(("guile" ,guile-2.2)))
887 (home-page "https://github.com/roelj/guile-sparql")
888 (synopsis "SPARQL module for Guile")
889 (description "This package provides the functionality to query a SPARQL
890endpoint. Additionally, it provides an interface to write SPARQL queries
891using S-expressions.")
892 (license license:gpl3+)))
893
894(define-public guile-debbugs
895 (package
896 (name "guile-debbugs")
897 (version "0.0.2")
898 (source (origin
899 (method url-fetch)
900 (uri (string-append "mirror://gnu/guile-debbugs/guile-debbugs-"
901 version ".tar.gz"))
902 (sha256
903 (base32
904 "16l8910p57im6s3j93xhdaqvgfy6ms5n97177mrch3y961z5hy0i"))
905 (modules '((guix build utils)))
906 (snippet
907 '(substitute* "Makefile.in"
908 (("^godir = (.*)/ccache" _ prefix)
909 (string-append "godir = " prefix "/site-ccache"))))))
910 (build-system gnu-build-system)
911 (native-inputs
912 `(("guile" ,guile-2.2)
913 ("pkg-config" ,pkg-config)))
914 (home-page "https://savannah.gnu.org/projects/guile-debbugs/")
915 (synopsis "Guile interface to the Debbugs bug tracking service")
916 (description
917 "This package provides a Guile library to communicate with a Debbugs bug
918tracker's SOAP service, such as @url{https://bugs.gnu.org}.")
919 (license license:gpl3+)))
920
921(define-public guile-email
50771f5b
AI
922 (package
923 (name "guile-email")
223cb7c6 924 (version "0.2.2")
50771f5b
AI
925 (source
926 (origin
927 (method url-fetch)
928 (uri (string-append
db18d87a
AI
929 "https://guile-email.systemreboot.net/releases/guile-email-"
930 version ".tar.lz"))
50771f5b
AI
931 (sha256
932 (base32
223cb7c6 933 "1rc8r0fgvflnyq5ckl7ii8sghpsgpkzxa8vskjr1ak2kyar6m35k"))))
50771f5b
AI
934 (build-system gnu-build-system)
935 (native-inputs
936 `(("pkg-config" ,pkg-config)
db18d87a 937 ("lzip" ,lzip)))
50771f5b
AI
938 (inputs
939 `(("guile" ,guile-2.2)))
db18d87a 940 (arguments
2c33a849 941 '(#:make-flags '("GUILE_AUTO_COMPILE=0"))) ; to prevent guild warnings
db18d87a 942 (home-page "https://guile-email.systemreboot.net")
50771f5b 943 (synopsis "Guile email parser")
db18d87a
AI
944 (description "guile-email is a collection of email utilities implemented
945in pure guile. It supports parsing MIME (Multipurpose Internet Mail
946Extensions) compliant email messages and reading emails from the mbox
947format.")
50771f5b 948 (license license:agpl3+)))
0791437f
RW
949
950(define-public guile-debbugs-next
014c3012
RW
951 (let ((commit "fb0ae064037a38a0d526e08b4ad24c52e205edb9")
952 (revision "2"))
0791437f
RW
953 (package (inherit guile-debbugs)
954 (name "guile-debbugs")
955 (version (git-version "0.0.3" revision commit))
956 (source (origin
957 (method git-fetch)
958 (uri (git-reference
959 (url "https://git.savannah.gnu.org/git/guile-debbugs.git")
960 (commit commit)))
961 (file-name (git-file-name name version))
962 (sha256
963 (base32
014c3012 964 "195sacx2xc1mzzfljj62nfpi8mxn0rc6dabxckizjksnhb5irfwy"))))
0791437f
RW
965 (build-system gnu-build-system)
966 (native-inputs
967 `(("pkg-config" ,pkg-config)
968 ("autoconf" ,autoconf)
969 ("automake" ,automake)
970 ("texinfo" ,texinfo)))
971 (inputs
972 `(("guile" ,guile-2.2)
973 ("guile-email" ,guile-email))))))
974
0791437f 975(define-public guile-newt
442a11f6
MO
976 (package
977 (name "guile-newt")
978 (version "0.0.1")
979 (source (origin
980 (method git-fetch)
981 (uri (git-reference
982 (url "https://gitlab.com/mothacehe/guile-newt")
983 (commit version)))
984 (file-name (git-file-name name version))
985 (sha256
986 (base32
987 "1w7qy4dw1f4bx622l6hw8mv49sf1ha8kch8j4nganyk8fj0wn695"))))
988 (build-system gnu-build-system)
989 (arguments
990 '(#:make-flags
991 '("GUILE_AUTO_COMPILE=0"))) ;to prevent guild warnings
992 (inputs
993 `(("guile" ,guile-2.2)
994 ("newt" ,newt)))
995 (native-inputs
996 `(("autoconf" ,autoconf)
997 ("automake" ,automake)
998 ("pkg-config" ,pkg-config)))
999 (synopsis "Guile bindings to Newt")
1000 (description
1001 "This package provides bindings for Newt, a programming library for
0791437f
RW
1002color text mode, widget based user interfaces. The bindings are written in pure
1003Scheme by using Guile’s foreign function interface.")
442a11f6
MO
1004 (home-page "https://gitlab.com/mothacehe/guile-newt")
1005 (license license:gpl3+)))
0791437f
RW
1006
1007(define-public guile-mastodon
1008 (package
1009 (name "guile-mastodon")
1010 (version "0.0.1")
1011 (source (origin
1012 (method git-fetch)
1013 (uri (git-reference
1014 (url "https://framagit.org/prouby/guile-mastodon.git")
1015 (commit (string-append "v" version))))
1016 (file-name (git-file-name name version))
1017 (sha256
1018 (base32
1019 "1vblf3d1bbwna3l09p2ap5y8ycvl549bz6whgk78imyfmn28ygry"))))
1020 (build-system gnu-build-system)
1021 (native-inputs
1022 `(("autoconf" ,autoconf)
1023 ("automake" ,automake)
1024 ("pkg-config" ,pkg-config)))
1025 (inputs
1026 `(("guile" ,guile-2.2)
1027 ("gnutls" ,gnutls)
91f55717 1028 ("guile-json" ,guile-json-1)))
0791437f
RW
1029 (home-page "https://framagit.org/prouby/guile-mastodon")
1030 (synopsis "Guile Mastodon REST API module")
1031 (description "This package provides Guile modules to access the
1032@uref{https://docs.joinmastodon.org/api/, REST API of Mastodon}, a federated
1033microblogging service.")
1034 (license license:gpl3+)))
1035
0791437f 1036(define-public guile-parted
dbcd503c
MO
1037 (package
1038 (name "guile-parted")
a3246602 1039 (version "0.0.2")
dbcd503c
MO
1040 (source (origin
1041 (method git-fetch)
1042 (uri (git-reference
1043 (url "https://gitlab.com/mothacehe/guile-parted")
1044 (commit version)))
1045 (file-name (git-file-name name version))
1046 (sha256
1047 (base32
a3246602 1048 "01qmv6xnbbq3wih0dl9bscvca2d7zx7bjiqf35y6dkaqsp8nvdxf"))))
dbcd503c
MO
1049 (build-system gnu-build-system)
1050 (arguments
1051 '(#:make-flags
1052 '("GUILE_AUTO_COMPILE=0"))) ;to prevent guild warnings
1053 (inputs
1054 `(("guile" ,guile-2.2)
1055 ("parted" ,parted)))
1056 (propagated-inputs
1057 `(("guile-bytestructures" ,guile-bytestructures)))
1058 (native-inputs
1059 `(("autoconf" ,autoconf)
1060 ("automake" ,automake)
1061 ("pkg-config" ,pkg-config)))
1062 (synopsis "Guile bindings to GNU Parted")
1063 (description
1064 "This package provides bindings for GNU Parted library, a C library
1065allowing disk partition tables creation and manipulation. The bindings are
0791437f 1066written in pure Scheme by using Guile's foreign function interface.")
dbcd503c
MO
1067 (home-page "https://gitlab.com/mothacehe/guile-parted")
1068 (license license:gpl3+)))
0791437f
RW
1069
1070(define-public guile-xosd
1071 (package
1072 (name "guile-xosd")
1073 (version "0.2.1")
1074 (source (origin
1075 (method url-fetch)
1076 (uri (string-append "https://github.com/alezost/" name
1077 "/releases/download/v" version
1078 "/" name "-" version ".tar.gz"))
1079 (sha256
1080 (base32
1081 "1ri5065c16kmgrf2pysn2ymxjqi5302lhpb07wkl1jr75ym8fn8p"))))
1082 (build-system gnu-build-system)
1083 (native-inputs
1084 `(("pkg-config" ,pkg-config)))
1085 (inputs
1086 `(("guile" ,guile-2.2)
1087 ("libx11" ,libx11)
1088 ("libxext" ,libxext)
1089 ("libxinerama" ,libxinerama)
1090 ("xosd" ,xosd)))
1091 (home-page "https://github.com/alezost/guile-xosd")
1092 (synopsis "XOSD bindings for Guile")
1093 (description
1094 "Guile-XOSD provides Guile bindings for @code{libxosd},
1095@uref{http://sourceforge.net/projects/libxosd/, the X On Screen Display
1096library}.")
1097 (license license:gpl3+)))
1098
1099(define-public guile-dbi
1100 (package
1101 (name "guile-dbi")
1102 (version "2.1.6")
1103 (source (origin
1104 (method url-fetch)
1105 (uri (string-append
1106 "http://download.gna.org/guile-dbi/guile-dbi-"
1107 version ".tar.gz"))
1108 (sha256
1109 (base32
1110 "116njrprhgrsv1qm904sp3b02rq01fx639r433d657gyhw3x159n"))))
1111 (build-system gnu-build-system)
1112 (arguments
1113 '(#:configure-flags
1114 (list (string-append
1115 "--with-guile-site-dir=" %output "/share/guile/site/2.2"))
1116 #:make-flags
406ef442
CB
1117 (list (string-append
1118 "LDFLAGS=-Wl,-rpath=" %output "/lib:"
1119 (assoc-ref %build-inputs "guile-dbd-sqlite3") "/lib" ":"
1120 (assoc-ref %build-inputs "guile-dbd-postgresql") "/lib"))
0791437f
RW
1121 #:phases
1122 (modify-phases %standard-phases
1123 (add-after 'install 'patch-extension-path
1124 (lambda* (#:key outputs #:allow-other-keys)
1125 (let* ((out (assoc-ref outputs "out"))
1126 (dbi.scm (string-append
1127 out "/share/guile/site/2.2/dbi/dbi.scm"))
1128 (ext (string-append out "/lib/libguile-dbi")))
1129 (substitute* dbi.scm (("libguile-dbi") ext))
1130 #t))))))
1131 (inputs
406ef442
CB
1132 `(("guile-dbd-sqlite3" ,guile-dbd-sqlite3)
1133 ("guile-dbd-postgresql" ,guile-dbd-postgresql))) ; only shared library, no scheme files
0791437f
RW
1134 (propagated-inputs
1135 `(("guile" ,guile-2.2)))
1136 (synopsis "Guile database abstraction layer")
1137 (home-page "http://home.gna.org/guile-dbi/guile-dbi.html")
1138 (description
1139 "guile-dbi is a library for Guile that provides a convenient interface to
1140SQL databases. Database programming with guile-dbi is generic in that the same
1141programming interface is presented regardless of which database system is used.
1142It currently supports MySQL, Postgres and SQLite3.")
1143 (license license:gpl2+)))
1144
1145(define guile-dbi-bootstrap
1146 (package
1147 (inherit guile-dbi)
1148 (name "guile-dbi-bootstrap")
1149 (inputs '())
1150 (arguments
1151 (substitute-keyword-arguments (package-arguments guile-dbi)
1152 ((#:make-flags _) '(list))))))
1153
1154(define-public guile-dbd-sqlite3
1155 (package
1156 (name "guile-dbd-sqlite3")
1157 (version "2.1.6")
1158 (source (origin
1159 (method url-fetch)
1160 (uri (string-append
1161 "http://download.gna.org/guile-dbi/guile-dbd-sqlite3-"
1162 version ".tar.gz"))
1163 (sha256
1164 (base32
1165 "0rg71jchxd2y8x496s8zmfmikr5g8zxi8zv2ar3f7a23pph92iw2"))))
1166 (build-system gnu-build-system)
1167 (native-inputs
1168 `(("pkg-config" ,pkg-config)
1169 ("guile-dbi-bootstrap" ,guile-dbi-bootstrap))) ; only required for headers
1170 (inputs
1171 `(("sqlite" ,sqlite)
1172 ("zlib" ,(@ (gnu packages compression) zlib))))
1173 (synopsis "Guile DBI driver for SQLite")
1174 (home-page "https://github.com/jkalbhenn/guile-dbd-sqlite3")
1175 (description
1176 "guile-dbi is a library for Guile that provides a convenient interface to
1177SQL databases. This package implements the interface for SQLite.")
1178 (license license:gpl2+)))
1179
406ef442
CB
1180(define-public guile-dbd-postgresql
1181 (let ((commit "e97589b6b018b206c901e4cc24db463407a4036b")
1182 (revision 0))
1183 (package
1184 (name "guile-dbd-postgresql")
1185 (version (string-append
1186 "2.1.6-" (number->string revision) "." (string-take commit 7)))
1187 (source
1188 (origin
1189 (method git-fetch)
1190 (uri (git-reference
1191 (url "https://github.com/opencog/guile-dbi.git")
1192 (commit commit)))
1193 (file-name (git-file-name name version))
1194 (sha256
1195 (base32 "0n1gv9a0kdys10a4qmnrwvg5sydwb03880asri4gqdchcj3fimni"))))
1196 (build-system gnu-build-system)
1197 (arguments
1198 '(#:phases
1199 (modify-phases %standard-phases
1200 (add-after 'unpack 'chdir
1201 (lambda _
1202 ;; The upstream Git repository contains all the code, so change
1203 ;; to the relevant directory.
1204 (chdir "guile-dbd-postgresql")
1205 #t))
1206 (add-after 'chdir 'patch-src/Makefile.am
1207 (lambda* (#:key inputs #:allow-other-keys)
1208 (substitute* "src/Makefile.am"
1209 (("/usr/include")
1210 (string-append (assoc-ref inputs "postgresql") "/include")))
1211 #t))
1212 (add-after 'patch-src/Makefile.am 'patch-src
1213 (lambda _
1214 (substitute* "src/guile-dbd-postgresql.c"
1215 (("postgresql/libpq-fe\\.h") "libpq-fe.h"))
1216 #t)))))
1217 (native-inputs
1218 `(("pkg-config" ,pkg-config)
1219 ("automake" ,automake)
1220 ("autoconf" ,autoconf)
1221 ("perl" ,perl)
1222 ("libtool" ,libtool)
1223 ("guile-dbi-bootstrap" ,guile-dbi-bootstrap)))
1224 (inputs
1225 `(("postgresql" ,postgresql)
1226 ("zlib" ,zlib)))
1227 (synopsis "Guile DBI driver for PostgreSQL")
1228 (home-page
1229 "https://github.com/opencog/guile-dbi/tree/master/guile-dbd-postgresql")
1230 (description
1231 "@code{guile-dbi} is a library for Guile that provides a convenient
1232interface to SQL databases. This package implements the interface for
1233PostgreSQL.")
1234 (license license:gpl2+))))
1235
0791437f
RW
1236(define-public guile-config
1237 (package
1238 (name "guile-config")
1239 (version "0.3")
1240 (source
1241 (origin
1242 (method git-fetch)
1243 (uri (git-reference
1244 (url "https://gitlab.com/a-sassmannshausen/guile-config")
1245 (commit "ce12de3f438c6b2b59c43ee21bcd58251835fdf3")))
1246 (file-name "guile-config-0.3-checkout")
1247 (sha256 (base32 "02zbpin0r9m2vxmr7mv68v3xdn247dcck56kbzjn0gj4c2rhih85"))))
1248 (build-system gnu-build-system)
1249 (native-inputs
1250 `(("autoconf" ,autoconf)
1251 ("automake" ,automake)
1252 ("pkg-config" ,pkg-config)
1253 ("texinfo" ,texinfo)))
1254 (inputs `(("guile" ,guile-2.2)))
1255 (synopsis
1256 "Guile application configuration parsing library.")
1257 (description
1258 "Guile Config is a library providing a declarative approach to
1259application configuration specification. The library provides clean
1260configuration declaration forms, and processors that take care of:
1261configuration file creation; configuration file parsing; command-line
1262parameter parsing using getopt-long; basic GNU command-line parameter
1263generation (--help, --usage, --version); automatic output generation for the
1264above command-line parameters.")
1265 (home-page
1266 "https://gitlab.com/a-sassmannshausen/guile-config")
1267 (license license:gpl3+)))
1268
1269(define-public guile-hall
1270 (package
1271 (name "guile-hall")
63bf0afd 1272 (version "0.2")
0791437f 1273 (source
feb11b08
RW
1274 (origin
1275 (method git-fetch)
1276 (uri (git-reference
1277 (url "https://gitlab.com/a-sassmannshausen/guile-hall")
1278 (commit (string-append "v" version))))
1279 (file-name (git-file-name name version))
1280 (sha256 (base32
1281 "1bkbqgj24xh5b65sw2m98iggpi67b72szx1dsiq3cpzlcxplmgaz"))))
0791437f
RW
1282 (build-system gnu-build-system)
1283 (arguments
63bf0afd
AS
1284 `(#:modules
1285 ((ice-9 match)
1286 (ice-9 ftw)
1287 ,@%gnu-build-system-modules)
1288 #:phases
1289 (modify-phases
1290 %standard-phases
1291 (add-after 'install 'hall-wrap-binaries
1292 (lambda* (#:key inputs outputs #:allow-other-keys)
1293 (let* ((compiled-dir
1294 (lambda (out version)
1295 (string-append
1296 out "/lib/guile/" version "/site-ccache")))
1297 (uncompiled-dir
1298 (lambda (out version)
1299 (string-append
1300 out "/share/guile/site"
1301 (if (string-null? version) "" "/") version)))
1302 (dep-path
1303 (lambda (env modules path)
1304 (list env ":" 'prefix
1305 (cons modules
1306 (map (lambda (input)
1307 (string-append
1308 (assoc-ref inputs input)
1309 path))
1310 ,''("guile-config"))))))
1311 (out (assoc-ref outputs "out"))
1312 (bin (string-append out "/bin/"))
1313 (site (uncompiled-dir out "")))
1314 (match (scandir site)
1315 (("." ".." version)
1316 (for-each
1317 (lambda (file)
1318 (wrap-program
1319 (string-append bin file)
1320 (dep-path
1321 "GUILE_LOAD_PATH"
1322 (uncompiled-dir out version)
1323 (uncompiled-dir "" version))
1324 (dep-path
1325 "GUILE_LOAD_COMPILED_PATH"
1326 (compiled-dir out version)
1327 (compiled-dir "" version))))
1328 ,''("hall"))
1329 #t))))))))
0791437f 1330 (native-inputs
63bf0afd
AS
1331 `(("autoconf" ,autoconf)
1332 ("automake" ,automake)
1333 ("pkg-config" ,pkg-config)
1334 ("texinfo" ,texinfo)))
0791437f
RW
1335 (inputs `(("guile" ,guile-2.2)))
1336 (propagated-inputs
3c3e6620 1337 `(("guile-config" ,guile-config)))
0791437f
RW
1338 (synopsis "Guile project tooling")
1339 (description
3c3e6620
RW
1340 "Hall is a command-line application and a set of Guile libraries that
1341allow you to quickly create and publish Guile projects. It allows you to
1342transparently support the GNU build system, manage a project hierarchy &
1343provides tight coupling to Guix.")
1344 (home-page "https://gitlab.com/a-sassmannshausen/guile-hall")
06085fac 1345 (license license:gpl3+)))
0791437f
RW
1346
1347(define-public guile-ics
1348 (package
1349 (name "guile-ics")
1350 (version "0.2.0")
1351 (source (origin
1352 (method git-fetch)
1353 (uri (git-reference
1354 (url "https://github.com/artyom-poptsov/guile-ics")
1355 (commit (string-append "v" version))))
1356 (file-name (string-append name "-" version "-checkout"))
1357 (sha256
1358 (base32
1359 "0qjjvadr7gibdq9jvwkmlkb4afsw9n2shfj9phpiadinxk3p4m2g"))))
1360 (build-system gnu-build-system)
1361 (native-inputs
1362 `(("autoconf" ,autoconf-wrapper)
1363 ("automake" ,automake)
1364 ("texinfo" ,texinfo)
1365 ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'.
1366 ("gettext" ,gettext-minimal)
1367 ("pkg-config" ,pkg-config)))
1368 (inputs `(("guile" ,guile-2.2) ("which" ,which)))
1369 (propagated-inputs `(("guile-lib" ,guile-lib)))
1370 (home-page "https://github.com/artyom-poptsov/guile-ics")
1371 (synopsis "Guile parser library for the iCalendar format")
1372 (description
1373 "Guile-ICS is an iCalendar (RFC5545) format parser library written in
1374pure Scheme. The library can be used to read and write iCalendar data.
1375
1376The library is shipped with documentation in Info format and usage examples.")
1377 (license license:gpl3+)))
1378
1379(define-public guile-wisp
1380 (package
1381 (name "guile-wisp")
65610f73 1382 (version "1.0.2")
0791437f
RW
1383 (source (origin
1384 (method url-fetch)
1385 (uri (string-append "https://bitbucket.org/ArneBab/"
1386 "wisp/downloads/wisp-"
1387 version ".tar.gz"))
1388 (sha256
1389 (base32
65610f73 1390 "03pz7pj9jyallynhflp5s7qax8dj1fs8la434wrfgz7g1kgjnvf6"))))
0791437f
RW
1391 (build-system gnu-build-system)
1392 (arguments
1393 `(#:modules ((guix build gnu-build-system)
15218d4e 1394 ((guix build emacs-build-system) #:prefix emacs:)
0791437f 1395 (guix build utils)
15218d4e 1396 (guix build emacs-utils)
0791437f
RW
1397 (ice-9 rdelim)
1398 (ice-9 popen))
15218d4e
RW
1399 #:imported-modules (,@%gnu-build-system-modules
1400 (guix build emacs-build-system)
1401 (guix build emacs-utils))
0791437f
RW
1402 #:phases
1403 (modify-phases %standard-phases
1404 (add-before 'configure 'patch-/usr/bin/env
1405 (lambda _
1406 (substitute* "Makefile.in"
65610f73 1407 (("/usr/bin/env bash") (which "bash")))
0791437f
RW
1408 #t))
1409 ;; auto compilation breaks, but if we set HOME to /tmp,
1410 ;; that works ok
1411 (add-before 'check 'auto-compile-hacky-workaround
1412 (lambda _ (setenv "HOME" "/tmp") #t))
1413 (add-after 'install 'install-go-files
1414 (lambda* (#:key outputs inputs #:allow-other-keys)
1415 (let* ((out (assoc-ref outputs "out"))
1416 (effective (read-line
1417 (open-pipe* OPEN_READ
1418 "guile" "-c"
1419 "(display (effective-version))")))
1420 (module-dir (string-append out "/share/guile/site/"
1421 effective))
1422 (object-dir (string-append out "/lib/guile/" effective
1423 "/site-ccache"))
1424 (prefix (string-length module-dir)))
1425 ;; compile to the destination
1426 (for-each (lambda (file)
1427 (let* ((base (string-drop (string-drop-right file 4)
1428 prefix))
1429 (go (string-append object-dir base ".go")))
1430 (invoke "guild" "compile" "-L" module-dir
1431 file "-o" go)))
1432 (find-files module-dir "\\.scm$"))
15218d4e
RW
1433 #t)))
1434 (add-after 'install 'install-emacs-files
1435 (assoc-ref emacs:%standard-phases 'install))
1436 (add-after 'install-emacs-files 'compile-emacs-files
1437 (assoc-ref emacs:%standard-phases 'build))
1438 (add-after 'compile-emacs-files 'make-autoloads
1439 (assoc-ref emacs:%standard-phases 'make-autoloads)))))
17f90b67 1440 (home-page "https://www.draketo.de/english/wisp")
0791437f
RW
1441 (inputs
1442 `(("guile" ,guile-2.2)))
1443 (native-inputs
15218d4e
RW
1444 `(("emacs" ,emacs-minimal)
1445 ("python" ,python)
0791437f
RW
1446 ("pkg-config" ,pkg-config)))
1447 (synopsis "Whitespace to lisp syntax for Guile")
1448 (description "Wisp is a syntax for Guile which provides a Python-like
1449whitespace-significant language. It may be easier on the eyes for some
1450users and in some situations.")
1451 (license license:gpl3+)))
1452
1453(define-public guile-sly
1454 (package
1455 (name "guile-sly")
1456 (version "0.1")
1457 (source (origin
1458 (method url-fetch)
1459 (uri (string-append "https://files.dthompson.us/sly/sly-"
1460 version ".tar.gz"))
1461 (sha256
1462 (base32
1463 "1svzlbz2vripmyq2kjh0rig16bsrnbkwbsm558pjln9l65mcl4qq"))
1464 (modules '((guix build utils)))
1465 (snippet
1466 '(begin
1467 (substitute* "configure"
1468 (("_guile_required_version=\"2.0.11\"")
1469 "_guile_required_version=\"2\"")
1470 (("ac_subst_vars='")
1471 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
1472 (substitute* (find-files "." "Makefile.in")
1473 (("moddir = .*$")
1474 (string-append
1475 "moddir = "
1476 "$(prefix)/share/guile/site/@GUILE_EFFECTIVE_VERSION@\n"))
1477 (("godir = .*$")
1478 (string-append
1479 "godir = "
1480 "$(prefix)/lib/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n")))
1481 #t))))
1482 (build-system gnu-build-system)
1483 (arguments
1484 '(#:configure-flags
1485 (list (string-append "--with-libfreeimage-prefix="
1486 (assoc-ref %build-inputs "freeimage"))
1487 (string-append "--with-libgslcblas-prefix="
1488 (assoc-ref %build-inputs "gsl")))))
1489 (native-inputs
1490 `(("pkg-config" ,pkg-config)))
1491 (propagated-inputs
1492 `(("guile-sdl" ,guile-sdl)
1493 ("guile-opengl" ,guile-opengl)))
1494 (inputs
1495 `(("guile" ,guile-2.2)
1496 ("gsl" ,gsl)
1497 ("freeimage" ,freeimage)
1498 ("mesa" ,mesa)))
1499 (synopsis "2D/3D game engine for GNU Guile")
1500 (description "Sly is a 2D/3D game engine written in Guile Scheme. Sly
1501features a functional reactive programming interface and live coding
1502capabilities.")
1503 (home-page "https://dthompson.us/projects/sly.html")
1504 (license license:gpl3+)))
1505
1506(define-public g-wrap
1507 (package
1508 (name "g-wrap")
1509 (version "1.9.15")
1510 (source (origin
1511 (method url-fetch)
1512 (uri (string-append "mirror://savannah/g-wrap/g-wrap-"
1513 version ".tar.gz"))
1514 (sha256
1515 (base32
1516 "0ak0bha37dfpj9kmyw1r8fj8nva639aw5xr66wr5gd3l1rqf5xhg"))))
1517 (build-system gnu-build-system)
1518 (native-inputs
1519 `(("pkg-config" ,pkg-config)))
1520 (propagated-inputs
1521 `(("guile" ,guile-2.2)
1522 ("guile-lib" ,guile-lib)))
1523 (inputs
1524 `(("libffi" ,libffi)))
1525 (arguments
1526 `(#:configure-flags '("--disable-Werror")
1527 #:phases
1528 (modify-phases %standard-phases
1529 (add-before 'configure 'pre-configure
1530 (lambda* (#:key outputs #:allow-other-keys)
1531 (let ((out (assoc-ref outputs "out")))
1532 (substitute* (find-files "." "^Makefile.in$")
1533 (("guilemoduledir =.*guile/site" all)
1534 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))
1535 #t))))))
1536 (synopsis "Generate C bindings for Guile")
1537 (description "G-Wrap is a tool and Guile library for generating function
1538wrappers for inter-language calls. It currently only supports generating Guile
1539wrappers for C functions. Given a definition of the types and prototypes for
1540a given C interface, G-Wrap will automatically generate the C code that
1541provides access to that interface and its types from the Scheme level.")
1542 (home-page "https://www.nongnu.org/g-wrap/index.html")
1543 (license license:lgpl2.1+)))
1544
1545(define-public guile-miniadapton
1546 (let ((commit "1b5749422304567c96ac5367f2221dda9eff5880")
1547 (revision "1"))
1548 (package
1549 (name "guile-miniadapton")
1550 (version (string-append "0-" revision "." (string-take commit 9)))
1551 (source (origin
1552 (method git-fetch)
1553 (uri (git-reference
1554 (url "https://github.com/fisherdj/miniAdapton.git")
1555 (commit commit)))
1556 (file-name (string-append name "-" version "-checkout"))
1557 (sha256
1558 (base32
1559 "09q51zkw2fypad5xixskfzw2cjhjgs5cswdp3i7cpp651rb3zndh"))))
1560 (build-system guile-build-system)
1561 (native-inputs
1562 `(("guile" ,guile-2.2)))
1563 (home-page "https://github.com/fisherdj/miniAdapton")
1564 (synopsis "Minimal implementation of incremental computation in Guile
1565Scheme")
1566 (description "This package provides a complete Scheme implementation of
1567miniAdapton, which implements the core functionality of the Adapton system for
1568incremental computation (also known as self-adjusting computation). Like
1569Adapton, miniAdapton allows programmers to safely combine mutation and
1570memoization. miniAdapton is built on top of an even simpler system,
1571microAdapton. Both miniAdapton and microAdapton are designed to be easy to
1572understand, extend, and port to host languages other than Scheme.")
1573 (license license:expat))))
1574
1575(define-public guile-reader
1576 (package
1577 (name "guile-reader")
1578 (version "0.6.2")
1579 (source (origin
1580 (method url-fetch)
1581 (uri (string-append "mirror://savannah/guile-reader/guile-reader-"
1582 version ".tar.gz"))
1583 (sha256
1584 (base32
1585 "0592s2s8ampqmqwilc4fvcild6rb9gy79di6vxv5kcdmv23abkgx"))))
1586 (build-system gnu-build-system)
1587 (native-inputs `(("pkgconfig" ,pkg-config)
1588 ("gperf" ,gperf-3.0)))
1589 (inputs `(("guile" ,guile-2.2)))
1590 (synopsis "Framework for building readers for GNU Guile")
1591 (description
1592 "Guile-Reader is a simple framework for building readers for GNU Guile.
1593
1594The idea is to make it easy to build procedures that extend Guile’s read
1595procedure. Readers supporting various syntax variants can easily be written,
1596possibly by re-using existing “token readers” of a standard Scheme
1597readers. For example, it is used to implement Skribilo’s R5RS-derived
1598document syntax.
1599
1600Guile-Reader’s approach is similar to Common Lisp’s “read table”, but
1601hopefully more powerful and flexible (for instance, one may instantiate as
1602many readers as needed).")
1603 (home-page "https://www.nongnu.org/guile-reader/")
1604 (license license:gpl3+)))
1605
0791437f
RW
1606(define-public guile-ncurses
1607 (package
1608 (name "guile-ncurses")
2b155e3a 1609 (version "3.0")
0791437f
RW
1610 (source (origin
1611 (method url-fetch)
1612 (uri (string-append "mirror://gnu/guile-ncurses/guile-ncurses-"
1613 version ".tar.gz"))
1614 (sha256
1615 (base32
2b155e3a 1616 "038xbffalhymg26lvmzgf7ljilxz2f2zmqg5r5nfzbipfbprwjhf"))))
0791437f
RW
1617 (build-system gnu-build-system)
1618 (inputs `(("ncurses" ,ncurses)
1619 ("guile" ,guile-2.2)))
1620 (native-inputs `(("pkg-config" ,pkg-config)))
1621 (arguments
1622 '(#:configure-flags (list "--with-ncursesw" ; Unicode support
1623 "--with-gnu-filesystem-hierarchy")
1624 #:phases
1625 (modify-phases %standard-phases
1626 (add-before 'build 'fix-libguile-ncurses-file-name
1627 (lambda* (#:key outputs #:allow-other-keys)
1628 (invoke "make" "install"
1629 "-C" "src/ncurses"
1630 "-j" (number->string
1631 (parallel-job-count)))
1632 (let* ((out (assoc-ref outputs "out"))
1633 (dir "src/ncurses")
1634 (files (find-files dir ".scm")))
1635 (substitute* files
1636 (("\"libguile-ncurses\"")
1637 (format #f "\"~a/lib/guile/2.2/libguile-ncurses\""
1638 out)))
1639 #t))))))
1640 (home-page "https://www.gnu.org/software/guile-ncurses/")
1641 (synopsis "Guile bindings to ncurses")
1642 (description
1643 "guile-ncurses provides Guile language bindings for the ncurses
1644library.")
1645 (license license:lgpl3+)))
1646
1647(define-public guile-ncurses/gpm
1648 (package
1649 (inherit guile-ncurses)
1650 (name "guile-ncurses-with-gpm")
1651 (inputs `(("ncurses" ,ncurses/gpm)
1652 ("guile" ,guile-2.2)))))
1653
1654(define-public guile-lib
1655 (package
1656 (name "guile-lib")
1657 (version "0.2.6.1")
1658 (source (origin
1659 (method url-fetch)
1660 (uri (string-append "mirror://savannah/guile-lib/guile-lib-"
1661 version ".tar.gz"))
1662 (sha256
1663 (base32
1664 "0aizxdif5dpch9cvs8zz5g8ds5s4xhfnwza2il5ji7fv2h7ks7bd"))))
1665 (build-system gnu-build-system)
1666 (arguments
1667 '(#:make-flags
1668 '("GUILE_AUTO_COMPILE=0") ; to prevent guild errors
1669 #:phases
1670 (modify-phases %standard-phases
1671 (add-before 'configure 'patch-module-dir
1672 (lambda _
1673 (substitute* "src/Makefile.in"
1674 (("^moddir = ([[:graph:]]+)")
1675 "moddir = $(datadir)/guile/site/@GUILE_EFFECTIVE_VERSION@\n")
1676 (("^godir = ([[:graph:]]+)")
1677 "godir = \
1678$(libdir)/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n"))
1679 #t)))))
1680 (native-inputs `(("pkg-config" ,pkg-config)))
1681 (inputs `(("guile" ,guile-2.2)))
1682 (home-page "https://www.nongnu.org/guile-lib/")
1683 (synopsis "Collection of useful Guile Scheme modules")
1684 (description
1685 "Guile-Lib is intended as an accumulation place for pure-scheme Guile
1686modules, allowing for people to cooperate integrating their generic Guile
1687modules into a coherent library. Think \"a down-scaled, limited-scope CPAN
1688for Guile\".")
1689
1690 ;; The whole is under GPLv3+, but some modules are under laxer
1691 ;; distribution terms such as LGPL and public domain. See `COPYING' for
1692 ;; details.
1693 (license license:gpl3+)))
1694
1695(define-public guile2.0-lib
1696 (package
1697 (inherit guile-lib)
1698 (name "guile2.0-lib")
1699 (inputs `(("guile" ,guile-2.0)))))
1700
0791437f
RW
1701(define-public guile-minikanren
1702 (package
1703 (name "guile-minikanren")
1704 (version "20150424.e844d85")
1705 (source (origin
1706 (method git-fetch)
1707 (uri (git-reference
1708 (url "https://github.com/ijp/minikanren.git")
1709 (commit "e844d85512f8c055d3f96143ee506007389a25e3")))
1710 (file-name (string-append name "-" version "-checkout"))
1711 (sha256
1712 (base32
1713 "0r50jlpzi940jlmxyy3ddqqwmj5r12gb4bcv0ssini9v8km13xz6"))))
1714 (build-system guile-build-system)
1715 (native-inputs
1716 `(("guile" ,guile-2.2)))
1717 (home-page "https://github.com/ijp/minikanren")
1718 (synopsis "MiniKanren declarative logic system, packaged for Guile")
1719 (description
1720 "MiniKanren is a relational programming extension to the Scheme
1721programming Language, written as a smaller version of Kanren suitable for
1722pedagogical purposes. It is featured in the book, The Reasoned Schemer,
1723written by Dan Friedman, William Byrd, and Oleg Kiselyov.
1724
1725This is Ian Price's r6rs packaged version of miniKanren, which deviates
1726slightly from miniKanren mainline.
1727
1728See http://minikanren.org/ for more on miniKanren generally.")
1729 (license license:expat)))
1730
1731(define-public guile2.0-minikanren
1732 (package
1733 (inherit guile-minikanren)
1734 (name "guile2.0-minikanren")
1735 (native-inputs `(("guile" ,guile-2.0)))))
1736
89a99d53
LC
1737(define-public guile3.0-minikanren
1738 (package
1739 (inherit guile-minikanren)
1740 (name "guile3.0-minikanren")
1741 (native-inputs `(("guile" ,guile-next)))))
1742
0791437f
RW
1743(define-public guile-irregex
1744 (package
1745 (name "guile-irregex")
1746 (version "0.9.6")
1747 (source (origin
1748 (method url-fetch)
1749 (uri (string-append
1750 "http://synthcode.com/scheme/irregex/irregex-"
1751 version ".tar.gz"))
1752 (sha256
1753 (base32
1754 "1ia3m7dp3lcxa048q0gqbiwwsyvn99baw6xkhb4bhhzn4k7bwyqq"))))
1755 (build-system guile-build-system)
1756 (arguments
1757 '(#:phases (modify-phases %standard-phases
1758 (add-after 'unpack 'move-files-around
1759 (lambda _
1760 ;; Move the relevant source files to src/ and create the
1761 ;; rx/ directory to match the expected module hierarchy.
1762 (mkdir-p "src/rx/source")
1763 (rename-file "irregex-guile.scm"
1764 "src/rx/irregex.scm")
1765 (rename-file "irregex.scm"
1766 "src/rx/source/irregex.scm")
1767 ;; Not really reachable via guile's packaging system,
1768 ;; but nice to have around.
1769 (rename-file "irregex-utils.scm"
1770 "src/rx/source/irregex-utils.scm")
1771 #t)))
1772 #:source-directory "src"))
1773 (native-inputs
1774 `(("guile" ,guile-2.2)))
1775 (home-page "http://synthcode.com/scheme/irregex")
1776 (synopsis "S-expression based regular expressions")
1777 (description
1778 "Irregex is an s-expression based alternative to your classic
1779string-based regular expressions. It implements SRFI 115 and is deeply
1780inspired by the SCSH regular expression system.")
1781 (license license:bsd-3)))
1782
1783(define-public guile2.0-irregex
1784 (package
1785 (inherit guile-irregex)
1786 (name "guile2.0-irregex")
1787 (native-inputs `(("guile" ,guile-2.0)))))
1788
89a99d53
LC
1789(define-public guile3.0-irregex
1790 (package
1791 (inherit guile-irregex)
1792 (name "guile3.0-irregex")
1793 (native-inputs `(("guile" ,guile-next)))))
1794
0791437f
RW
1795(define-public haunt
1796 (package
1797 (name "haunt")
1798 (version "0.2.4")
1799 (source (origin
1800 (method url-fetch)
1801 (uri (string-append "https://files.dthompson.us/haunt/haunt-"
1802 version ".tar.gz"))
1803 (sha256
1804 (base32
1805 "056z4znikk83nr5mr0x2ac3iinqbywa2bvb37mhr566a1q50isfc"))))
1806 (build-system gnu-build-system)
1807 (arguments
1808 `(#:modules ((ice-9 match) (ice-9 ftw)
1809 ,@%gnu-build-system-modules)
1810 #:tests? #f ; test suite is non-deterministic :(
1811 #:phases (modify-phases %standard-phases
1812 (add-after 'install 'wrap-haunt
1813 (lambda* (#:key inputs outputs #:allow-other-keys)
1814 ;; Wrap the 'haunt' command to refer to the right
1815 ;; modules.
1816 (let* ((out (assoc-ref outputs "out"))
1817 (bin (string-append out "/bin"))
1818 (site (string-append
1819 out "/share/guile/site"))
1820 (deps (list (assoc-ref inputs "guile-reader")
1821 (assoc-ref inputs "guile-commonmark"))))
1822 (match (scandir site)
1823 (("." ".." version)
1824 (let ((modules (string-append site "/" version))
1825 (compiled-modules (string-append
1826 out "/lib/guile/" version
1827 "/site-ccache")))
1828 (wrap-program (string-append bin "/haunt")
1829 `("GUILE_LOAD_PATH" ":" prefix
1830 (,modules
1831 ,@(map (lambda (dep)
1832 (string-append dep
1833 "/share/guile/site/"
1834 version))
1835 deps)))
1836 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
1837 (,compiled-modules
1838 ,@(map (lambda (dep)
1839 (string-append dep "/lib/guile/"
1840 version
1841 "/site-ccache"))
1842 deps))))
1843 #t)))))))))
1844 (native-inputs
1845 `(("pkg-config" ,pkg-config)
1846 ("texinfo" ,texinfo)))
1847 (inputs
1848 `(("guile" ,guile-2.2)))
1849 (propagated-inputs
1850 `(("guile-reader" ,guile-reader)
1851 ("guile-commonmark" ,guile-commonmark)))
1852 (synopsis "Functional static site generator")
1853 (description "Haunt is a static site generator written in Guile
1854Scheme. Haunt features a functional build system and an extensible
1855interface for reading articles in any format.")
1856 (home-page "http://haunt.dthompson.us")
1857 (license license:gpl3+)))
1858
1859(define-public guile2.0-haunt
1860 (package
1861 (inherit haunt)
1862 (name "guile2.0-haunt")
1863 (inputs `(("guile" ,guile-2.0)))))
1864
0791437f
RW
1865(define-public guile-redis
1866 (package
1867 (name "guile-redis")
f57bf15c 1868 (version "1.3.0")
0791437f
RW
1869 (home-page "https://github.com/aconchillo/guile-redis")
1870 (source (origin
29fde3bf
EF
1871 (method git-fetch)
1872 (uri (git-reference
1873 (url home-page)
1874 (commit version)))
1875 (file-name (git-file-name name version))
0791437f
RW
1876 (sha256
1877 (base32
29fde3bf 1878 "14izs8daxh7pb7vwpxi5g427qa31137jkaxrb1cy5rpjkwchy723"))))
0791437f
RW
1879 (build-system gnu-build-system)
1880 (native-inputs
1881 `(("autoconf" ,autoconf)
1882 ("automake" ,automake)
1883 ("pkg-config" ,pkg-config)
1884 ("guile" ,guile-2.2)))
1885 (synopsis "Redis client library for Guile")
1886 (description "Guile-redis provides a Scheme interface to the Redis
1887key-value cache and store.")
1888 (license license:lgpl3+)))
1889
1890(define-public guile2.0-redis
1891 (package
1892 (inherit guile-redis)
1893 (name "guile2.0-redis")
1894 (native-inputs `(("guile" ,guile-2.0)
1895 ,@(alist-delete "guile"
1896 (package-native-inputs guile-redis))))))
1897
0791437f
RW
1898(define-public guile-commonmark
1899 (package
1900 (name "guile-commonmark")
b552e307 1901 (version "0.1.2")
0791437f
RW
1902 (source (origin
1903 (method url-fetch)
1904 (uri (string-append "https://github.com/OrangeShark/" name
1905 "/releases/download/v" version
1906 "/" name "-" version ".tar.gz"))
1907 (sha256
1908 (base32
b552e307 1909 "17lrsdisa3kckh24q114vfmzdc4wkqa6ccwl4hdlrng5wpn1iman"))))
0791437f
RW
1910 (build-system gnu-build-system)
1911 (inputs
1912 `(("guile" ,guile-2.2)))
1913 (native-inputs
1914 `(("pkg-config" ,pkg-config)))
1915 (synopsis "CommonMark parser for Guile")
1916 (description
1917 "guile-commonmark is a library for parsing CommonMark, a fully specified
1918variant of Markdown. The library is written in Guile Scheme and is designed
1919to transform a CommonMark document to SXML. guile-commonmark tries to closely
1920follow the @uref{http://commonmark.org/, CommonMark spec}, the main difference
1921is no support for parsing block and inline level HTML.")
1922 (home-page "https://github.com/OrangeShark/guile-commonmark")
1923 (license license:lgpl3+)))
1924
1925(define-public guile2.0-commonmark
1926 (package
1927 (inherit guile-commonmark)
1928 (name "guile2.0-commonmark")
1929 (inputs `(("guile" ,guile-2.0)))))
1930
0791437f
RW
1931(define-public mcron
1932 (package
1933 (name "mcron")
30ebff69 1934 (version "1.1.3")
0791437f
RW
1935 (source (origin
1936 (method url-fetch)
1937 (uri (string-append "mirror://gnu/mcron/mcron-"
1938 version ".tar.gz"))
1939 (sha256
1940 (base32
30ebff69 1941 "00kv7fgllzjpis0g1m9csycp4f6l11774m09dqy255cvmim2g743"))))
0791437f
RW
1942 (build-system gnu-build-system)
1943 (arguments
1944 '(#:phases (modify-phases %standard-phases
30ebff69
EF
1945 (add-after 'unpack 'fix-finding-guile
1946 (lambda _
1947 (substitute* "configure"
1948 (("2\\.0") "2.2 2.0"))
1949 #t))
0791437f
RW
1950 (add-before 'check 'adjust-tests
1951 (lambda _
1952 (substitute* "tests/job-specifier.scm"
1953 ;; (getpw) fails with "entry not found" in the build
1954 ;; environment, so pass an argument.
1955 (("\\(getpw\\)")
1956 "(getpwnam (getuid))")
1957 ;; The build environment lacks an entry for root in
1958 ;; /etc/passwd.
1959 (("\\(getpw 0\\)")
1960 "(getpwnam \"nobody\")")
1961
1962 ;; FIXME: Skip the 4 faulty tests (see above).
1963 (("\\(test-equal \"next-year\"" all)
1964 (string-append "(test-skip 4)\n" all)))
1965 #t)))))
30ebff69 1966 (native-inputs `(("pkg-config" ,pkg-config)
0791437f 1967 ("tzdata" ,tzdata-for-tests)))
f61f424d 1968 (inputs `(("guile" ,guile-2.2)))
0791437f
RW
1969 (home-page "https://www.gnu.org/software/mcron/")
1970 (synopsis "Run jobs at scheduled times")
1971 (description
1972 "GNU Mcron is a complete replacement for Vixie cron. It is used to run
1973tasks on a schedule, such as every hour or every Monday. Mcron is written in
1974Guile, so its configuration can be written in Scheme; the original cron
1975format is also supported.")
1976 (license license:gpl3+)))
1977
1978(define-public mcron2
1979 ;; This was mthl's mcron development branch, and it became mcron 1.1.
1980 (deprecated-package "mcron2" mcron))
6bb5f88e
RW
1981
1982(define-public guile-picture-language
d1a3a8e1
RW
1983 (let ((commit "91d10c96708d732145006dd2802acc4de08b632e")
1984 (revision "1"))
6bb5f88e
RW
1985 (package
1986 (name "guile-picture-language")
d1a3a8e1 1987 (version (git-version "0.0.1" revision commit))
6bb5f88e
RW
1988 (source (origin
1989 (method git-fetch)
1990 (uri (git-reference
1991 (url "https://git.elephly.net/software/guile-picture-language.git")
1992 (commit commit)))
f1d4d79f 1993 (file-name (git-file-name name version))
6bb5f88e
RW
1994 (sha256
1995 (base32
d1a3a8e1
RW
1996 "1ydvw9dvssdvlvhh1dr8inyzy2x6m41qgp8hsivca1xysr4gc23a"))))
1997 (build-system gnu-build-system)
6bb5f88e
RW
1998 (inputs
1999 `(("guile" ,guile-2.2)))
d1a3a8e1
RW
2000 (native-inputs
2001 `(("autoconf" ,autoconf)
2002 ("automake" ,automake)
2003 ("imagemagick" ,imagemagick)
2004 ("pkg-config" ,pkg-config)
2005 ("texinfo" ,texinfo)))
6bb5f88e
RW
2006 (home-page "https://git.elephly.net/software/guile-picture-language.git")
2007 (synopsis "Picture language for Guile")
2008 (description
2009 "This package provides a simple SVG-based picture language for Guile.
2010The picture values can directly be displayed in Geiser.")
2011 (license license:lgpl3+))))
5531782d
RW
2012
2013(define-public guile-studio
223236f6
RW
2014 (package
2015 (name "guile-studio")
2016 (version "0.0.2")
2017 (source (origin
2018 (method git-fetch)
2019 (uri (git-reference
2020 (url "https://git.elephly.net/software/guile-studio.git")
2021 (commit version)))
2022 (file-name (git-file-name name version))
2023 (sha256
2024 (base32
2025 "10ls4ra148hd9ra7sin4kh9vv0am5pwk48p7dsjhrlg2l1hsh4hi"))))
2026 (build-system gnu-build-system)
2027 (arguments
2028 `(#:modules
2029 ((ice-9 match)
2030 (srfi srfi-1)
2031 ,@%gnu-build-system-modules)
2032 #:tests? #f ; there are none
2033 #:make-flags
2034 (list (string-append "ICONS_DIR="
2035 (assoc-ref %build-inputs "adwaita-icon-theme")
2036 "/share/icons/Adwaita/")
2037 (string-append "PICT_DIR="
2038 (assoc-ref %build-inputs "guile-picture-language"))
2039 (string-append "EMACS_DIR="
2040 (assoc-ref %build-inputs "emacs"))
2041 (string-append "GUILE_DIR="
2042 (assoc-ref %build-inputs "guile"))
2043 (string-join (cons "INPUTS="
2044 (filter-map
2045 (lambda (input)
2046 (match input
2047 ((label . pkg)
2048 (and (string-prefix? "emacs" label) pkg))))
2049 %build-inputs)))
2050 (string-append "PREFIX=" (assoc-ref %outputs "out")))
2051 #:phases
2052 (modify-phases %standard-phases
2053 (delete 'configure)
2054 (delete 'install))))
2055 (inputs
2056 `(("guile" ,guile-2.2)
2057 ("guile-picture-language" ,guile-picture-language)
2058 ("emacs" ,emacs)
2059 ("emacs-geiser" ,emacs-geiser)
2060 ("emacs-company" ,emacs-company)
2061 ("emacs-flycheck" ,emacs-flycheck)
2062 ("emacs-smart-mode-line" ,emacs-smart-mode-line)
2063 ("emacs-paren-face" ,emacs-paren-face)
2064 ("adwaita-icon-theme" ,adwaita-icon-theme)))
2065 (native-inputs
2066 `(("texinfo" ,texinfo)))
2067 (home-page "https://gnu.org/software/guile")
2068 (synopsis "IDE for Guile")
2069 (description
2070 "This is Emacs with a few settings that make working with Guile easier
5531782d
RW
2071for people new to Emacs. Features include: CUA mode, Geiser, tool bar icons
2072to evaluate Guile buffers, support for Guile's very own picture language, code
2073completion, a simple mode line, etc.")
223236f6 2074 (license license:gpl3+)))
9f8698ad
RW
2075
2076(define-public guile-stis-parser
2077 (let ((commit "6e85d37ffc333b722f4413a6c648263701eb75bd")
2078 (revision "1"))
2079 (package
2080 (name "guile-stis-parser")
2081 (version (git-version "0" revision commit))
2082 (source (origin
2083 (method git-fetch)
2084 (uri (git-reference
2085 (url "https://gitlab.com/tampe/stis-parser")
2086 (commit commit)))
29e76f07 2087 (file-name (git-file-name name version))
9f8698ad
RW
2088 (sha256
2089 (base32
2090 "0v4hvq7rlpbra1ni73lf8k6sdmjlflr50yi3p1f24g85h77pc7c0"))))
2091 (build-system gnu-build-system)
2092 (arguments
2093 `(#:parallel-build? #f ; not supported
2094 #:phases
2095 (modify-phases %standard-phases
2096 (add-after 'unpack 'chdir
2097 (lambda _ (chdir "modules") #t))
8318b3ed
RW
2098 (add-after 'chdir 'use-canonical-directory-for-go-files
2099 (lambda _
2100 (substitute* "Makefile.am"
2101 (("/ccache") "/site-ccache"))
2102 #t))
9f8698ad
RW
2103 (add-after 'chdir 'delete-broken-symlink
2104 (lambda _
2105 (delete-file "parser/stis-parser/lang/.#calc.scm")
2106 #t)))))
2107 (inputs
2108 `(("guile" ,guile-2.2)))
2109 (native-inputs
2110 `(("autoconf" ,autoconf)
2111 ("automake" ,automake)
2112 ("pkg-config" ,pkg-config)))
2113 (home-page "https://gitlab.com/tampe/stis-parser")
2114 (synopsis "Parser combinator framework")
2115 (description
2116 "This package provides a functional parser combinator library that
2117supports backtracking and a small logical framework. The idea is to build up
2118chunks that are memoized and there is no clear scanner/parser separation,
2119chunks can be expressions as well as simple tokens.")
2120 (license license:lgpl2.0+))))
12d73f9c
RW
2121
2122(define-public guile-persist
2123 (let ((commit "b14927b0368af51c024560aee5f55724aee35233")
2124 (revision "1"))
2125 (package
2126 (name "guile-persist")
2127 (version (git-version "0" revision commit))
2128 (source (origin
2129 (method git-fetch)
2130 (uri (git-reference
2131 (url "https://gitlab.com/tampe/guile-persist")
2132 (commit commit)))
2133 (file-name (git-file-name name version))
2134 (sha256
2135 (base32
85a411bc
LC
2136 "0z5nf377wh8yj6n3sx2ddn4bdx1qrqnw899dlqjhg0q69qzil522"))
2137 (modules '((guix build utils)))
2138 (snippet
2139 '(begin
2140 ;; Install .go files in the right place.
2141 (substitute* "Makefile.am"
2142 (("/ccache") "/site-ccache"))
2143 #t))))
12d73f9c
RW
2144 (build-system gnu-build-system)
2145 (arguments
2146 `(#:phases
2147 (modify-phases %standard-phases
2148 (add-after 'unpack 'patch-prefix
2149 (lambda* (#:key inputs outputs #:allow-other-keys)
2150 (substitute* "src/Makefile.am"
2151 (("/usr/local/lib/guile")
2152 (string-append (assoc-ref outputs "out") "/lib/guile"))
2153 (("/usr/local/include/guile")
2154 (string-append (assoc-ref inputs "guile") "/include/guile"))
2155 (("-L/usr/local/lib")
8f052528
RW
2156 (string-append "-L" (assoc-ref inputs "guile") "/lib"))
2157 ;; Use canonical directory for go files.
2158 (("/ccache") "/site-ccache"))
12d73f9c
RW
2159 #t))
2160 (add-after 'unpack 'patch-library-reference
2161 (lambda* (#:key outputs #:allow-other-keys)
2162 (let ((out (assoc-ref outputs "out")))
2163 (substitute* "persist/persistance.scm"
2164 (("\"libguile-persist\"")
2165 (format #f "\"~a/lib/guile/2.2/extensions/libguile-persist\"" out)))
2166 #t))))))
2167 (inputs
2168 `(("guile" ,guile-2.2)))
2169 (native-inputs
2170 `(("autoconf" ,autoconf)
2171 ("automake" ,automake)
2172 ("libtool" ,libtool)
2173 ("pkg-config" ,pkg-config)))
2174 (home-page "https://gitlab.com/tampe/guile-persist")
028053f2 2175 (synopsis "Persistence programming framework for Guile")
12d73f9c
RW
2176 (description
2177 "This is a serialization library for serializing objects like classes
2178and objects, closures and structs. This currently does not support
2179serializing continuations or delimited continuations.")
2180 (license license:lgpl2.0+))))
6d37301b
RW
2181
2182(define-public python-on-guile
5d5edb88
LC
2183 (let ((commit "00a51a23247f1edc4ae8eda72b30df5cd7d0015f")
2184 (revision "3"))
6d37301b
RW
2185 (package
2186 (name "python-on-guile")
2187 (version (git-version "0.1.0" revision commit))
2188 (source (origin
2189 (method git-fetch)
2190 (uri (git-reference
4088ae42 2191 (url "https://git.elephly.net/software/python-on-guile.git")
6d37301b
RW
2192 (commit commit)))
2193 (file-name (git-file-name name version))
2194 (sha256
2195 (base32
5d5edb88 2196 "03rpnqr08rqr3gay128g564rwk8w4jbj28ss6b46z1d4vjs4nk68"))))
6d37301b
RW
2197 (build-system gnu-build-system)
2198 (arguments
2199 `(#:parallel-build? #f ; not supported
83817158
LC
2200 #:make-flags '("GUILE_AUTO_COMPILE=0") ;to prevent guild warnings
2201
6d37301b
RW
2202 #:phases
2203 (modify-phases %standard-phases
2204 (add-after 'unpack 'chdir
83817158
LC
2205 (lambda _ (chdir "modules") #t))
2206 (add-after 'install 'wrap
2207 (lambda* (#:key outputs #:allow-other-keys)
2208 ;; Wrap the 'python' executable so it can find its
2209 ;; dependencies.
2210 (let ((out (assoc-ref outputs "out")))
2211 (wrap-program (string-append out "/bin/python")
2212 `("GUILE_LOAD_PATH" ":" prefix
2213 (,(getenv "GUILE_LOAD_PATH")))
2214 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
2215 (,(getenv "GUILE_LOAD_COMPILED_PATH"))))
2216 #t))))))
6d37301b
RW
2217 (inputs
2218 `(("guile" ,guile-2.2)))
2219 (propagated-inputs
2220 `(("guile-persist" ,guile-persist)
2221 ("guile-readline" ,guile-readline)
2222 ("guile-stis-parser" ,guile-stis-parser)))
2223 (native-inputs
2224 `(("autoconf" ,autoconf)
2225 ("automake" ,automake)
2226 ("libtool" ,libtool)
2227 ("pkg-config" ,pkg-config)))
2228 (home-page "https://gitlab.com/python-on-guile/python-on-guile/")
2229 (synopsis "Python implementation in Guile")
2230 (description
2231 "This package allows you to compile a Guile Python file to any target
2232from @code{tree-il}.")
2233 (license license:lgpl2.0+))))
b97b4624
RW
2234
2235(define-public guile-file-names
2236 (package
2237 (name "guile-file-names")
72a0706f 2238 (version "0.3")
b97b4624
RW
2239 (source (origin
2240 (method url-fetch)
2241 (uri (string-append "http://brandon.invergo.net/software/download/"
2242 "guile-file-names/guile-file-names-"
2243 version ".tar.gz"))
2244 (sha256
2245 (base32
72a0706f 2246 "01chizdxkhw6aqv629vxka9f5x3534ij7r0jqndawsg2vxm1r9sz"))))
b97b4624
RW
2247 (build-system gnu-build-system)
2248 (arguments
2249 `(#:phases
2250 (modify-phases %standard-phases
481eca80 2251 (add-after 'unpack 'fix-target-directory
b97b4624 2252 (lambda _
481eca80 2253 (substitute* "src/Makefile.in"
b97b4624
RW
2254 (("guilemoddir = \\$\\(GUILE_SITE\\)")
2255 "guilemoddir = $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
2256 #t)))))
2257 (inputs
2258 `(("guile" ,guile-2.2)))
2259 (native-inputs
2260 `(("pkg-config" ,pkg-config)))
2261 (home-page "https://gitlab.com/brandoninvergo/guile-file-names")
2262 (synopsis "Manipulate file names")
2263 (description
2264 "The @code{(file-names)} module provides tools for manipulating file
2265names. The module was built on the idea that doing anything more than a
2266non-trivial modification of a file name string is a pain (making sure all
2267slashes are present and accounted for, resolving @code{.} and @code{..}, etc).
2268Inevitably, you have to break the string up into chunks and operate on that
2269list of components. This module takes care of that for you.")
2270 (license license:lgpl3+)))
bdf2dd79
JN
2271
2272(define-public guile-gi
bb6c8f20
RW
2273 (package
2274 (name "guile-gi")
b5d4d5b9 2275 (version "0.2.1")
bb6c8f20
RW
2276 (source (origin
2277 (method url-fetch)
2278 (uri (string-append "http://lonelycactus.com/tarball/guile_gi-"
2279 version ".tar.gz"))
2280 (sha256
2281 (base32
b5d4d5b9 2282 "1ah5bmkzplsmkrk7v9vlxlqch7i91qv4cq2d2nar9xshbpcrj484"))))
bb6c8f20
RW
2283 (build-system gnu-build-system)
2284 (arguments
b5d4d5b9
RW
2285 `(#:configure-flags '("--with-gnu-filesystem-hierarchy")
2286 #:phases
2287 (modify-phases %standard-phases
2288 (add-before 'check 'start-xorg-server
2289 (lambda* (#:key inputs #:allow-other-keys)
2290 ;; The init_check test requires a running X server.
2291 (system (format #f "~a/bin/Xvfb :1 &"
2292 (assoc-ref inputs "xorg-server")))
2293 (setenv "DISPLAY" ":1")
2294 #t)))))
bb6c8f20
RW
2295 (native-inputs
2296 `(("gettext" ,gnu-gettext)
6153fa0a 2297 ("glib:bin" ,glib "bin") ; for glib-compile-resources
bb6c8f20 2298 ("libtool" ,libtool)
b5d4d5b9
RW
2299 ("pkg-config" ,pkg-config)
2300 ("xorg-server" ,xorg-server)))
bb6c8f20
RW
2301 (propagated-inputs
2302 `(("glib" ,glib)
2303 ("gobject-introspection" ,gobject-introspection)
2304 ("gssettings-desktop-schemas" ,gsettings-desktop-schemas)
2305 ("gtk+" ,gtk+)
2306 ("guile-lib" ,guile-lib)
2307 ("webkitgtk" ,webkitgtk)))
2308 (inputs `(("guile" ,guile-2.2)))
2309 (home-page "https://github.com/spk121/guile-gi")
2310 (synopsis "GObject bindings for Guile")
2311 (description
2312 "Guile-GI is a library for Guile that allows using GObject-based
bdf2dd79
JN
2313libraries, such as GTK+3. Its README comes with the disclaimer: This is
2314pre-alpha code.")
bb6c8f20 2315 (license license:gpl3+)))
dec4b3aa
LC
2316
2317(define-public guile-srfi-159
2318 (let ((commit "1bd98abda2ae4ef8f36761a167903e55c6bda7bb")
2319 (revision "0"))
2320 (package
2321 (name "guile-srfi-159")
2322 (version (git-version "0" revision commit))
2323 (home-page "https://bitbucket.org/bjoli/guile-srfi-159")
2324 (source (origin
2325 (method hg-fetch)
2326 (uri (hg-reference (changeset commit)
2327 (url home-page)))
2328 (sha256
2329 (base32
2330 "1zw6cmcy7xdbfiz3nz9arqnn7l2daidaps6ixkcrc9b6k51fdv3p"))
2331 (file-name (git-file-name name version))))
2332 (build-system guile-build-system)
2333 (arguments
2334 ;; The *-impl.scm files are actually included from module files; they
2335 ;; should not be compiled separately, but they must be installed.
2336 '(#:not-compiled-file-regexp "-impl\\.scm$"))
2337 (inputs
2338 `(("guile" ,guile-2.2)))
2339 (synopsis "Formatting combinators for Guile")
2340 (description
2341 "The @code{(srfi-159)} module and its sub-modules implement the
2342formatting combinators specified by
2343@uref{https://srfi.schemers.org/srfi-159/srfi-159.html, SRFI-159}. These are
2344more expressive and flexible than the traditional @code{format} procedure.")
2345 (license license:bsd-3))))
f0de9544
JN
2346
2347(define-public emacsy
48eb71ae
JN
2348 (package
2349 (name "emacsy")
2350 (version "0.4.1")
2351 (source (origin
2352 (method url-fetch)
2353 (uri (string-append
2354 "https://download.savannah.nongnu.org/releases/"
2355 name "/" name "-" version ".tar.gz"))
2356 (sha256
2357 (base32
2358 "1cpb85dl1nibd34c2x2h7vfmjpkgh353p5b1w20v6cs6gmvgg4np"))))
2359 (build-system gnu-build-system)
2360 (native-inputs
2361 `(("autoconf" ,autoconf)
2362 ("automake" ,automake)
2363 ("bzip2" ,bzip2)
2364 ("guile" ,guile-2.2)
2365 ("gettext" ,gnu-gettext)
2366 ("libtool" ,libtool)
2367 ("perl" ,perl)
2368 ("pkg-config" ,pkg-config)
2369 ("texinfo" ,texinfo)
1aa026aa 2370 ("texlive" ,(texlive-union (list texlive-generic-epsf)))))
114f02ba 2371 (inputs
48eb71ae
JN
2372 `(("dbus-glib" ,dbus-glib)
2373 ("guile" ,guile-2.2)
2374 ("guile-lib" ,guile-lib)
2375 ("guile-readline" ,guile-readline)
48eb71ae 2376 ("freeglut" ,freeglut)
48eb71ae 2377 ("webkitgtk" ,webkitgtk)))
114f02ba
AS
2378 (propagated-inputs
2379 `(("glib-networking" ,glib-networking)
2380 ("gssettings-desktop-schemas" ,gsettings-desktop-schemas)))
48eb71ae 2381 (arguments
114f02ba
AS
2382 `(#:modules ((guix build gnu-build-system)
2383 (guix build utils)
2384 (ice-9 popen)
2385 (ice-9 rdelim)
2386 (ice-9 regex)
2387 (ice-9 ftw)
2388 (srfi srfi-26))
2389 #:phases
48eb71ae
JN
2390 (modify-phases %standard-phases
2391 (add-before 'configure 'setenv
2392 (lambda _
2393 (setenv "GUILE_AUTO_COMPILE" "0")
114f02ba
AS
2394 #t))
2395 (add-after 'install 'wrap-binaries
2396 (lambda* (#:key inputs outputs #:allow-other-keys)
2397 (let* ((out (assoc-ref outputs "out"))
2398 (effective (read-line
2399 (open-pipe* OPEN_READ
2400 "guile" "-c"
2401 "(display (effective-version))")))
2402 (deps (map (cut assoc-ref inputs <>)
2403 '("guile-lib" "guile-readline")))
2404 (scm-path (map (cut string-append <> "/share/guile/site/"
2405 effective) `(,out ,@deps)))
2406 (go-path (map (cut string-append <> "/lib/guile/" effective
2407 "/site-ccache/") `(,out ,@deps)))
2408 (examples (filter (cut string-match "emacsy" <>)
2409 (scandir (string-append out "/bin/"))))
2410 (progs (map (cut string-append out "/bin/" <>)
2411 examples)))
2412 (map (cut wrap-program <>
2413 `("GUILE_LOAD_PATH" ":" prefix ,scm-path)
2414 `("GUILE_LOAD_COMPILED_PATH" ":" prefix ,go-path))
2415 progs)
2416 #t))))))
48eb71ae
JN
2417 (home-page "https://savannah.nongnu.org/projects/emacsy")
2418 (synopsis "Embeddable GNU Emacs-like library using Guile")
2419 (description
2420 "Emacsy is an embeddable Emacs-like library that uses GNU Guile
f0de9544
JN
2421as extension language. Emacsy can give a C program an Emacsy feel with
2422keymaps, minibuffer, recordable macros, history, tab completion, major
2423and minor modes, etc., and can also be used as a pure Guile library. It
48eb71ae
JN
2424comes with a simple counter example using FreeGLUT and browser examples
2425in C using Gtk+-3 and WebKitGtk.")
2426 (license license:gpl3+)))
2135610c 2427
c99f32b9
AS
2428(define-public emacsy-minimal
2429 (let ((commit "f3bf0dbd803d7805b6ae8303253507ad13922293"))
2430 (package
2431 (inherit emacsy)
2432 (name "emacsy-minimal")
2433 (version (git-version "v0.4.1" "19" commit))
2434 (source (origin
2435 (method git-fetch)
2436 (uri (git-reference
2437 (url "https://git.savannah.gnu.org/git/emacsy.git")
2438 (commit commit)))
2439 (file-name (git-file-name name version))
2440 (sha256
2441 (base32
2442 "0ivy28km1p7nlrf63xx3hvrpxf5ld5amk1wcan3k7sqv1kq9mqdb"))))
2443 (build-system gnu-build-system)
2444 (inputs
2445 `(("guile" ,guile-2.2)
2446 ("guile-lib" ,guile-lib)
2447 ("guile-readline" ,guile-readline)))
2448 (propagated-inputs '())
2449 (arguments
2450 `(#:configure-flags '("--without-examples")
2451 #:phases
2452 (modify-phases %standard-phases
2453 (add-before 'configure 'setenv
2454 (lambda _
2455 (setenv "GUILE_AUTO_COMPILE" "0")
2456 #t))))))))
2457
2135610c
LC
2458(define-public guile-jpeg
2459 (let ((commit "6a1673578b297c2c1b28e44a76bd5c49e76a5046")
2460 (revision "0"))
2461 (package
2462 (name "guile-jpeg")
2463 (version (git-version "0.0" revision commit))
2464 (home-page "https://gitlab.com/wingo/guile-jpeg")
2465 (source (origin
2466 (method git-fetch)
2467 (uri (git-reference (url home-page)
2468 (commit commit)))
2469 (sha256
2470 (base32
2471 "05z9m408w3h6aqb5k3r3qa7khir0k10rxwvsrzhkcq1hr5vbmr4m"))
2472 (file-name (git-file-name name version))
2473 (modules '((guix build utils)))
2474 (snippet
2475 '(begin
2476 ;; Install .go files in the right place.
2477 (substitute* "Makefile.am"
2478 (("/ccache") "/site-ccache"))
2479 #t))))
2480 (build-system gnu-build-system)
2481 (native-inputs
2482 `(("autoconf" ,autoconf)
2483 ("automake" ,automake)
2484 ("pkg-config" ,pkg-config)
2485 ("guile" ,guile-2.2)))
2486 (synopsis "JPEG file parsing library for Guile")
2487 (description
2488 "Guile-JPEG is a Scheme library to parse JPEG image files and to
2489perform geometrical transforms on JPEG images.")
2490 (license license:gpl3+))))
e8c2da41
AS
2491
2492(define-public nomad
2493 (package
2494 (name "nomad")
2495 (version "0.1.1-alpha")
2496 (source (origin
2497 (method git-fetch)
2498 (uri (git-reference
2499 (url "https://git.savannah.gnu.org/git/nomad.git")
2500 (commit version)))
2501 (file-name (git-file-name name version))
2502 (sha256
2503 (base32
2504 "0abz07hl5dh802ciy71xzkvkhyryypq1i94wna40a2wndbd73f7z"))))
2505 (build-system gnu-build-system)
2506 (native-inputs
2507 `(("autoconf" ,autoconf)
2508 ("automake" ,automake)
2509 ("bash" ,bash)
2510 ("pkg-config" ,pkg-config)
2511 ("libtool" ,libtool)
2512 ("guile" ,guile-2.2)
2513 ("glib:bin" ,glib "bin")))
2514 (inputs
2515 `(("guile" ,guile-2.2)
2516 ("guile-lib" ,guile-lib)
2517 ("guile-gcrypt" ,guile-gcrypt)
2518 ("guile-readline" ,guile-readline)
2519 ("gnutls" ,gnutls)
2520 ("shroud" ,shroud)
2521 ("emacsy" ,emacsy-minimal)
2522 ("glib" ,glib)
2523 ("dbus-glib" ,dbus-glib)
2524 ("gtk+" ,gtk+)
2525 ("gtksourceview" ,gtksourceview)
2526 ("webkitgtk" ,webkitgtk)
2527 ("xorg-server" ,xorg-server)))
2528 (propagated-inputs
2529 `(("glib" ,glib)
2530 ("glib-networking" ,glib-networking)
2531 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)))
2532 (arguments
2533 `(#:modules ((guix build gnu-build-system)
2534 (guix build utils)
2535 (ice-9 popen)
2536 (ice-9 rdelim)
2537 (srfi srfi-26))
2538 #:phases
2539 (modify-phases %standard-phases
2540 (add-before 'check 'start-xorg-server
2541 (lambda* (#:key inputs #:allow-other-keys)
2542 ;; The test suite requires a running X server.
2543 (system (format #f "~a/bin/Xvfb :1 &"
2544 (assoc-ref inputs "xorg-server")))
2545 (setenv "DISPLAY" ":1")
2546 #t))
2547 (add-after 'install 'wrap-binaries
2548 (lambda* (#:key inputs outputs #:allow-other-keys)
2549 (let* ((out (assoc-ref outputs "out"))
2550 (gio-deps (map (cut assoc-ref inputs <>) '("glib-networking"
2551 "glib")))
2552 (gio-mod-path (map (cut string-append <> "/lib/gio/modules")
2553 gio-deps))
2554 (effective (read-line (open-pipe*
2555 OPEN_READ
2556 "guile" "-c"
2557 "(display (effective-version))")))
2558 (deps (map (cut assoc-ref inputs <>)
2559 '("emacsy" "guile-lib" "guile-readline"
2560 "shroud")))
2561 (scm-path (map (cut string-append <>
2562 "/share/guile/site/" effective)
2563 `(,out ,@deps)))
2564 (go-path (map (cut string-append <>
2565 "/lib/guile/" effective "/site-ccache")
2566 `(,out ,@deps)))
2567 (progs (map (cut string-append out "/bin/" <>)
2568 '("nomad"))))
2569 (map (cut wrap-program <>
2570 `("GIO_EXTRA_MODULES" ":" prefix ,gio-mod-path)
2571 `("GUILE_LOAD_PATH" ":" prefix ,scm-path)
2572 `("GUILE_LOAD_COMPILED_PATH" ":"
2573 prefix ,go-path))
2574 progs)
2575 #t))))))
2576 (home-page "https://savannah.nongnu.org/projects/nomad/")
2577 (synopsis "Extensible Web Browser in Guile Scheme")
2578 (description "Nomad is an Emacs-like Web Browser built using Webkitgtk and
2579Emacsy. It has a small C layer and most browser features are fully
2580programmable in Guile. It has hooks, keymaps, and self documentation
2581features.")
2582 (license license:gpl3+)))
248965c9
RW
2583
2584(define-public guile-cv
2585 (package
2586 (name "guile-cv")
2587 (version "0.2.1")
2588 (source (origin
2589 (method url-fetch)
2590 (uri (string-append "mirror://gnu/guile-cv/guile-cv-"
2591 version ".tar.gz"))
2592 (sha256
2593 (base32
2594 "0qdf0s2h1xj5lbhnc1pfw69i3zg08pqy2y6869b92ydfis8r82j9"))))
2595 (build-system gnu-build-system)
2596 (arguments
2597 `(#:phases
2598 (modify-phases %standard-phases
2599 (add-after 'unpack 'prepare-build
2600 (lambda* (#:key inputs outputs #:allow-other-keys)
2601 (substitute* "configure"
2602 (("SITEDIR=\"\\$datadir/guile-cv\"")
2603 "SITEDIR=\"$datadir/guile/site/$GUILE_EFFECTIVE_VERSION\"")
2604 (("SITECCACHEDIR=\"\\$libdir/guile-cv/")
2605 "SITECCACHEDIR=\"$libdir/"))
2606 (substitute* "cv/init.scm"
2607 (("\\(dynamic-link \"libvigra_c\"\\)")
2608 (string-append "(dynamic-link \""
2609 (assoc-ref inputs "vigra-c")
2610 "/lib/libvigra_c\")"))
2611 (("\\(dynamic-link \"libguile-cv\"\\)")
2612 (format #f "~s"
2613 `(dynamic-link
2614 (format #f "~alibguile-cv"
2615 (if (getenv "GUILE_CV_UNINSTALLED")
2616 ""
2617 ,(format #f "~a/lib/"
2618 (assoc-ref outputs "out"))))))))
2619 (setenv "GUILE_CV_UNINSTALLED" "1")
2620 ;; Only needed to satisfy the configure script.
2621 (setenv "LD_LIBRARY_PATH"
2622 (string-append (assoc-ref inputs "vigra-c") "/lib"))
2623 #t)))))
2624 (inputs
2625 `(("vigra" ,vigra)
2626 ("vigra-c" ,vigra-c)
2627 ("guile" ,guile-2.2)))
2628 (native-inputs
2629 `(("texlive" ,(texlive-union (list texlive-booktabs
2630 texlive-lm
2631 texlive-siunitx
2632 texlive-standalone
2633 texlive-xcolor
2634 texlive-fonts-iwona)))
2635 ("pkg-config" ,pkg-config)))
2636 (propagated-inputs
2637 `(("guile-lib" ,guile-lib)))
2638 (home-page "https://www.gnu.org/software/guile-cv/")
2639 (synopsis "Computer vision library for Guile")
2640 (description "Guile-CV is a Computer Vision functional programming library
2641for the Guile Scheme language. It is based on Vigra (Vision with Generic
2642Algorithms), a C++ image processing and analysis library. Guile-CV contains
2643bindings to Vigra C (a C wrapper to most of the Vigra functionality) and is
2644enriched with pure Guile Scheme algorithms, all accessible through a nice,
2645clean and easy to use high level API.")
2646 (license license:gpl3+)))
7ff157c1
RW
2647
2648(define-public guile-ffi-fftw
353fb48f
RW
2649 (let ((commit "294ad9e7491dcb40026d2fec9be2af05263be1c0")
2650 (revision "2"))
7ff157c1
RW
2651 (package
2652 (name "guile-ffi-fftw")
2653 (version (git-version "0" revision commit))
2654 (source (origin
2655 (method git-fetch)
2656 (uri (git-reference
2657 (url "https://github.com/lloda/guile-ffi-fftw.git")
2658 (commit commit)))
2659 (file-name (git-file-name "guile-ffi-fftw" version))
2660 (sha256
2661 (base32
353fb48f 2662 "08j40a5p6a8pgvhffmzb5rfdnrav2mksy3gfjkdqy93jfj1z5afg"))))
7ff157c1
RW
2663 (build-system guile-build-system)
2664 (arguments
2665 `(#:source-directory "mod"
2666 #:phases
2667 (modify-phases %standard-phases
2668 (add-after 'unpack 'prepare-build
2669 (lambda* (#:key inputs #:allow-other-keys)
2670 (substitute* "mod/ffi/fftw.scm"
2671 (("\\(getenv \"GUILE_FFI_FFTW_LIBFFTW3_PATH\"\\)")
2672 (format #f "\"~a/lib\"" (assoc-ref inputs "fftw"))))
2673 #t))
2674 (add-after 'build 'check
2675 (lambda _
2676 (invoke "guile" "-L" "mod"
2677 "-s" "test/test-ffi-fftw.scm"))))))
2678 (inputs
2679 `(("fftw" ,fftw)
2680 ("guile" ,guile-2.2)))
2681 (home-page "https://github.com/lloda/guile-ffi-fftw/")
2682 (synopsis "Access FFTW through Guile's FFI")
2683 (description "This is a minimal set of Guile FFI bindings for the FFTW
2684library's ‘guru interface’. It provides two functions: @code{fftw-dft! rank
2685sign in out} and @code{fftw-dft rank sign in}. These bindings being minimal,
2686there is no support for computing & reusing plans, or split r/i transforms, or
2687anything other than straight complex DFTs.")
353fb48f 2688 (license license:lgpl3+))))
f9ec89f4
TS
2689
2690(define-public srfi-64-driver
2691 (package
2692 (name "srfi-64-driver")
2693 (version "0.1")
2694 (source (origin
2695 (method url-fetch)
2696 (uri (string-append "https://files.ngyro.com/srfi-64-driver/"
2697 "srfi-64-driver-" version ".tar.gz"))
2698 (sha256
2699 (base32
2700 "188b6mb7sjjg0a8zldikinglf40ky8mg8rwh5768gjmch6gkk3ph"))))
2701 (build-system gnu-build-system)
2702 (arguments
2703 `(#:tests? #f
2704 #:phases
2705 (modify-phases %standard-phases
2706 (delete 'build))))
2707 (native-inputs
2708 `(("pkg-config" ,pkg-config)))
2709 (inputs
2710 `(("guile" ,guile-2.2)))
2711 (home-page "https://ngyro.com/software/srfi-64-driver.html")
2712 (synopsis "Automake test driver for SRFI 64 test suites")
2713 (description "This package provides an Automake test driver that can
2714run SRFI 64 test suites. It gives Automake insight into the individual
2715tests being run, resulting clearer and more specific output.")
2716 (license license:gpl3+)))
f6bf4b2c
TS
2717
2718(define-public guile-semver
2719 (package
2720 (name "guile-semver")
2721 (version "0.1.0")
2722 (source (origin
2723 (method url-fetch)
2724 (uri (string-append "https://files.ngyro.com/guile-semver/"
2725 "guile-semver-" version ".tar.gz"))
2726 (sha256
2727 (base32
2728 "06b66rj7nyhr6i3dpkwvfw1xb10w2pngrsw2hxfxkznwsbh9byfz"))))
2729 (build-system gnu-build-system)
2730 (native-inputs
2731 `(("pkg-config" ,pkg-config)
2732 ("srfi-64-driver" ,srfi-64-driver)))
2733 (inputs
2734 `(("guile" ,guile-2.2)))
2735 (home-page "https://ngyro.com/software/guile-semver.html")
2736 (synopsis "Semantic Versioning (SemVer) for Guile")
2737 (description "This Guile library provides tools for reading,
2738comparing, and writing Semantic Versions. It also includes ranges in
2739the style of the Node Package Manager (NPM).")
2740 (license license:gpl3+)))