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