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