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