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