gnu: r-genomicinteractions: Update to 1.20.1.
[jackhill/guix/guix.git] / gnu / packages / guile-xyz.scm
CommitLineData
0791437f 1;;; GNU Guix --- Functional package management for GNU
f918a8d9 2;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
0791437f
RW
3;;; Copyright © 2014, 2015, 2018 Mark H Weaver <mhw@netris.org>
4;;; Copyright © 2015, 2017 Christopher Allan Webber <cwebber@dustycloud.org>
5;;; Copyright © 2016 Alex Sassmannshausen <alex@pompo.co>
195e1c1b 6;;; Copyright © 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
0791437f 7;;; Copyright © 2016 Erik Edrosa <erik.edrosa@gmail.com>
f61f424d 8;;; Copyright © 2016, 2019 Eraim Flashner <efraim@flashner.co.il>
0791437f
RW
9;;; Copyright © 2016, 2017 Alex Kost <alezost@gmail.com>
10;;; Copyright © 2016, 2017 Adonay "adfeno" Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno@openmailbox.org>
11;;; Copyright © 2016 Amirouche <amirouche@hypermove.net>
bdf2dd79 12;;; Copyright © 2016, 2019 Jan Nieuwenhuizen <janneke@gnu.org>
0791437f
RW
13;;; Copyright © 2017 Andy Wingo <wingo@igalia.com>
14;;; Copyright © 2017 David Thompson <davet@gnu.org>
a3246602 15;;; Copyright © 2017, 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
0791437f 16;;; Copyright © 2017 Theodoros Foradis <theodoros@foradis.org>
47956fa0 17;;; Copyright © 2017 ng0 <ng0@n0.is>
0791437f
RW
18;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
19;;; Copyright © 2018 Maxim Cournoyer <maxim.cournoyer@gmail.com>
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")
f975f82d 421 (version "0.1.3")
0791437f
RW
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
f975f82d 429 "08gaqrgjlly9k5si72vvpbr4xhq5v52l5ma5y6a7spid5dd057cy"))))
0791437f
RW
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
77c95ee6
RW
770(define-public guile3.0-pfds
771 (package
772 (inherit guile-pfds)
773 (name "guile3.0-pfds")
774 (native-inputs `(("guile" ,guile-3.0)))
775 (arguments
0dd1e277
RW
776 (substitute-keyword-arguments (package-arguments guile-pfds)
777 ((#:phases phases)
778 `(modify-phases ,phases
779 (add-after 'unpack 'work-around-guile-bug
780 (lambda _
781 ;; See bug #39210.
782 (substitute* '("fingertrees.sls"
783 "queues/private/condition.sls"
784 "deques/private/condition.sls")
785 (("&assertion") "&violation"))
786 #t))))))))
77c95ee6 787
0791437f
RW
788(define-public guile-aa-tree
789 (package
790 (name "guile-aa-tree")
791 (version "3.1.1")
792 (source (origin
793 (method url-fetch)
794 (uri (string-append "mirror://savannah/guile-aa-tree/guile-aa-tree-"
795 version ".tar.gz"))
796 (sha256
797 (base32
798 "0044c105r3q9vpl17pv3phl1b79kjm1llhkakqgiasixyav01blh"))))
799 (build-system guile-build-system)
800 (native-inputs `(("guile" ,guile-2.2)))
801 ;; https://savannah.nongnu.org/projects/guile-aa-tree
802 (home-page "https://qlfiles.net/guile-aa-tree/")
803 (synopsis "AA tree data structure for Guile")
804 (description
805 "This package provides an implementation of @dfn{AA trees}, a
806self-balancing binary tree data structure, for Guile. It ensure @math{O(log
807n)} worst case performance for core operations. The module provides
808non-mutating insert, delete, and search operations, with support for
809convenient nested tree operations.")
810 (license license:gpl3+)))
811
812(define-public guile-simple-zmq
813 (let ((commit "68bedb6679716214fb9d3472da57544526f7a618")
814 (revision "3"))
815 (package
816 (name "guile-simple-zmq")
817 (version (git-version "0.0.0" revision commit))
818 (source
819 (origin
820 (method git-fetch)
821 (uri (git-reference
822 (url "https://github.com/jerry40/guile-simple-zmq")
823 (commit commit)))
824 (sha256
825 (base32
826 "1ad3xg69qqviy1f6dnlw0ysmfdbmp1jq65rfqb8nfd8dsrq2syli"))
827 (file-name (git-file-name name version))))
828 (build-system guile-build-system)
829 (arguments
830 `(#:source-directory "src"
831 #:phases (modify-phases %standard-phases
832 (add-after 'unpack 'set-libzmq-file-name
833 (lambda* (#:key inputs #:allow-other-keys)
834 (substitute* "src/simple-zmq.scm"
835 (("\\(dynamic-link \"libzmq\"\\)")
836 (format #f "(dynamic-link \"~a/lib/libzmq.so\")"
837 (assoc-ref inputs "zeromq"))))
838 #t)))))
839 (native-inputs
840 `(("guile" ,guile-2.2)))
841 (inputs
842 `(("zeromq" ,zeromq)))
843 (home-page "https://github.com/jerry40/guile-simple-zmq")
844 (synopsis "Guile wrapper over ZeroMQ library")
845 (description
846 "This package provides a Guile programming interface to the ZeroMQ
847messaging library.")
848 (license license:gpl3+))))
849
015bb1c8
LC
850(define-public guile3.0-simple-zmq
851 (package
852 (inherit guile-simple-zmq)
853 (name "guile3.0-simple-zmq")
854 (native-inputs `(("guile" ,guile-next)))))
855
0791437f
RW
856(define-public jupyter-guile-kernel
857 (let ((commit "a7db9245a886e104138474df46c3e88b95cff629")
858 (revision "1"))
859 (package
860 (name "jupyter-guile-kernel")
861 (version (git-version "0.0.0" revision commit))
862 (source
863 (origin
864 (method git-fetch)
865 (uri (git-reference
866 (url "https://github.com/jerry40/guile-kernel")
867 (commit commit)))
f1d4d79f 868 (file-name (git-file-name name version))
0791437f
RW
869 (sha256
870 (base32
871 "0aj04853bqm47ivfcmrgpb7w3wkis847kc7qrwsa5zcn9h38qh2f"))))
872 (build-system guile-build-system)
873 (arguments
874 '(#:phases (modify-phases %standard-phases
875 (add-after 'unpack 'set-openssl-file-name
876 (lambda* (#:key inputs #:allow-other-keys)
877 ;; Record the absolute file name of the 'openssl'
878 ;; command.
879 (substitute* "src/hmac.scm"
880 (("openssl")
881 (string-append (assoc-ref inputs "openssl")
882 "/bin/openssl")))
883 #t))
884
885 ;; XXX: The code uses 'include' to include its own source
886 ;; files, and "-L src" isn't enough in this case.
887 (add-before 'build 'chdir
888 (lambda _ (chdir "src") #t))
889 (add-after 'build 'chdir-back
890 (lambda _ (chdir "..") #t))
891
892 (add-after 'install 'install-kernel
893 (lambda* (#:key inputs outputs #:allow-other-keys)
894 (let* ((out (assoc-ref outputs "out"))
895 (json (assoc-ref inputs "guile-json"))
896 (zmq (assoc-ref inputs "guile-simple-zmq"))
897 (deps (list json zmq))
898 (dir (string-append
899 out "/share/jupyter/kernels/guile"))
900 (effective (target-guile-effective-version)))
901 ;; Install kernel.
902 (install-file "src/kernel.json" dir)
903
904 ;; Fix hard-coded file name in the kernel.
905 (substitute* (string-append dir "/kernel.json")
906 (("/home/.*/guile-jupyter-kernel.scm")
907 (string-append out "/share/guile/site/"
908 (target-guile-effective-version)
909 "/guile-jupyter-kernel.scm"))
910 (("\"guile\"")
911 (string-append "\"" (assoc-ref inputs "guile")
912 "/bin/guile\""))
913 (("-s")
914 ;; Add '-L' and '-C' flags so that the kernel
915 ;; finds its dependencies.
916 (let ((-L (map (lambda (item)
917 (string-append "\"" item
918 "/share/guile/site/"
919 effective "\""))
920 deps))
921 (-C (map (lambda (item)
922 (string-append "\"" item
923 "/lib/guile/"
924 effective
925 "/site-ccache\""))
926 deps)))
927 (string-append "--no-auto-compile\""
928 (string-join -L ", \"-L\", "
929 'prefix)
930 (string-join -C ", \"-C\", "
931 'prefix)
932 ", \"-s"))))
933 #t))))))
934 (inputs
935 `(("openssl" ,openssl)
936 ("guile" ,guile-2.2)
91f55717 937 ("guile-json" ,guile-json-1)
0791437f
RW
938 ("guile-simple-zmq" ,guile-simple-zmq)))
939 (synopsis "Guile kernel for the Jupyter Notebook")
940 (description
941 "This package provides a Guile 2.x kernel for the Jupyter Notebook. It
942allows users to interact with the Guile REPL through Jupyter.")
943 (home-page "https://github.com/jerry40/guile-kernel")
944 (license license:gpl3+))))
945
946(define-public guile-sparql
947 (package
948 (name "guile-sparql")
949 (version "0.0.7")
950 (source (origin
951 (method url-fetch)
952 (uri (string-append
953 "https://github.com/roelj/guile-sparql/releases/download/"
954 version "/guile-sparql-" version ".tar.gz"))
955 (sha256
956 (base32 "1drnvhsgl0gc5crmb16yyw1j98nkhwwcgssv9vgm36ng43nnzffd"))))
957 (build-system gnu-build-system)
958 (arguments `(#:tests? #f)) ; There are no tests.
959 (native-inputs
960 `(("pkg-config" ,pkg-config)))
961 (inputs
962 `(("guile" ,guile-2.2)))
963 (home-page "https://github.com/roelj/guile-sparql")
964 (synopsis "SPARQL module for Guile")
965 (description "This package provides the functionality to query a SPARQL
966endpoint. Additionally, it provides an interface to write SPARQL queries
967using S-expressions.")
968 (license license:gpl3+)))
969
970(define-public guile-debbugs
971 (package
972 (name "guile-debbugs")
973 (version "0.0.2")
974 (source (origin
975 (method url-fetch)
976 (uri (string-append "mirror://gnu/guile-debbugs/guile-debbugs-"
977 version ".tar.gz"))
978 (sha256
979 (base32
980 "16l8910p57im6s3j93xhdaqvgfy6ms5n97177mrch3y961z5hy0i"))
981 (modules '((guix build utils)))
982 (snippet
983 '(substitute* "Makefile.in"
984 (("^godir = (.*)/ccache" _ prefix)
985 (string-append "godir = " prefix "/site-ccache"))))))
986 (build-system gnu-build-system)
987 (native-inputs
988 `(("guile" ,guile-2.2)
989 ("pkg-config" ,pkg-config)))
990 (home-page "https://savannah.gnu.org/projects/guile-debbugs/")
991 (synopsis "Guile interface to the Debbugs bug tracking service")
992 (description
993 "This package provides a Guile library to communicate with a Debbugs bug
994tracker's SOAP service, such as @url{https://bugs.gnu.org}.")
995 (license license:gpl3+)))
996
997(define-public guile-email
50771f5b
AI
998 (package
999 (name "guile-email")
223cb7c6 1000 (version "0.2.2")
50771f5b
AI
1001 (source
1002 (origin
1003 (method url-fetch)
1004 (uri (string-append
db18d87a
AI
1005 "https://guile-email.systemreboot.net/releases/guile-email-"
1006 version ".tar.lz"))
50771f5b
AI
1007 (sha256
1008 (base32
223cb7c6 1009 "1rc8r0fgvflnyq5ckl7ii8sghpsgpkzxa8vskjr1ak2kyar6m35k"))))
50771f5b
AI
1010 (build-system gnu-build-system)
1011 (native-inputs
1012 `(("pkg-config" ,pkg-config)
db18d87a 1013 ("lzip" ,lzip)))
50771f5b
AI
1014 (inputs
1015 `(("guile" ,guile-2.2)))
db18d87a 1016 (arguments
2c33a849 1017 '(#:make-flags '("GUILE_AUTO_COMPILE=0"))) ; to prevent guild warnings
db18d87a 1018 (home-page "https://guile-email.systemreboot.net")
50771f5b 1019 (synopsis "Guile email parser")
db18d87a
AI
1020 (description "guile-email is a collection of email utilities implemented
1021in pure guile. It supports parsing MIME (Multipurpose Internet Mail
1022Extensions) compliant email messages and reading emails from the mbox
1023format.")
50771f5b 1024 (license license:agpl3+)))
0791437f
RW
1025
1026(define-public guile-debbugs-next
014c3012
RW
1027 (let ((commit "fb0ae064037a38a0d526e08b4ad24c52e205edb9")
1028 (revision "2"))
0791437f
RW
1029 (package (inherit guile-debbugs)
1030 (name "guile-debbugs")
1031 (version (git-version "0.0.3" revision commit))
1032 (source (origin
1033 (method git-fetch)
1034 (uri (git-reference
1035 (url "https://git.savannah.gnu.org/git/guile-debbugs.git")
1036 (commit commit)))
1037 (file-name (git-file-name name version))
1038 (sha256
1039 (base32
014c3012 1040 "195sacx2xc1mzzfljj62nfpi8mxn0rc6dabxckizjksnhb5irfwy"))))
0791437f
RW
1041 (build-system gnu-build-system)
1042 (native-inputs
1043 `(("pkg-config" ,pkg-config)
1044 ("autoconf" ,autoconf)
1045 ("automake" ,automake)
1046 ("texinfo" ,texinfo)))
1047 (inputs
1048 `(("guile" ,guile-2.2)
1049 ("guile-email" ,guile-email))))))
1050
0791437f 1051(define-public guile-newt
442a11f6
MO
1052 (package
1053 (name "guile-newt")
1054 (version "0.0.1")
1055 (source (origin
1056 (method git-fetch)
1057 (uri (git-reference
1058 (url "https://gitlab.com/mothacehe/guile-newt")
1059 (commit version)))
1060 (file-name (git-file-name name version))
1061 (sha256
1062 (base32
e7fc7746
LC
1063 "1w7qy4dw1f4bx622l6hw8mv49sf1ha8kch8j4nganyk8fj0wn695"))
1064 (modules '((guix build utils)))
1065 (snippet
1066 '(begin
1067 ;; Allow builds with Guile 3.0.
1068 (substitute* "configure.ac"
1069 (("^GUILE_PKG.*")
1070 "GUILE_PKG([3.0 2.2 2.0])\n"))
1071
1072 ;; Remove "guile.m4" since it contains an obsolete version
1073 ;; of 'GUILE_PKG' that doesn't work with development
1074 ;; versions such as 2.9.
1075 (delete-file "m4/guile.m4")
1076 #t))))
442a11f6
MO
1077 (build-system gnu-build-system)
1078 (arguments
1079 '(#:make-flags
1080 '("GUILE_AUTO_COMPILE=0"))) ;to prevent guild warnings
1081 (inputs
1082 `(("guile" ,guile-2.2)
1083 ("newt" ,newt)))
1084 (native-inputs
1085 `(("autoconf" ,autoconf)
1086 ("automake" ,automake)
1087 ("pkg-config" ,pkg-config)))
1088 (synopsis "Guile bindings to Newt")
1089 (description
1090 "This package provides bindings for Newt, a programming library for
0791437f
RW
1091color text mode, widget based user interfaces. The bindings are written in pure
1092Scheme by using Guile’s foreign function interface.")
442a11f6
MO
1093 (home-page "https://gitlab.com/mothacehe/guile-newt")
1094 (license license:gpl3+)))
0791437f 1095
e7fc7746
LC
1096(define-public guile3.0-newt
1097 (package
1098 (inherit guile-newt)
1099 (name "guile3.0-newt")
1100 (inputs `(("guile" ,guile-next)
1101 ,@(alist-delete "guile" (package-inputs guile-newt))))))
1102
0791437f
RW
1103(define-public guile-mastodon
1104 (package
1105 (name "guile-mastodon")
1106 (version "0.0.1")
1107 (source (origin
1108 (method git-fetch)
1109 (uri (git-reference
1110 (url "https://framagit.org/prouby/guile-mastodon.git")
1111 (commit (string-append "v" version))))
1112 (file-name (git-file-name name version))
1113 (sha256
1114 (base32
1115 "1vblf3d1bbwna3l09p2ap5y8ycvl549bz6whgk78imyfmn28ygry"))))
1116 (build-system gnu-build-system)
1117 (native-inputs
1118 `(("autoconf" ,autoconf)
1119 ("automake" ,automake)
1120 ("pkg-config" ,pkg-config)))
1121 (inputs
1122 `(("guile" ,guile-2.2)
1123 ("gnutls" ,gnutls)
91f55717 1124 ("guile-json" ,guile-json-1)))
0791437f
RW
1125 (home-page "https://framagit.org/prouby/guile-mastodon")
1126 (synopsis "Guile Mastodon REST API module")
1127 (description "This package provides Guile modules to access the
1128@uref{https://docs.joinmastodon.org/api/, REST API of Mastodon}, a federated
1129microblogging service.")
1130 (license license:gpl3+)))
1131
0791437f 1132(define-public guile-parted
dbcd503c
MO
1133 (package
1134 (name "guile-parted")
a3246602 1135 (version "0.0.2")
dbcd503c
MO
1136 (source (origin
1137 (method git-fetch)
1138 (uri (git-reference
1139 (url "https://gitlab.com/mothacehe/guile-parted")
1140 (commit version)))
1141 (file-name (git-file-name name version))
1142 (sha256
1143 (base32
e5b95558
LC
1144 "01qmv6xnbbq3wih0dl9bscvca2d7zx7bjiqf35y6dkaqsp8nvdxf"))
1145 (modules '((guix build utils)))
1146 (snippet
1147 '(begin
1148 ;; Allow builds with Guile 3.0.
1149 (substitute* "configure.ac"
1150 (("^GUILE_PKG.*")
1151 "GUILE_PKG([3.0 2.2 2.0])\n"))
1152
1153 ;; Remove "guile.m4" since it contains an obsolete version
1154 ;; of 'GUILE_PKG' that doesn't work with development
1155 ;; versions such as 2.9.
1156 (delete-file "m4/guile.m4")
1157 #t))))
dbcd503c
MO
1158 (build-system gnu-build-system)
1159 (arguments
1160 '(#:make-flags
1161 '("GUILE_AUTO_COMPILE=0"))) ;to prevent guild warnings
1162 (inputs
1163 `(("guile" ,guile-2.2)
1164 ("parted" ,parted)))
1165 (propagated-inputs
1166 `(("guile-bytestructures" ,guile-bytestructures)))
1167 (native-inputs
1168 `(("autoconf" ,autoconf)
1169 ("automake" ,automake)
1170 ("pkg-config" ,pkg-config)))
1171 (synopsis "Guile bindings to GNU Parted")
1172 (description
1173 "This package provides bindings for GNU Parted library, a C library
1174allowing disk partition tables creation and manipulation. The bindings are
0791437f 1175written in pure Scheme by using Guile's foreign function interface.")
dbcd503c
MO
1176 (home-page "https://gitlab.com/mothacehe/guile-parted")
1177 (license license:gpl3+)))
0791437f 1178
e5b95558
LC
1179(define-public guile3.0-parted
1180 (package
1181 (inherit guile-parted)
1182 (name "guile3.0-parted")
1183 (inputs `(("guile" ,guile-next)
1184 ,@(alist-delete "guile" (package-inputs guile-parted))))
1185 (propagated-inputs
1186 `(("guile-bytestructures" ,guile3.0-bytestructures)))))
1187
0791437f
RW
1188(define-public guile-xosd
1189 (package
1190 (name "guile-xosd")
1191 (version "0.2.1")
1192 (source (origin
1193 (method url-fetch)
1194 (uri (string-append "https://github.com/alezost/" name
1195 "/releases/download/v" version
1196 "/" name "-" version ".tar.gz"))
1197 (sha256
1198 (base32
1199 "1ri5065c16kmgrf2pysn2ymxjqi5302lhpb07wkl1jr75ym8fn8p"))))
1200 (build-system gnu-build-system)
1201 (native-inputs
1202 `(("pkg-config" ,pkg-config)))
1203 (inputs
1204 `(("guile" ,guile-2.2)
1205 ("libx11" ,libx11)
1206 ("libxext" ,libxext)
1207 ("libxinerama" ,libxinerama)
1208 ("xosd" ,xosd)))
1209 (home-page "https://github.com/alezost/guile-xosd")
1210 (synopsis "XOSD bindings for Guile")
1211 (description
1212 "Guile-XOSD provides Guile bindings for @code{libxosd},
1213@uref{http://sourceforge.net/projects/libxosd/, the X On Screen Display
1214library}.")
1215 (license license:gpl3+)))
1216
1217(define-public guile-dbi
1218 (package
1219 (name "guile-dbi")
1220 (version "2.1.6")
1221 (source (origin
1222 (method url-fetch)
1223 (uri (string-append
1224 "http://download.gna.org/guile-dbi/guile-dbi-"
1225 version ".tar.gz"))
1226 (sha256
1227 (base32
1228 "116njrprhgrsv1qm904sp3b02rq01fx639r433d657gyhw3x159n"))))
1229 (build-system gnu-build-system)
1230 (arguments
1231 '(#:configure-flags
1232 (list (string-append
1233 "--with-guile-site-dir=" %output "/share/guile/site/2.2"))
1234 #:make-flags
406ef442
CB
1235 (list (string-append
1236 "LDFLAGS=-Wl,-rpath=" %output "/lib:"
1237 (assoc-ref %build-inputs "guile-dbd-sqlite3") "/lib" ":"
1238 (assoc-ref %build-inputs "guile-dbd-postgresql") "/lib"))
0791437f
RW
1239 #:phases
1240 (modify-phases %standard-phases
1241 (add-after 'install 'patch-extension-path
1242 (lambda* (#:key outputs #:allow-other-keys)
1243 (let* ((out (assoc-ref outputs "out"))
1244 (dbi.scm (string-append
1245 out "/share/guile/site/2.2/dbi/dbi.scm"))
1246 (ext (string-append out "/lib/libguile-dbi")))
1247 (substitute* dbi.scm (("libguile-dbi") ext))
1248 #t))))))
1249 (inputs
406ef442
CB
1250 `(("guile-dbd-sqlite3" ,guile-dbd-sqlite3)
1251 ("guile-dbd-postgresql" ,guile-dbd-postgresql))) ; only shared library, no scheme files
0791437f
RW
1252 (propagated-inputs
1253 `(("guile" ,guile-2.2)))
1254 (synopsis "Guile database abstraction layer")
1255 (home-page "http://home.gna.org/guile-dbi/guile-dbi.html")
1256 (description
1257 "guile-dbi is a library for Guile that provides a convenient interface to
1258SQL databases. Database programming with guile-dbi is generic in that the same
1259programming interface is presented regardless of which database system is used.
1260It currently supports MySQL, Postgres and SQLite3.")
1261 (license license:gpl2+)))
1262
1263(define guile-dbi-bootstrap
1264 (package
1265 (inherit guile-dbi)
1266 (name "guile-dbi-bootstrap")
1267 (inputs '())
1268 (arguments
1269 (substitute-keyword-arguments (package-arguments guile-dbi)
1270 ((#:make-flags _) '(list))))))
1271
1272(define-public guile-dbd-sqlite3
1273 (package
1274 (name "guile-dbd-sqlite3")
1275 (version "2.1.6")
1276 (source (origin
1277 (method url-fetch)
1278 (uri (string-append
1279 "http://download.gna.org/guile-dbi/guile-dbd-sqlite3-"
1280 version ".tar.gz"))
1281 (sha256
1282 (base32
1283 "0rg71jchxd2y8x496s8zmfmikr5g8zxi8zv2ar3f7a23pph92iw2"))))
1284 (build-system gnu-build-system)
1285 (native-inputs
1286 `(("pkg-config" ,pkg-config)
1287 ("guile-dbi-bootstrap" ,guile-dbi-bootstrap))) ; only required for headers
1288 (inputs
1289 `(("sqlite" ,sqlite)
1290 ("zlib" ,(@ (gnu packages compression) zlib))))
1291 (synopsis "Guile DBI driver for SQLite")
1292 (home-page "https://github.com/jkalbhenn/guile-dbd-sqlite3")
1293 (description
1294 "guile-dbi is a library for Guile that provides a convenient interface to
1295SQL databases. This package implements the interface for SQLite.")
1296 (license license:gpl2+)))
1297
406ef442
CB
1298(define-public guile-dbd-postgresql
1299 (let ((commit "e97589b6b018b206c901e4cc24db463407a4036b")
1300 (revision 0))
1301 (package
1302 (name "guile-dbd-postgresql")
1303 (version (string-append
1304 "2.1.6-" (number->string revision) "." (string-take commit 7)))
1305 (source
1306 (origin
1307 (method git-fetch)
1308 (uri (git-reference
1309 (url "https://github.com/opencog/guile-dbi.git")
1310 (commit commit)))
1311 (file-name (git-file-name name version))
1312 (sha256
1313 (base32 "0n1gv9a0kdys10a4qmnrwvg5sydwb03880asri4gqdchcj3fimni"))))
1314 (build-system gnu-build-system)
1315 (arguments
1316 '(#:phases
1317 (modify-phases %standard-phases
1318 (add-after 'unpack 'chdir
1319 (lambda _
1320 ;; The upstream Git repository contains all the code, so change
1321 ;; to the relevant directory.
1322 (chdir "guile-dbd-postgresql")
1323 #t))
1324 (add-after 'chdir 'patch-src/Makefile.am
1325 (lambda* (#:key inputs #:allow-other-keys)
1326 (substitute* "src/Makefile.am"
1327 (("/usr/include")
1328 (string-append (assoc-ref inputs "postgresql") "/include")))
1329 #t))
1330 (add-after 'patch-src/Makefile.am 'patch-src
1331 (lambda _
1332 (substitute* "src/guile-dbd-postgresql.c"
1333 (("postgresql/libpq-fe\\.h") "libpq-fe.h"))
1334 #t)))))
1335 (native-inputs
1336 `(("pkg-config" ,pkg-config)
1337 ("automake" ,automake)
1338 ("autoconf" ,autoconf)
1339 ("perl" ,perl)
1340 ("libtool" ,libtool)
1341 ("guile-dbi-bootstrap" ,guile-dbi-bootstrap)))
1342 (inputs
1343 `(("postgresql" ,postgresql)
1344 ("zlib" ,zlib)))
1345 (synopsis "Guile DBI driver for PostgreSQL")
1346 (home-page
1347 "https://github.com/opencog/guile-dbi/tree/master/guile-dbd-postgresql")
1348 (description
1349 "@code{guile-dbi} is a library for Guile that provides a convenient
1350interface to SQL databases. This package implements the interface for
1351PostgreSQL.")
1352 (license license:gpl2+))))
1353
0791437f
RW
1354(define-public guile-config
1355 (package
1356 (name "guile-config")
91e29547 1357 (version "0.3.1")
0791437f
RW
1358 (source
1359 (origin
1360 (method git-fetch)
1361 (uri (git-reference
1362 (url "https://gitlab.com/a-sassmannshausen/guile-config")
91e29547
AS
1363 (commit (string-append "v" version))))
1364 (file-name (git-file-name name version))
1365 (sha256 (base32
1366 "0gglsqwpw77gvrqcny8irpqfl7qdf2v8n9ggwrswanxalj4vcbvf"))))
0791437f
RW
1367 (build-system gnu-build-system)
1368 (native-inputs
1369 `(("autoconf" ,autoconf)
1370 ("automake" ,automake)
1371 ("pkg-config" ,pkg-config)
1372 ("texinfo" ,texinfo)))
1373 (inputs `(("guile" ,guile-2.2)))
1374 (synopsis
1375 "Guile application configuration parsing library.")
1376 (description
1377 "Guile Config is a library providing a declarative approach to
1378application configuration specification. The library provides clean
1379configuration declaration forms, and processors that take care of:
1380configuration file creation; configuration file parsing; command-line
1381parameter parsing using getopt-long; basic GNU command-line parameter
1382generation (--help, --usage, --version); automatic output generation for the
1383above command-line parameters.")
1384 (home-page
1385 "https://gitlab.com/a-sassmannshausen/guile-config")
1386 (license license:gpl3+)))
1387
0ac6b836
AS
1388(define-public guile3.0-config
1389 (package
1390 (inherit guile-config)
1391 (name "guile3.0-config")
1392 (inputs `(("guile" ,guile-next)
1393 ,@(alist-delete "guile" (package-inputs guile-config))))))
1394
0791437f
RW
1395(define-public guile-hall
1396 (package
1397 (name "guile-hall")
cfc4e498 1398 (version "0.2.1")
0791437f 1399 (source
feb11b08
RW
1400 (origin
1401 (method git-fetch)
1402 (uri (git-reference
1403 (url "https://gitlab.com/a-sassmannshausen/guile-hall")
1404 (commit (string-append "v" version))))
1405 (file-name (git-file-name name version))
1406 (sha256 (base32
cfc4e498 1407 "0dwx5iyg0dmdf64wq0b4w306bapr86jwnw35npgbjq4cqm8qbzqn"))))
0791437f
RW
1408 (build-system gnu-build-system)
1409 (arguments
63bf0afd
AS
1410 `(#:modules
1411 ((ice-9 match)
1412 (ice-9 ftw)
1413 ,@%gnu-build-system-modules)
1414 #:phases
1415 (modify-phases
1416 %standard-phases
1417 (add-after 'install 'hall-wrap-binaries
1418 (lambda* (#:key inputs outputs #:allow-other-keys)
1419 (let* ((compiled-dir
1420 (lambda (out version)
1421 (string-append
1422 out "/lib/guile/" version "/site-ccache")))
1423 (uncompiled-dir
1424 (lambda (out version)
1425 (string-append
1426 out "/share/guile/site"
1427 (if (string-null? version) "" "/") version)))
1428 (dep-path
1429 (lambda (env modules path)
1430 (list env ":" 'prefix
1431 (cons modules
1432 (map (lambda (input)
1433 (string-append
1434 (assoc-ref inputs input)
1435 path))
1436 ,''("guile-config"))))))
1437 (out (assoc-ref outputs "out"))
1438 (bin (string-append out "/bin/"))
1439 (site (uncompiled-dir out "")))
1440 (match (scandir site)
1441 (("." ".." version)
1442 (for-each
1443 (lambda (file)
1444 (wrap-program
1445 (string-append bin file)
1446 (dep-path
1447 "GUILE_LOAD_PATH"
1448 (uncompiled-dir out version)
1449 (uncompiled-dir "" version))
1450 (dep-path
1451 "GUILE_LOAD_COMPILED_PATH"
1452 (compiled-dir out version)
1453 (compiled-dir "" version))))
1454 ,''("hall"))
1455 #t))))))))
0791437f 1456 (native-inputs
63bf0afd
AS
1457 `(("autoconf" ,autoconf)
1458 ("automake" ,automake)
1459 ("pkg-config" ,pkg-config)
1460 ("texinfo" ,texinfo)))
0791437f
RW
1461 (inputs `(("guile" ,guile-2.2)))
1462 (propagated-inputs
3c3e6620 1463 `(("guile-config" ,guile-config)))
0791437f
RW
1464 (synopsis "Guile project tooling")
1465 (description
3c3e6620
RW
1466 "Hall is a command-line application and a set of Guile libraries that
1467allow you to quickly create and publish Guile projects. It allows you to
1468transparently support the GNU build system, manage a project hierarchy &
1469provides tight coupling to Guix.")
1470 (home-page "https://gitlab.com/a-sassmannshausen/guile-hall")
06085fac 1471 (license license:gpl3+)))
0791437f 1472
df18ea6f
AS
1473(define-public guile3.0-hall
1474 (package
1475 (inherit guile-hall)
1476 (name "guile3.0-hall")
1477 (inputs `(("guile" ,guile-next)
1478 ,@(alist-delete "guile" (package-inputs guile-hall))))
1479 (propagated-inputs
1480 `(("guile-config" ,guile3.0-config)
1481 ,@(alist-delete "guile-config"
1482 (package-propagated-inputs guile-hall))))))
1483
0791437f
RW
1484(define-public guile-ics
1485 (package
1486 (name "guile-ics")
1487 (version "0.2.0")
1488 (source (origin
1489 (method git-fetch)
1490 (uri (git-reference
1491 (url "https://github.com/artyom-poptsov/guile-ics")
1492 (commit (string-append "v" version))))
1493 (file-name (string-append name "-" version "-checkout"))
1494 (sha256
1495 (base32
6713589d
LC
1496 "0qjjvadr7gibdq9jvwkmlkb4afsw9n2shfj9phpiadinxk3p4m2g"))
1497 (modules '((guix build utils)))
1498 (snippet
1499 '(begin
1500 ;; Allow builds with Guile 3.0.
1501 (substitute* "configure.ac"
1502 (("^GUILE_PKG.*")
1503 "GUILE_PKG([3.0 2.2 2.0])\n"))
1504 #t))))
0791437f
RW
1505 (build-system gnu-build-system)
1506 (native-inputs
1507 `(("autoconf" ,autoconf-wrapper)
1508 ("automake" ,automake)
1509 ("texinfo" ,texinfo)
1510 ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'.
1511 ("gettext" ,gettext-minimal)
1512 ("pkg-config" ,pkg-config)))
1513 (inputs `(("guile" ,guile-2.2) ("which" ,which)))
1514 (propagated-inputs `(("guile-lib" ,guile-lib)))
1515 (home-page "https://github.com/artyom-poptsov/guile-ics")
1516 (synopsis "Guile parser library for the iCalendar format")
1517 (description
1518 "Guile-ICS is an iCalendar (RFC5545) format parser library written in
1519pure Scheme. The library can be used to read and write iCalendar data.
1520
1521The library is shipped with documentation in Info format and usage examples.")
1522 (license license:gpl3+)))
1523
6713589d
LC
1524(define-public guile3.0-ics
1525 (package
1526 (inherit guile-ics)
1527 (name "guile3.0-ics")
1528 (inputs `(("guile" ,guile-3.0)
1529 ,@(alist-delete "guile" (package-inputs guile-ics))))
1530 (propagated-inputs `(("guile-lib" ,guile3.0-lib)))))
1531
0791437f
RW
1532(define-public guile-wisp
1533 (package
1534 (name "guile-wisp")
65610f73 1535 (version "1.0.2")
0791437f
RW
1536 (source (origin
1537 (method url-fetch)
1538 (uri (string-append "https://bitbucket.org/ArneBab/"
1539 "wisp/downloads/wisp-"
1540 version ".tar.gz"))
1541 (sha256
1542 (base32
65610f73 1543 "03pz7pj9jyallynhflp5s7qax8dj1fs8la434wrfgz7g1kgjnvf6"))))
0791437f
RW
1544 (build-system gnu-build-system)
1545 (arguments
1546 `(#:modules ((guix build gnu-build-system)
15218d4e 1547 ((guix build emacs-build-system) #:prefix emacs:)
0791437f 1548 (guix build utils)
15218d4e 1549 (guix build emacs-utils)
0791437f
RW
1550 (ice-9 rdelim)
1551 (ice-9 popen))
15218d4e
RW
1552 #:imported-modules (,@%gnu-build-system-modules
1553 (guix build emacs-build-system)
1554 (guix build emacs-utils))
0791437f
RW
1555 #:phases
1556 (modify-phases %standard-phases
1557 (add-before 'configure 'patch-/usr/bin/env
1558 (lambda _
1559 (substitute* "Makefile.in"
65610f73 1560 (("/usr/bin/env bash") (which "bash")))
0791437f
RW
1561 #t))
1562 ;; auto compilation breaks, but if we set HOME to /tmp,
1563 ;; that works ok
1564 (add-before 'check 'auto-compile-hacky-workaround
1565 (lambda _ (setenv "HOME" "/tmp") #t))
1566 (add-after 'install 'install-go-files
1567 (lambda* (#:key outputs inputs #:allow-other-keys)
1568 (let* ((out (assoc-ref outputs "out"))
1569 (effective (read-line
1570 (open-pipe* OPEN_READ
1571 "guile" "-c"
1572 "(display (effective-version))")))
1573 (module-dir (string-append out "/share/guile/site/"
1574 effective))
1575 (object-dir (string-append out "/lib/guile/" effective
1576 "/site-ccache"))
1577 (prefix (string-length module-dir)))
1578 ;; compile to the destination
1579 (for-each (lambda (file)
1580 (let* ((base (string-drop (string-drop-right file 4)
1581 prefix))
1582 (go (string-append object-dir base ".go")))
1583 (invoke "guild" "compile" "-L" module-dir
1584 file "-o" go)))
1585 (find-files module-dir "\\.scm$"))
15218d4e
RW
1586 #t)))
1587 (add-after 'install 'install-emacs-files
1588 (assoc-ref emacs:%standard-phases 'install))
1589 (add-after 'install-emacs-files 'compile-emacs-files
1590 (assoc-ref emacs:%standard-phases 'build))
1591 (add-after 'compile-emacs-files 'make-autoloads
1592 (assoc-ref emacs:%standard-phases 'make-autoloads)))))
17f90b67 1593 (home-page "https://www.draketo.de/english/wisp")
0791437f
RW
1594 (inputs
1595 `(("guile" ,guile-2.2)))
1596 (native-inputs
15218d4e
RW
1597 `(("emacs" ,emacs-minimal)
1598 ("python" ,python)
0791437f
RW
1599 ("pkg-config" ,pkg-config)))
1600 (synopsis "Whitespace to lisp syntax for Guile")
1601 (description "Wisp is a syntax for Guile which provides a Python-like
1602whitespace-significant language. It may be easier on the eyes for some
1603users and in some situations.")
1604 (license license:gpl3+)))
1605
b0b725ed
RW
1606(define-public guile3.0-wisp
1607 (package
1608 (inherit guile-wisp)
1609 (name "guile3.0-wisp")
1610 (inputs `(("guile" ,guile-3.0)))
1611 (arguments
1612 (substitute-keyword-arguments (package-arguments guile-wisp)
1613 ((#:phases phases)
1614 `(modify-phases ,phases
1615 (add-after 'unpack 'support-guile-3.0
1616 (lambda _
1617 (substitute* "configure"
1618 (("_guile_versions_to_search=\"2.2")
1619 "_guile_versions_to_search=\"3.0 2.2"))
1620 #t))))))))
1621
0791437f
RW
1622(define-public guile-sly
1623 (package
1624 (name "guile-sly")
1625 (version "0.1")
1626 (source (origin
1627 (method url-fetch)
1628 (uri (string-append "https://files.dthompson.us/sly/sly-"
1629 version ".tar.gz"))
1630 (sha256
1631 (base32
1632 "1svzlbz2vripmyq2kjh0rig16bsrnbkwbsm558pjln9l65mcl4qq"))
1633 (modules '((guix build utils)))
1634 (snippet
1635 '(begin
1636 (substitute* "configure"
1637 (("_guile_required_version=\"2.0.11\"")
1638 "_guile_required_version=\"2\"")
1639 (("ac_subst_vars='")
1640 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
1641 (substitute* (find-files "." "Makefile.in")
1642 (("moddir = .*$")
1643 (string-append
1644 "moddir = "
1645 "$(prefix)/share/guile/site/@GUILE_EFFECTIVE_VERSION@\n"))
1646 (("godir = .*$")
1647 (string-append
1648 "godir = "
1649 "$(prefix)/lib/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n")))
1650 #t))))
1651 (build-system gnu-build-system)
1652 (arguments
1653 '(#:configure-flags
1654 (list (string-append "--with-libfreeimage-prefix="
1655 (assoc-ref %build-inputs "freeimage"))
1656 (string-append "--with-libgslcblas-prefix="
1657 (assoc-ref %build-inputs "gsl")))))
1658 (native-inputs
1659 `(("pkg-config" ,pkg-config)))
1660 (propagated-inputs
1661 `(("guile-sdl" ,guile-sdl)
1662 ("guile-opengl" ,guile-opengl)))
1663 (inputs
1664 `(("guile" ,guile-2.2)
1665 ("gsl" ,gsl)
1666 ("freeimage" ,freeimage)
1667 ("mesa" ,mesa)))
1668 (synopsis "2D/3D game engine for GNU Guile")
1669 (description "Sly is a 2D/3D game engine written in Guile Scheme. Sly
1670features a functional reactive programming interface and live coding
1671capabilities.")
1672 (home-page "https://dthompson.us/projects/sly.html")
1673 (license license:gpl3+)))
1674
1675(define-public g-wrap
1676 (package
1677 (name "g-wrap")
1678 (version "1.9.15")
1679 (source (origin
1680 (method url-fetch)
1681 (uri (string-append "mirror://savannah/g-wrap/g-wrap-"
1682 version ".tar.gz"))
1683 (sha256
1684 (base32
1685 "0ak0bha37dfpj9kmyw1r8fj8nva639aw5xr66wr5gd3l1rqf5xhg"))))
1686 (build-system gnu-build-system)
1687 (native-inputs
1688 `(("pkg-config" ,pkg-config)))
1689 (propagated-inputs
1690 `(("guile" ,guile-2.2)
1691 ("guile-lib" ,guile-lib)))
1692 (inputs
1693 `(("libffi" ,libffi)))
1694 (arguments
1695 `(#:configure-flags '("--disable-Werror")
1696 #:phases
1697 (modify-phases %standard-phases
1698 (add-before 'configure 'pre-configure
1699 (lambda* (#:key outputs #:allow-other-keys)
1700 (let ((out (assoc-ref outputs "out")))
1701 (substitute* (find-files "." "^Makefile.in$")
1702 (("guilemoduledir =.*guile/site" all)
1703 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))
1704 #t))))))
1705 (synopsis "Generate C bindings for Guile")
1706 (description "G-Wrap is a tool and Guile library for generating function
1707wrappers for inter-language calls. It currently only supports generating Guile
1708wrappers for C functions. Given a definition of the types and prototypes for
1709a given C interface, G-Wrap will automatically generate the C code that
1710provides access to that interface and its types from the Scheme level.")
1711 (home-page "https://www.nongnu.org/g-wrap/index.html")
1712 (license license:lgpl2.1+)))
1713
1714(define-public guile-miniadapton
1715 (let ((commit "1b5749422304567c96ac5367f2221dda9eff5880")
1716 (revision "1"))
1717 (package
1718 (name "guile-miniadapton")
1719 (version (string-append "0-" revision "." (string-take commit 9)))
1720 (source (origin
1721 (method git-fetch)
1722 (uri (git-reference
1723 (url "https://github.com/fisherdj/miniAdapton.git")
1724 (commit commit)))
1725 (file-name (string-append name "-" version "-checkout"))
1726 (sha256
1727 (base32
1728 "09q51zkw2fypad5xixskfzw2cjhjgs5cswdp3i7cpp651rb3zndh"))))
1729 (build-system guile-build-system)
1730 (native-inputs
1731 `(("guile" ,guile-2.2)))
1732 (home-page "https://github.com/fisherdj/miniAdapton")
1733 (synopsis "Minimal implementation of incremental computation in Guile
1734Scheme")
1735 (description "This package provides a complete Scheme implementation of
1736miniAdapton, which implements the core functionality of the Adapton system for
1737incremental computation (also known as self-adjusting computation). Like
1738Adapton, miniAdapton allows programmers to safely combine mutation and
1739memoization. miniAdapton is built on top of an even simpler system,
1740microAdapton. Both miniAdapton and microAdapton are designed to be easy to
1741understand, extend, and port to host languages other than Scheme.")
1742 (license license:expat))))
1743
1744(define-public guile-reader
1745 (package
1746 (name "guile-reader")
1747 (version "0.6.2")
1748 (source (origin
1749 (method url-fetch)
1750 (uri (string-append "mirror://savannah/guile-reader/guile-reader-"
1751 version ".tar.gz"))
1752 (sha256
1753 (base32
1754 "0592s2s8ampqmqwilc4fvcild6rb9gy79di6vxv5kcdmv23abkgx"))))
1755 (build-system gnu-build-system)
1756 (native-inputs `(("pkgconfig" ,pkg-config)
1757 ("gperf" ,gperf-3.0)))
1758 (inputs `(("guile" ,guile-2.2)))
1759 (synopsis "Framework for building readers for GNU Guile")
1760 (description
1761 "Guile-Reader is a simple framework for building readers for GNU Guile.
1762
1763The idea is to make it easy to build procedures that extend Guile’s read
1764procedure. Readers supporting various syntax variants can easily be written,
1765possibly by re-using existing “token readers” of a standard Scheme
1766readers. For example, it is used to implement Skribilo’s R5RS-derived
1767document syntax.
1768
1769Guile-Reader’s approach is similar to Common Lisp’s “read table”, but
1770hopefully more powerful and flexible (for instance, one may instantiate as
1771many readers as needed).")
1772 (home-page "https://www.nongnu.org/guile-reader/")
1773 (license license:gpl3+)))
1774
0791437f
RW
1775(define-public guile-ncurses
1776 (package
1777 (name "guile-ncurses")
2b155e3a 1778 (version "3.0")
0791437f
RW
1779 (source (origin
1780 (method url-fetch)
1781 (uri (string-append "mirror://gnu/guile-ncurses/guile-ncurses-"
1782 version ".tar.gz"))
1783 (sha256
1784 (base32
2b155e3a 1785 "038xbffalhymg26lvmzgf7ljilxz2f2zmqg5r5nfzbipfbprwjhf"))))
0791437f
RW
1786 (build-system gnu-build-system)
1787 (inputs `(("ncurses" ,ncurses)
1788 ("guile" ,guile-2.2)))
1789 (native-inputs `(("pkg-config" ,pkg-config)))
1790 (arguments
1791 '(#:configure-flags (list "--with-ncursesw" ; Unicode support
1792 "--with-gnu-filesystem-hierarchy")
1793 #:phases
1794 (modify-phases %standard-phases
1795 (add-before 'build 'fix-libguile-ncurses-file-name
1796 (lambda* (#:key outputs #:allow-other-keys)
1797 (invoke "make" "install"
1798 "-C" "src/ncurses"
1799 "-j" (number->string
1800 (parallel-job-count)))
1801 (let* ((out (assoc-ref outputs "out"))
1802 (dir "src/ncurses")
1803 (files (find-files dir ".scm")))
1804 (substitute* files
1805 (("\"libguile-ncurses\"")
1806 (format #f "\"~a/lib/guile/2.2/libguile-ncurses\""
1807 out)))
1808 #t))))))
1809 (home-page "https://www.gnu.org/software/guile-ncurses/")
1810 (synopsis "Guile bindings to ncurses")
1811 (description
1812 "guile-ncurses provides Guile language bindings for the ncurses
1813library.")
1814 (license license:lgpl3+)))
1815
1816(define-public guile-ncurses/gpm
1817 (package
1818 (inherit guile-ncurses)
1819 (name "guile-ncurses-with-gpm")
1820 (inputs `(("ncurses" ,ncurses/gpm)
1821 ("guile" ,guile-2.2)))))
1822
1823(define-public guile-lib
1824 (package
1825 (name "guile-lib")
1826 (version "0.2.6.1")
1827 (source (origin
1828 (method url-fetch)
1829 (uri (string-append "mirror://savannah/guile-lib/guile-lib-"
1830 version ".tar.gz"))
1831 (sha256
1832 (base32
675f1940
LC
1833 "0aizxdif5dpch9cvs8zz5g8ds5s4xhfnwza2il5ji7fv2h7ks7bd"))
1834 (modules '((guix build utils)))
1835 (snippet
1836 '(begin
1837 ;; Work around miscompilation on Guile 3.0.0 at -O2:
1838 ;; <https://bugs.gnu.org/39251>.
1839 (substitute* "src/md5.scm"
1840 (("\\(define f-ash ash\\)")
1841 "(define f-ash (@ (guile) ash))\n")
1842 (("\\(define f-add \\+\\)")
1843 "(define f-add (@ (guile) +))\n"))
1844 #t))))
0791437f
RW
1845 (build-system gnu-build-system)
1846 (arguments
1847 '(#:make-flags
1848 '("GUILE_AUTO_COMPILE=0") ; to prevent guild errors
1849 #:phases
1850 (modify-phases %standard-phases
1851 (add-before 'configure 'patch-module-dir
1852 (lambda _
1853 (substitute* "src/Makefile.in"
1854 (("^moddir = ([[:graph:]]+)")
1855 "moddir = $(datadir)/guile/site/@GUILE_EFFECTIVE_VERSION@\n")
1856 (("^godir = ([[:graph:]]+)")
1857 "godir = \
1858$(libdir)/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n"))
1859 #t)))))
1860 (native-inputs `(("pkg-config" ,pkg-config)))
1861 (inputs `(("guile" ,guile-2.2)))
1862 (home-page "https://www.nongnu.org/guile-lib/")
1863 (synopsis "Collection of useful Guile Scheme modules")
1864 (description
1865 "Guile-Lib is intended as an accumulation place for pure-scheme Guile
1866modules, allowing for people to cooperate integrating their generic Guile
1867modules into a coherent library. Think \"a down-scaled, limited-scope CPAN
1868for Guile\".")
1869
1870 ;; The whole is under GPLv3+, but some modules are under laxer
1871 ;; distribution terms such as LGPL and public domain. See `COPYING' for
1872 ;; details.
1873 (license license:gpl3+)))
1874
1875(define-public guile2.0-lib
1876 (package
1877 (inherit guile-lib)
1878 (name "guile2.0-lib")
1879 (inputs `(("guile" ,guile-2.0)))))
1880
675f1940
LC
1881(define-public guile3.0-lib
1882 (package
1883 (inherit guile-lib)
1884 (name "guile3.0-lib")
1885 (inputs `(("guile" ,guile-3.0)))))
1886
0791437f
RW
1887(define-public guile-minikanren
1888 (package
1889 (name "guile-minikanren")
1890 (version "20150424.e844d85")
1891 (source (origin
1892 (method git-fetch)
1893 (uri (git-reference
1894 (url "https://github.com/ijp/minikanren.git")
1895 (commit "e844d85512f8c055d3f96143ee506007389a25e3")))
1896 (file-name (string-append name "-" version "-checkout"))
1897 (sha256
1898 (base32
1899 "0r50jlpzi940jlmxyy3ddqqwmj5r12gb4bcv0ssini9v8km13xz6"))))
1900 (build-system guile-build-system)
1901 (native-inputs
1902 `(("guile" ,guile-2.2)))
1903 (home-page "https://github.com/ijp/minikanren")
1904 (synopsis "MiniKanren declarative logic system, packaged for Guile")
1905 (description
1906 "MiniKanren is a relational programming extension to the Scheme
1907programming Language, written as a smaller version of Kanren suitable for
1908pedagogical purposes. It is featured in the book, The Reasoned Schemer,
1909written by Dan Friedman, William Byrd, and Oleg Kiselyov.
1910
1911This is Ian Price's r6rs packaged version of miniKanren, which deviates
1912slightly from miniKanren mainline.
1913
1914See http://minikanren.org/ for more on miniKanren generally.")
1915 (license license:expat)))
1916
1917(define-public guile2.0-minikanren
1918 (package
1919 (inherit guile-minikanren)
1920 (name "guile2.0-minikanren")
1921 (native-inputs `(("guile" ,guile-2.0)))))
1922
89a99d53
LC
1923(define-public guile3.0-minikanren
1924 (package
1925 (inherit guile-minikanren)
1926 (name "guile3.0-minikanren")
1927 (native-inputs `(("guile" ,guile-next)))))
1928
0791437f
RW
1929(define-public guile-irregex
1930 (package
1931 (name "guile-irregex")
1932 (version "0.9.6")
1933 (source (origin
1934 (method url-fetch)
1935 (uri (string-append
1936 "http://synthcode.com/scheme/irregex/irregex-"
1937 version ".tar.gz"))
1938 (sha256
1939 (base32
1940 "1ia3m7dp3lcxa048q0gqbiwwsyvn99baw6xkhb4bhhzn4k7bwyqq"))))
1941 (build-system guile-build-system)
1942 (arguments
1943 '(#:phases (modify-phases %standard-phases
1944 (add-after 'unpack 'move-files-around
1945 (lambda _
1946 ;; Move the relevant source files to src/ and create the
1947 ;; rx/ directory to match the expected module hierarchy.
1948 (mkdir-p "src/rx/source")
1949 (rename-file "irregex-guile.scm"
1950 "src/rx/irregex.scm")
1951 (rename-file "irregex.scm"
1952 "src/rx/source/irregex.scm")
1953 ;; Not really reachable via guile's packaging system,
1954 ;; but nice to have around.
1955 (rename-file "irregex-utils.scm"
1956 "src/rx/source/irregex-utils.scm")
1957 #t)))
1958 #:source-directory "src"))
1959 (native-inputs
1960 `(("guile" ,guile-2.2)))
1961 (home-page "http://synthcode.com/scheme/irregex")
1962 (synopsis "S-expression based regular expressions")
1963 (description
1964 "Irregex is an s-expression based alternative to your classic
1965string-based regular expressions. It implements SRFI 115 and is deeply
1966inspired by the SCSH regular expression system.")
1967 (license license:bsd-3)))
1968
1969(define-public guile2.0-irregex
1970 (package
1971 (inherit guile-irregex)
1972 (name "guile2.0-irregex")
1973 (native-inputs `(("guile" ,guile-2.0)))))
1974
89a99d53
LC
1975(define-public guile3.0-irregex
1976 (package
1977 (inherit guile-irregex)
1978 (name "guile3.0-irregex")
1979 (native-inputs `(("guile" ,guile-next)))))
1980
0791437f
RW
1981(define-public haunt
1982 (package
1983 (name "haunt")
1984 (version "0.2.4")
1985 (source (origin
1986 (method url-fetch)
1987 (uri (string-append "https://files.dthompson.us/haunt/haunt-"
1988 version ".tar.gz"))
1989 (sha256
1990 (base32
93d94134
LC
1991 "056z4znikk83nr5mr0x2ac3iinqbywa2bvb37mhr566a1q50isfc"))
1992 (modules '((guix build utils)))
1993 (snippet
1994 '(begin
1995 ;; Allow builds with Guile 3.0.
1996 (substitute* "configure"
1997 (("2\\.2 2\\.0")
1998 "3.0 2.2 2.0"))
1999 #t))))
0791437f
RW
2000 (build-system gnu-build-system)
2001 (arguments
2002 `(#:modules ((ice-9 match) (ice-9 ftw)
2003 ,@%gnu-build-system-modules)
2004 #:tests? #f ; test suite is non-deterministic :(
2005 #:phases (modify-phases %standard-phases
2006 (add-after 'install 'wrap-haunt
2007 (lambda* (#:key inputs outputs #:allow-other-keys)
2008 ;; Wrap the 'haunt' command to refer to the right
2009 ;; modules.
2010 (let* ((out (assoc-ref outputs "out"))
2011 (bin (string-append out "/bin"))
2012 (site (string-append
2013 out "/share/guile/site"))
93d94134
LC
2014 (guile-reader (assoc-ref inputs "guile-reader"))
2015 (deps `(,@(if guile-reader
2016 (list guile-reader)
2017 '())
2018 ,(assoc-ref inputs "guile-commonmark"))))
0791437f
RW
2019 (match (scandir site)
2020 (("." ".." version)
2021 (let ((modules (string-append site "/" version))
2022 (compiled-modules (string-append
2023 out "/lib/guile/" version
2024 "/site-ccache")))
2025 (wrap-program (string-append bin "/haunt")
2026 `("GUILE_LOAD_PATH" ":" prefix
2027 (,modules
2028 ,@(map (lambda (dep)
2029 (string-append dep
2030 "/share/guile/site/"
2031 version))
2032 deps)))
2033 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
2034 (,compiled-modules
2035 ,@(map (lambda (dep)
2036 (string-append dep "/lib/guile/"
2037 version
2038 "/site-ccache"))
2039 deps))))
2040 #t)))))))))
2041 (native-inputs
2042 `(("pkg-config" ,pkg-config)
2043 ("texinfo" ,texinfo)))
2044 (inputs
2045 `(("guile" ,guile-2.2)))
2046 (propagated-inputs
2047 `(("guile-reader" ,guile-reader)
2048 ("guile-commonmark" ,guile-commonmark)))
2049 (synopsis "Functional static site generator")
2050 (description "Haunt is a static site generator written in Guile
2051Scheme. Haunt features a functional build system and an extensible
2052interface for reading articles in any format.")
2053 (home-page "http://haunt.dthompson.us")
2054 (license license:gpl3+)))
2055
93d94134
LC
2056(define-public guile3.0-haunt
2057 (package
2058 (inherit haunt)
2059 (name "guile3.0-haunt")
2060 (inputs `(("guile" ,guile-3.0)))
2061 (propagated-inputs
2062 ;; XXX: Guile-Reader is currently unavailable for Guile 3.0 so strip it.
2063 `(("guile-commonmark" ,guile3.0-commonmark)))))
2064
0791437f
RW
2065(define-public guile2.0-haunt
2066 (package
2067 (inherit haunt)
2068 (name "guile2.0-haunt")
2069 (inputs `(("guile" ,guile-2.0)))))
2070
0791437f
RW
2071(define-public guile-redis
2072 (package
2073 (name "guile-redis")
f57bf15c 2074 (version "1.3.0")
0791437f
RW
2075 (home-page "https://github.com/aconchillo/guile-redis")
2076 (source (origin
29fde3bf
EF
2077 (method git-fetch)
2078 (uri (git-reference
2079 (url home-page)
2080 (commit version)))
2081 (file-name (git-file-name name version))
0791437f
RW
2082 (sha256
2083 (base32
29fde3bf 2084 "14izs8daxh7pb7vwpxi5g427qa31137jkaxrb1cy5rpjkwchy723"))))
0791437f
RW
2085 (build-system gnu-build-system)
2086 (native-inputs
2087 `(("autoconf" ,autoconf)
2088 ("automake" ,automake)
2089 ("pkg-config" ,pkg-config)
2090 ("guile" ,guile-2.2)))
2091 (synopsis "Redis client library for Guile")
2092 (description "Guile-redis provides a Scheme interface to the Redis
2093key-value cache and store.")
2094 (license license:lgpl3+)))
2095
2096(define-public guile2.0-redis
2097 (package
2098 (inherit guile-redis)
2099 (name "guile2.0-redis")
2100 (native-inputs `(("guile" ,guile-2.0)
2101 ,@(alist-delete "guile"
2102 (package-native-inputs guile-redis))))))
2103
0791437f
RW
2104(define-public guile-commonmark
2105 (package
2106 (name "guile-commonmark")
b552e307 2107 (version "0.1.2")
0791437f
RW
2108 (source (origin
2109 (method url-fetch)
2110 (uri (string-append "https://github.com/OrangeShark/" name
2111 "/releases/download/v" version
2112 "/" name "-" version ".tar.gz"))
2113 (sha256
2114 (base32
1fa34232
LC
2115 "17lrsdisa3kckh24q114vfmzdc4wkqa6ccwl4hdlrng5wpn1iman"))
2116 (modules '((guix build utils)))
2117 (snippet
2118 '(begin
2119 ;; Allow builds with Guile 3.0.
2120 (substitute* "configure"
2121 (("2\\.2 2\\.0")
2122 "3.0 2.2 2.0"))
2123 #t))))
0791437f
RW
2124 (build-system gnu-build-system)
2125 (inputs
2126 `(("guile" ,guile-2.2)))
2127 (native-inputs
2128 `(("pkg-config" ,pkg-config)))
2129 (synopsis "CommonMark parser for Guile")
2130 (description
2131 "guile-commonmark is a library for parsing CommonMark, a fully specified
2132variant of Markdown. The library is written in Guile Scheme and is designed
2133to transform a CommonMark document to SXML. guile-commonmark tries to closely
2134follow the @uref{http://commonmark.org/, CommonMark spec}, the main difference
2135is no support for parsing block and inline level HTML.")
2136 (home-page "https://github.com/OrangeShark/guile-commonmark")
2137 (license license:lgpl3+)))
2138
1fa34232
LC
2139(define-public guile3.0-commonmark
2140 (package
2141 (inherit guile-commonmark)
2142 (name "guile3.0-commonmark")
2143 (inputs `(("guile" ,guile-3.0)))))
2144
0791437f
RW
2145(define-public guile2.0-commonmark
2146 (package
2147 (inherit guile-commonmark)
2148 (name "guile2.0-commonmark")
2149 (inputs `(("guile" ,guile-2.0)))))
2150
0791437f
RW
2151(define-public mcron
2152 (package
2153 (name "mcron")
30ebff69 2154 (version "1.1.3")
0791437f
RW
2155 (source (origin
2156 (method url-fetch)
2157 (uri (string-append "mirror://gnu/mcron/mcron-"
2158 version ".tar.gz"))
2159 (sha256
2160 (base32
30ebff69 2161 "00kv7fgllzjpis0g1m9csycp4f6l11774m09dqy255cvmim2g743"))))
0791437f
RW
2162 (build-system gnu-build-system)
2163 (arguments
2164 '(#:phases (modify-phases %standard-phases
30ebff69
EF
2165 (add-after 'unpack 'fix-finding-guile
2166 (lambda _
2167 (substitute* "configure"
3de0d20b 2168 (("2\\.0") "3.0 2.2 2.0"))
30ebff69 2169 #t))
0791437f
RW
2170 (add-before 'check 'adjust-tests
2171 (lambda _
2172 (substitute* "tests/job-specifier.scm"
2173 ;; (getpw) fails with "entry not found" in the build
2174 ;; environment, so pass an argument.
2175 (("\\(getpw\\)")
2176 "(getpwnam (getuid))")
2177 ;; The build environment lacks an entry for root in
2178 ;; /etc/passwd.
2179 (("\\(getpw 0\\)")
2180 "(getpwnam \"nobody\")")
2181
2182 ;; FIXME: Skip the 4 faulty tests (see above).
2183 (("\\(test-equal \"next-year\"" all)
2184 (string-append "(test-skip 4)\n" all)))
2185 #t)))))
30ebff69 2186 (native-inputs `(("pkg-config" ,pkg-config)
0791437f 2187 ("tzdata" ,tzdata-for-tests)))
f61f424d 2188 (inputs `(("guile" ,guile-2.2)))
0791437f
RW
2189 (home-page "https://www.gnu.org/software/mcron/")
2190 (synopsis "Run jobs at scheduled times")
2191 (description
2192 "GNU Mcron is a complete replacement for Vixie cron. It is used to run
2193tasks on a schedule, such as every hour or every Monday. Mcron is written in
2194Guile, so its configuration can be written in Scheme; the original cron
2195format is also supported.")
2196 (license license:gpl3+)))
2197
3de0d20b
LC
2198(define-public guile3.0-mcron
2199 (package
2200 (inherit mcron)
2201 (name "guile3.0-mcron")
2202 (inputs `(("guile" ,guile-3.0)))))
2203
0791437f
RW
2204(define-public mcron2
2205 ;; This was mthl's mcron development branch, and it became mcron 1.1.
2206 (deprecated-package "mcron2" mcron))
6bb5f88e
RW
2207
2208(define-public guile-picture-language
d1a3a8e1
RW
2209 (let ((commit "91d10c96708d732145006dd2802acc4de08b632e")
2210 (revision "1"))
6bb5f88e
RW
2211 (package
2212 (name "guile-picture-language")
d1a3a8e1 2213 (version (git-version "0.0.1" revision commit))
6bb5f88e
RW
2214 (source (origin
2215 (method git-fetch)
2216 (uri (git-reference
2217 (url "https://git.elephly.net/software/guile-picture-language.git")
2218 (commit commit)))
f1d4d79f 2219 (file-name (git-file-name name version))
6bb5f88e
RW
2220 (sha256
2221 (base32
d1a3a8e1
RW
2222 "1ydvw9dvssdvlvhh1dr8inyzy2x6m41qgp8hsivca1xysr4gc23a"))))
2223 (build-system gnu-build-system)
6bb5f88e
RW
2224 (inputs
2225 `(("guile" ,guile-2.2)))
d1a3a8e1
RW
2226 (native-inputs
2227 `(("autoconf" ,autoconf)
2228 ("automake" ,automake)
2229 ("imagemagick" ,imagemagick)
2230 ("pkg-config" ,pkg-config)
2231 ("texinfo" ,texinfo)))
6bb5f88e
RW
2232 (home-page "https://git.elephly.net/software/guile-picture-language.git")
2233 (synopsis "Picture language for Guile")
2234 (description
2235 "This package provides a simple SVG-based picture language for Guile.
2236The picture values can directly be displayed in Geiser.")
2237 (license license:lgpl3+))))
5531782d 2238
4f408684
LC
2239(define-public guile3.0-picture-language
2240 (package
2241 (inherit guile-picture-language)
2242 (name "guile3.0-picture-language")
2243 (inputs `(("guile" ,guile-3.0)))))
2244
5531782d 2245(define-public guile-studio
223236f6
RW
2246 (package
2247 (name "guile-studio")
2248 (version "0.0.2")
2249 (source (origin
2250 (method git-fetch)
2251 (uri (git-reference
2252 (url "https://git.elephly.net/software/guile-studio.git")
2253 (commit version)))
2254 (file-name (git-file-name name version))
2255 (sha256
2256 (base32
2257 "10ls4ra148hd9ra7sin4kh9vv0am5pwk48p7dsjhrlg2l1hsh4hi"))))
2258 (build-system gnu-build-system)
2259 (arguments
2260 `(#:modules
2261 ((ice-9 match)
2262 (srfi srfi-1)
2263 ,@%gnu-build-system-modules)
2264 #:tests? #f ; there are none
2265 #:make-flags
2266 (list (string-append "ICONS_DIR="
2267 (assoc-ref %build-inputs "adwaita-icon-theme")
2268 "/share/icons/Adwaita/")
2269 (string-append "PICT_DIR="
2270 (assoc-ref %build-inputs "guile-picture-language"))
2271 (string-append "EMACS_DIR="
2272 (assoc-ref %build-inputs "emacs"))
2273 (string-append "GUILE_DIR="
2274 (assoc-ref %build-inputs "guile"))
2275 (string-join (cons "INPUTS="
2276 (filter-map
2277 (lambda (input)
2278 (match input
2279 ((label . pkg)
2280 (and (string-prefix? "emacs" label) pkg))))
2281 %build-inputs)))
2282 (string-append "PREFIX=" (assoc-ref %outputs "out")))
2283 #:phases
2284 (modify-phases %standard-phases
2285 (delete 'configure)
2286 (delete 'install))))
2287 (inputs
2288 `(("guile" ,guile-2.2)
2289 ("guile-picture-language" ,guile-picture-language)
2290 ("emacs" ,emacs)
2291 ("emacs-geiser" ,emacs-geiser)
2292 ("emacs-company" ,emacs-company)
2293 ("emacs-flycheck" ,emacs-flycheck)
2294 ("emacs-smart-mode-line" ,emacs-smart-mode-line)
2295 ("emacs-paren-face" ,emacs-paren-face)
2296 ("adwaita-icon-theme" ,adwaita-icon-theme)))
2297 (native-inputs
2298 `(("texinfo" ,texinfo)))
2299 (home-page "https://gnu.org/software/guile")
2300 (synopsis "IDE for Guile")
2301 (description
2302 "This is Emacs with a few settings that make working with Guile easier
5531782d
RW
2303for people new to Emacs. Features include: CUA mode, Geiser, tool bar icons
2304to evaluate Guile buffers, support for Guile's very own picture language, code
2305completion, a simple mode line, etc.")
223236f6 2306 (license license:gpl3+)))
9f8698ad
RW
2307
2308(define-public guile-stis-parser
2309 (let ((commit "6e85d37ffc333b722f4413a6c648263701eb75bd")
2310 (revision "1"))
2311 (package
2312 (name "guile-stis-parser")
2313 (version (git-version "0" revision commit))
2314 (source (origin
2315 (method git-fetch)
2316 (uri (git-reference
2317 (url "https://gitlab.com/tampe/stis-parser")
2318 (commit commit)))
29e76f07 2319 (file-name (git-file-name name version))
9f8698ad
RW
2320 (sha256
2321 (base32
2322 "0v4hvq7rlpbra1ni73lf8k6sdmjlflr50yi3p1f24g85h77pc7c0"))))
2323 (build-system gnu-build-system)
2324 (arguments
2325 `(#:parallel-build? #f ; not supported
2326 #:phases
2327 (modify-phases %standard-phases
2328 (add-after 'unpack 'chdir
2329 (lambda _ (chdir "modules") #t))
8318b3ed
RW
2330 (add-after 'chdir 'use-canonical-directory-for-go-files
2331 (lambda _
2332 (substitute* "Makefile.am"
2333 (("/ccache") "/site-ccache"))
2334 #t))
9f8698ad
RW
2335 (add-after 'chdir 'delete-broken-symlink
2336 (lambda _
2337 (delete-file "parser/stis-parser/lang/.#calc.scm")
2338 #t)))))
2339 (inputs
2340 `(("guile" ,guile-2.2)))
2341 (native-inputs
2342 `(("autoconf" ,autoconf)
2343 ("automake" ,automake)
2344 ("pkg-config" ,pkg-config)))
2345 (home-page "https://gitlab.com/tampe/stis-parser")
2346 (synopsis "Parser combinator framework")
2347 (description
2348 "This package provides a functional parser combinator library that
2349supports backtracking and a small logical framework. The idea is to build up
2350chunks that are memoized and there is no clear scanner/parser separation,
2351chunks can be expressions as well as simple tokens.")
2352 (license license:lgpl2.0+))))
12d73f9c
RW
2353
2354(define-public guile-persist
2355 (let ((commit "b14927b0368af51c024560aee5f55724aee35233")
2356 (revision "1"))
2357 (package
2358 (name "guile-persist")
2359 (version (git-version "0" revision commit))
2360 (source (origin
2361 (method git-fetch)
2362 (uri (git-reference
2363 (url "https://gitlab.com/tampe/guile-persist")
2364 (commit commit)))
2365 (file-name (git-file-name name version))
2366 (sha256
2367 (base32
85a411bc
LC
2368 "0z5nf377wh8yj6n3sx2ddn4bdx1qrqnw899dlqjhg0q69qzil522"))
2369 (modules '((guix build utils)))
2370 (snippet
2371 '(begin
2372 ;; Install .go files in the right place.
2373 (substitute* "Makefile.am"
2374 (("/ccache") "/site-ccache"))
2375 #t))))
12d73f9c
RW
2376 (build-system gnu-build-system)
2377 (arguments
2378 `(#:phases
2379 (modify-phases %standard-phases
2380 (add-after 'unpack 'patch-prefix
2381 (lambda* (#:key inputs outputs #:allow-other-keys)
2382 (substitute* "src/Makefile.am"
2383 (("/usr/local/lib/guile")
2384 (string-append (assoc-ref outputs "out") "/lib/guile"))
2385 (("/usr/local/include/guile")
2386 (string-append (assoc-ref inputs "guile") "/include/guile"))
2387 (("-L/usr/local/lib")
8f052528
RW
2388 (string-append "-L" (assoc-ref inputs "guile") "/lib"))
2389 ;; Use canonical directory for go files.
2390 (("/ccache") "/site-ccache"))
12d73f9c
RW
2391 #t))
2392 (add-after 'unpack 'patch-library-reference
2393 (lambda* (#:key outputs #:allow-other-keys)
2394 (let ((out (assoc-ref outputs "out")))
2395 (substitute* "persist/persistance.scm"
2396 (("\"libguile-persist\"")
2397 (format #f "\"~a/lib/guile/2.2/extensions/libguile-persist\"" out)))
2398 #t))))))
2399 (inputs
2400 `(("guile" ,guile-2.2)))
2401 (native-inputs
2402 `(("autoconf" ,autoconf)
2403 ("automake" ,automake)
2404 ("libtool" ,libtool)
2405 ("pkg-config" ,pkg-config)))
2406 (home-page "https://gitlab.com/tampe/guile-persist")
028053f2 2407 (synopsis "Persistence programming framework for Guile")
12d73f9c
RW
2408 (description
2409 "This is a serialization library for serializing objects like classes
2410and objects, closures and structs. This currently does not support
2411serializing continuations or delimited continuations.")
2412 (license license:lgpl2.0+))))
6d37301b
RW
2413
2414(define-public python-on-guile
5d5edb88
LC
2415 (let ((commit "00a51a23247f1edc4ae8eda72b30df5cd7d0015f")
2416 (revision "3"))
6d37301b
RW
2417 (package
2418 (name "python-on-guile")
2419 (version (git-version "0.1.0" revision commit))
2420 (source (origin
2421 (method git-fetch)
2422 (uri (git-reference
4088ae42 2423 (url "https://git.elephly.net/software/python-on-guile.git")
6d37301b
RW
2424 (commit commit)))
2425 (file-name (git-file-name name version))
2426 (sha256
2427 (base32
5d5edb88 2428 "03rpnqr08rqr3gay128g564rwk8w4jbj28ss6b46z1d4vjs4nk68"))))
6d37301b
RW
2429 (build-system gnu-build-system)
2430 (arguments
2431 `(#:parallel-build? #f ; not supported
83817158
LC
2432 #:make-flags '("GUILE_AUTO_COMPILE=0") ;to prevent guild warnings
2433
6d37301b
RW
2434 #:phases
2435 (modify-phases %standard-phases
2436 (add-after 'unpack 'chdir
83817158
LC
2437 (lambda _ (chdir "modules") #t))
2438 (add-after 'install 'wrap
2439 (lambda* (#:key outputs #:allow-other-keys)
2440 ;; Wrap the 'python' executable so it can find its
2441 ;; dependencies.
2442 (let ((out (assoc-ref outputs "out")))
2443 (wrap-program (string-append out "/bin/python")
2444 `("GUILE_LOAD_PATH" ":" prefix
2445 (,(getenv "GUILE_LOAD_PATH")))
2446 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
2447 (,(getenv "GUILE_LOAD_COMPILED_PATH"))))
2448 #t))))))
6d37301b
RW
2449 (inputs
2450 `(("guile" ,guile-2.2)))
2451 (propagated-inputs
2452 `(("guile-persist" ,guile-persist)
2453 ("guile-readline" ,guile-readline)
2454 ("guile-stis-parser" ,guile-stis-parser)))
2455 (native-inputs
2456 `(("autoconf" ,autoconf)
2457 ("automake" ,automake)
2458 ("libtool" ,libtool)
2459 ("pkg-config" ,pkg-config)))
2460 (home-page "https://gitlab.com/python-on-guile/python-on-guile/")
2461 (synopsis "Python implementation in Guile")
2462 (description
2463 "This package allows you to compile a Guile Python file to any target
2464from @code{tree-il}.")
2465 (license license:lgpl2.0+))))
b97b4624
RW
2466
2467(define-public guile-file-names
2468 (package
2469 (name "guile-file-names")
72a0706f 2470 (version "0.3")
b97b4624
RW
2471 (source (origin
2472 (method url-fetch)
2473 (uri (string-append "http://brandon.invergo.net/software/download/"
2474 "guile-file-names/guile-file-names-"
2475 version ".tar.gz"))
2476 (sha256
2477 (base32
72a0706f 2478 "01chizdxkhw6aqv629vxka9f5x3534ij7r0jqndawsg2vxm1r9sz"))))
b97b4624
RW
2479 (build-system gnu-build-system)
2480 (arguments
2481 `(#:phases
2482 (modify-phases %standard-phases
481eca80 2483 (add-after 'unpack 'fix-target-directory
b97b4624 2484 (lambda _
481eca80 2485 (substitute* "src/Makefile.in"
b97b4624
RW
2486 (("guilemoddir = \\$\\(GUILE_SITE\\)")
2487 "guilemoddir = $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
2488 #t)))))
2489 (inputs
2490 `(("guile" ,guile-2.2)))
2491 (native-inputs
2492 `(("pkg-config" ,pkg-config)))
2493 (home-page "https://gitlab.com/brandoninvergo/guile-file-names")
2494 (synopsis "Manipulate file names")
2495 (description
2496 "The @code{(file-names)} module provides tools for manipulating file
2497names. The module was built on the idea that doing anything more than a
2498non-trivial modification of a file name string is a pain (making sure all
2499slashes are present and accounted for, resolving @code{.} and @code{..}, etc).
2500Inevitably, you have to break the string up into chunks and operate on that
2501list of components. This module takes care of that for you.")
2502 (license license:lgpl3+)))
bdf2dd79
JN
2503
2504(define-public guile-gi
bb6c8f20
RW
2505 (package
2506 (name "guile-gi")
195e1c1b 2507 (version "0.2.2")
bb6c8f20
RW
2508 (source (origin
2509 (method url-fetch)
2510 (uri (string-append "http://lonelycactus.com/tarball/guile_gi-"
2511 version ".tar.gz"))
2512 (sha256
2513 (base32
195e1c1b 2514 "1v82kz8mz7wgq6w5llaz8a2wwdnl8vk2667dpjwjxscl0qyxsy6y"))))
bb6c8f20
RW
2515 (build-system gnu-build-system)
2516 (arguments
b5d4d5b9
RW
2517 `(#:configure-flags '("--with-gnu-filesystem-hierarchy")
2518 #:phases
2519 (modify-phases %standard-phases
2520 (add-before 'check 'start-xorg-server
2521 (lambda* (#:key inputs #:allow-other-keys)
2522 ;; The init_check test requires a running X server.
2523 (system (format #f "~a/bin/Xvfb :1 &"
2524 (assoc-ref inputs "xorg-server")))
2525 (setenv "DISPLAY" ":1")
2526 #t)))))
bb6c8f20
RW
2527 (native-inputs
2528 `(("gettext" ,gnu-gettext)
6153fa0a 2529 ("glib:bin" ,glib "bin") ; for glib-compile-resources
bb6c8f20 2530 ("libtool" ,libtool)
b5d4d5b9
RW
2531 ("pkg-config" ,pkg-config)
2532 ("xorg-server" ,xorg-server)))
bb6c8f20
RW
2533 (propagated-inputs
2534 `(("glib" ,glib)
2535 ("gobject-introspection" ,gobject-introspection)
2536 ("gssettings-desktop-schemas" ,gsettings-desktop-schemas)
2537 ("gtk+" ,gtk+)
2538 ("guile-lib" ,guile-lib)
2539 ("webkitgtk" ,webkitgtk)))
2540 (inputs `(("guile" ,guile-2.2)))
2541 (home-page "https://github.com/spk121/guile-gi")
2542 (synopsis "GObject bindings for Guile")
2543 (description
2544 "Guile-GI is a library for Guile that allows using GObject-based
bdf2dd79
JN
2545libraries, such as GTK+3. Its README comes with the disclaimer: This is
2546pre-alpha code.")
bb6c8f20 2547 (license license:gpl3+)))
dec4b3aa 2548
bfb51f5e
RW
2549(define-public guile3.0-gi
2550 (package
2551 (inherit guile-gi)
2552 (name "guile3.0-gi")
2553 (native-inputs
2554 `(("guile" ,guile-3.0)
2555 ,@(package-native-inputs guile-gi)))))
2556
dec4b3aa
LC
2557(define-public guile-srfi-159
2558 (let ((commit "1bd98abda2ae4ef8f36761a167903e55c6bda7bb")
2559 (revision "0"))
2560 (package
2561 (name "guile-srfi-159")
2562 (version (git-version "0" revision commit))
2563 (home-page "https://bitbucket.org/bjoli/guile-srfi-159")
2564 (source (origin
2565 (method hg-fetch)
2566 (uri (hg-reference (changeset commit)
2567 (url home-page)))
2568 (sha256
2569 (base32
2570 "1zw6cmcy7xdbfiz3nz9arqnn7l2daidaps6ixkcrc9b6k51fdv3p"))
2571 (file-name (git-file-name name version))))
2572 (build-system guile-build-system)
2573 (arguments
2574 ;; The *-impl.scm files are actually included from module files; they
2575 ;; should not be compiled separately, but they must be installed.
2576 '(#:not-compiled-file-regexp "-impl\\.scm$"))
2577 (inputs
2578 `(("guile" ,guile-2.2)))
2579 (synopsis "Formatting combinators for Guile")
2580 (description
2581 "The @code{(srfi-159)} module and its sub-modules implement the
2582formatting combinators specified by
2583@uref{https://srfi.schemers.org/srfi-159/srfi-159.html, SRFI-159}. These are
2584more expressive and flexible than the traditional @code{format} procedure.")
2585 (license license:bsd-3))))
f0de9544
JN
2586
2587(define-public emacsy
48eb71ae
JN
2588 (package
2589 (name "emacsy")
2590 (version "0.4.1")
2591 (source (origin
2592 (method url-fetch)
2593 (uri (string-append
2594 "https://download.savannah.nongnu.org/releases/"
2595 name "/" name "-" version ".tar.gz"))
2596 (sha256
2597 (base32
2598 "1cpb85dl1nibd34c2x2h7vfmjpkgh353p5b1w20v6cs6gmvgg4np"))))
2599 (build-system gnu-build-system)
2600 (native-inputs
2601 `(("autoconf" ,autoconf)
2602 ("automake" ,automake)
2603 ("bzip2" ,bzip2)
2604 ("guile" ,guile-2.2)
2605 ("gettext" ,gnu-gettext)
2606 ("libtool" ,libtool)
2607 ("perl" ,perl)
2608 ("pkg-config" ,pkg-config)
2609 ("texinfo" ,texinfo)
1aa026aa 2610 ("texlive" ,(texlive-union (list texlive-generic-epsf)))))
114f02ba 2611 (inputs
48eb71ae
JN
2612 `(("dbus-glib" ,dbus-glib)
2613 ("guile" ,guile-2.2)
2614 ("guile-lib" ,guile-lib)
2615 ("guile-readline" ,guile-readline)
48eb71ae 2616 ("freeglut" ,freeglut)
48eb71ae 2617 ("webkitgtk" ,webkitgtk)))
114f02ba
AS
2618 (propagated-inputs
2619 `(("glib-networking" ,glib-networking)
2620 ("gssettings-desktop-schemas" ,gsettings-desktop-schemas)))
48eb71ae 2621 (arguments
114f02ba
AS
2622 `(#:modules ((guix build gnu-build-system)
2623 (guix build utils)
2624 (ice-9 popen)
2625 (ice-9 rdelim)
2626 (ice-9 regex)
2627 (ice-9 ftw)
2628 (srfi srfi-26))
2629 #:phases
48eb71ae
JN
2630 (modify-phases %standard-phases
2631 (add-before 'configure 'setenv
2632 (lambda _
2633 (setenv "GUILE_AUTO_COMPILE" "0")
114f02ba
AS
2634 #t))
2635 (add-after 'install 'wrap-binaries
2636 (lambda* (#:key inputs outputs #:allow-other-keys)
2637 (let* ((out (assoc-ref outputs "out"))
2638 (effective (read-line
2639 (open-pipe* OPEN_READ
2640 "guile" "-c"
2641 "(display (effective-version))")))
2642 (deps (map (cut assoc-ref inputs <>)
2643 '("guile-lib" "guile-readline")))
2644 (scm-path (map (cut string-append <> "/share/guile/site/"
2645 effective) `(,out ,@deps)))
2646 (go-path (map (cut string-append <> "/lib/guile/" effective
2647 "/site-ccache/") `(,out ,@deps)))
2648 (examples (filter (cut string-match "emacsy" <>)
2649 (scandir (string-append out "/bin/"))))
2650 (progs (map (cut string-append out "/bin/" <>)
2651 examples)))
2652 (map (cut wrap-program <>
2653 `("GUILE_LOAD_PATH" ":" prefix ,scm-path)
2654 `("GUILE_LOAD_COMPILED_PATH" ":" prefix ,go-path))
2655 progs)
2656 #t))))))
48eb71ae
JN
2657 (home-page "https://savannah.nongnu.org/projects/emacsy")
2658 (synopsis "Embeddable GNU Emacs-like library using Guile")
2659 (description
2660 "Emacsy is an embeddable Emacs-like library that uses GNU Guile
f0de9544
JN
2661as extension language. Emacsy can give a C program an Emacsy feel with
2662keymaps, minibuffer, recordable macros, history, tab completion, major
2663and minor modes, etc., and can also be used as a pure Guile library. It
48eb71ae
JN
2664comes with a simple counter example using FreeGLUT and browser examples
2665in C using Gtk+-3 and WebKitGtk.")
2666 (license license:gpl3+)))
2135610c 2667
c99f32b9
AS
2668(define-public emacsy-minimal
2669 (let ((commit "f3bf0dbd803d7805b6ae8303253507ad13922293"))
2670 (package
2671 (inherit emacsy)
2672 (name "emacsy-minimal")
2673 (version (git-version "v0.4.1" "19" commit))
2674 (source (origin
2675 (method git-fetch)
2676 (uri (git-reference
2677 (url "https://git.savannah.gnu.org/git/emacsy.git")
2678 (commit commit)))
2679 (file-name (git-file-name name version))
2680 (sha256
2681 (base32
2682 "0ivy28km1p7nlrf63xx3hvrpxf5ld5amk1wcan3k7sqv1kq9mqdb"))))
2683 (build-system gnu-build-system)
2684 (inputs
2685 `(("guile" ,guile-2.2)
2686 ("guile-lib" ,guile-lib)
2687 ("guile-readline" ,guile-readline)))
2688 (propagated-inputs '())
2689 (arguments
2690 `(#:configure-flags '("--without-examples")
2691 #:phases
2692 (modify-phases %standard-phases
2693 (add-before 'configure 'setenv
2694 (lambda _
2695 (setenv "GUILE_AUTO_COMPILE" "0")
2696 #t))))))))
2697
2135610c
LC
2698(define-public guile-jpeg
2699 (let ((commit "6a1673578b297c2c1b28e44a76bd5c49e76a5046")
2700 (revision "0"))
2701 (package
2702 (name "guile-jpeg")
2703 (version (git-version "0.0" revision commit))
2704 (home-page "https://gitlab.com/wingo/guile-jpeg")
2705 (source (origin
2706 (method git-fetch)
2707 (uri (git-reference (url home-page)
2708 (commit commit)))
2709 (sha256
2710 (base32
2711 "05z9m408w3h6aqb5k3r3qa7khir0k10rxwvsrzhkcq1hr5vbmr4m"))
2712 (file-name (git-file-name name version))
2713 (modules '((guix build utils)))
2714 (snippet
2715 '(begin
2716 ;; Install .go files in the right place.
2717 (substitute* "Makefile.am"
2718 (("/ccache") "/site-ccache"))
2719 #t))))
2720 (build-system gnu-build-system)
2721 (native-inputs
2722 `(("autoconf" ,autoconf)
2723 ("automake" ,automake)
2724 ("pkg-config" ,pkg-config)
2725 ("guile" ,guile-2.2)))
2726 (synopsis "JPEG file parsing library for Guile")
2727 (description
2728 "Guile-JPEG is a Scheme library to parse JPEG image files and to
2729perform geometrical transforms on JPEG images.")
2730 (license license:gpl3+))))
e8c2da41
AS
2731
2732(define-public nomad
2733 (package
2734 (name "nomad")
5f1553ce 2735 (version "0.1.2-alpha")
e8c2da41
AS
2736 (source (origin
2737 (method git-fetch)
2738 (uri (git-reference
2739 (url "https://git.savannah.gnu.org/git/nomad.git")
2740 (commit version)))
2741 (file-name (git-file-name name version))
2742 (sha256
2743 (base32
5f1553ce 2744 "1dnkr1hmvfkwgxd75dcf93pg39yfgawvdpzdhv991yhghv0qxc9h"))))
e8c2da41
AS
2745 (build-system gnu-build-system)
2746 (native-inputs
2747 `(("autoconf" ,autoconf)
2748 ("automake" ,automake)
2749 ("bash" ,bash)
2750 ("pkg-config" ,pkg-config)
2751 ("libtool" ,libtool)
2752 ("guile" ,guile-2.2)
5f1553ce
AS
2753 ("glib:bin" ,glib "bin")
2754 ("texinfo" ,texinfo)
2755 ("perl" ,perl)))
e8c2da41
AS
2756 (inputs
2757 `(("guile" ,guile-2.2)
2758 ("guile-lib" ,guile-lib)
2759 ("guile-gcrypt" ,guile-gcrypt)
2760 ("guile-readline" ,guile-readline)
2761 ("gnutls" ,gnutls)
2762 ("shroud" ,shroud)
2763 ("emacsy" ,emacsy-minimal)
2764 ("glib" ,glib)
2765 ("dbus-glib" ,dbus-glib)
2766 ("gtk+" ,gtk+)
2767 ("gtksourceview" ,gtksourceview)
2768 ("webkitgtk" ,webkitgtk)
2769 ("xorg-server" ,xorg-server)))
2770 (propagated-inputs
2771 `(("glib" ,glib)
2772 ("glib-networking" ,glib-networking)
2773 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)))
2774 (arguments
2775 `(#:modules ((guix build gnu-build-system)
2776 (guix build utils)
2777 (ice-9 popen)
2778 (ice-9 rdelim)
2779 (srfi srfi-26))
2780 #:phases
2781 (modify-phases %standard-phases
2782 (add-before 'check 'start-xorg-server
2783 (lambda* (#:key inputs #:allow-other-keys)
2784 ;; The test suite requires a running X server.
2785 (system (format #f "~a/bin/Xvfb :1 &"
2786 (assoc-ref inputs "xorg-server")))
2787 (setenv "DISPLAY" ":1")
2788 #t))
2789 (add-after 'install 'wrap-binaries
2790 (lambda* (#:key inputs outputs #:allow-other-keys)
2791 (let* ((out (assoc-ref outputs "out"))
2792 (gio-deps (map (cut assoc-ref inputs <>) '("glib-networking"
2793 "glib")))
2794 (gio-mod-path (map (cut string-append <> "/lib/gio/modules")
2795 gio-deps))
2796 (effective (read-line (open-pipe*
2797 OPEN_READ
2798 "guile" "-c"
2799 "(display (effective-version))")))
2800 (deps (map (cut assoc-ref inputs <>)
2801 '("emacsy" "guile-lib" "guile-readline"
2802 "shroud")))
2803 (scm-path (map (cut string-append <>
2804 "/share/guile/site/" effective)
2805 `(,out ,@deps)))
2806 (go-path (map (cut string-append <>
2807 "/lib/guile/" effective "/site-ccache")
2808 `(,out ,@deps)))
2809 (progs (map (cut string-append out "/bin/" <>)
2810 '("nomad"))))
2811 (map (cut wrap-program <>
2812 `("GIO_EXTRA_MODULES" ":" prefix ,gio-mod-path)
2813 `("GUILE_LOAD_PATH" ":" prefix ,scm-path)
2814 `("GUILE_LOAD_COMPILED_PATH" ":"
2815 prefix ,go-path))
2816 progs)
2817 #t))))))
2818 (home-page "https://savannah.nongnu.org/projects/nomad/")
2819 (synopsis "Extensible Web Browser in Guile Scheme")
2820 (description "Nomad is an Emacs-like Web Browser built using Webkitgtk and
2821Emacsy. It has a small C layer and most browser features are fully
2822programmable in Guile. It has hooks, keymaps, and self documentation
2823features.")
2824 (license license:gpl3+)))
248965c9
RW
2825
2826(define-public guile-cv
2827 (package
2828 (name "guile-cv")
2829 (version "0.2.1")
2830 (source (origin
2831 (method url-fetch)
2832 (uri (string-append "mirror://gnu/guile-cv/guile-cv-"
2833 version ".tar.gz"))
2834 (sha256
2835 (base32
2836 "0qdf0s2h1xj5lbhnc1pfw69i3zg08pqy2y6869b92ydfis8r82j9"))))
2837 (build-system gnu-build-system)
2838 (arguments
2839 `(#:phases
2840 (modify-phases %standard-phases
2841 (add-after 'unpack 'prepare-build
2842 (lambda* (#:key inputs outputs #:allow-other-keys)
2843 (substitute* "configure"
2844 (("SITEDIR=\"\\$datadir/guile-cv\"")
2845 "SITEDIR=\"$datadir/guile/site/$GUILE_EFFECTIVE_VERSION\"")
2846 (("SITECCACHEDIR=\"\\$libdir/guile-cv/")
2847 "SITECCACHEDIR=\"$libdir/"))
2848 (substitute* "cv/init.scm"
2849 (("\\(dynamic-link \"libvigra_c\"\\)")
2850 (string-append "(dynamic-link \""
2851 (assoc-ref inputs "vigra-c")
2852 "/lib/libvigra_c\")"))
2853 (("\\(dynamic-link \"libguile-cv\"\\)")
2854 (format #f "~s"
2855 `(dynamic-link
2856 (format #f "~alibguile-cv"
2857 (if (getenv "GUILE_CV_UNINSTALLED")
2858 ""
2859 ,(format #f "~a/lib/"
2860 (assoc-ref outputs "out"))))))))
2861 (setenv "GUILE_CV_UNINSTALLED" "1")
2862 ;; Only needed to satisfy the configure script.
2863 (setenv "LD_LIBRARY_PATH"
2864 (string-append (assoc-ref inputs "vigra-c") "/lib"))
2865 #t)))))
2866 (inputs
2867 `(("vigra" ,vigra)
2868 ("vigra-c" ,vigra-c)
2869 ("guile" ,guile-2.2)))
2870 (native-inputs
2871 `(("texlive" ,(texlive-union (list texlive-booktabs
2872 texlive-lm
2873 texlive-siunitx
2874 texlive-standalone
2875 texlive-xcolor
2876 texlive-fonts-iwona)))
2877 ("pkg-config" ,pkg-config)))
2878 (propagated-inputs
2879 `(("guile-lib" ,guile-lib)))
2880 (home-page "https://www.gnu.org/software/guile-cv/")
2881 (synopsis "Computer vision library for Guile")
2882 (description "Guile-CV is a Computer Vision functional programming library
2883for the Guile Scheme language. It is based on Vigra (Vision with Generic
2884Algorithms), a C++ image processing and analysis library. Guile-CV contains
2885bindings to Vigra C (a C wrapper to most of the Vigra functionality) and is
2886enriched with pure Guile Scheme algorithms, all accessible through a nice,
2887clean and easy to use high level API.")
2888 (license license:gpl3+)))
7ff157c1
RW
2889
2890(define-public guile-ffi-fftw
353fb48f
RW
2891 (let ((commit "294ad9e7491dcb40026d2fec9be2af05263be1c0")
2892 (revision "2"))
7ff157c1
RW
2893 (package
2894 (name "guile-ffi-fftw")
2895 (version (git-version "0" revision commit))
2896 (source (origin
2897 (method git-fetch)
2898 (uri (git-reference
2899 (url "https://github.com/lloda/guile-ffi-fftw.git")
2900 (commit commit)))
2901 (file-name (git-file-name "guile-ffi-fftw" version))
2902 (sha256
2903 (base32
353fb48f 2904 "08j40a5p6a8pgvhffmzb5rfdnrav2mksy3gfjkdqy93jfj1z5afg"))))
7ff157c1
RW
2905 (build-system guile-build-system)
2906 (arguments
2907 `(#:source-directory "mod"
2908 #:phases
2909 (modify-phases %standard-phases
2910 (add-after 'unpack 'prepare-build
2911 (lambda* (#:key inputs #:allow-other-keys)
2912 (substitute* "mod/ffi/fftw.scm"
2913 (("\\(getenv \"GUILE_FFI_FFTW_LIBFFTW3_PATH\"\\)")
2914 (format #f "\"~a/lib\"" (assoc-ref inputs "fftw"))))
2915 #t))
2916 (add-after 'build 'check
2917 (lambda _
2918 (invoke "guile" "-L" "mod"
2919 "-s" "test/test-ffi-fftw.scm"))))))
2920 (inputs
2921 `(("fftw" ,fftw)
2922 ("guile" ,guile-2.2)))
2923 (home-page "https://github.com/lloda/guile-ffi-fftw/")
2924 (synopsis "Access FFTW through Guile's FFI")
2925 (description "This is a minimal set of Guile FFI bindings for the FFTW
2926library's ‘guru interface’. It provides two functions: @code{fftw-dft! rank
2927sign in out} and @code{fftw-dft rank sign in}. These bindings being minimal,
2928there is no support for computing & reusing plans, or split r/i transforms, or
2929anything other than straight complex DFTs.")
353fb48f 2930 (license license:lgpl3+))))
f9ec89f4
TS
2931
2932(define-public srfi-64-driver
2933 (package
2934 (name "srfi-64-driver")
2935 (version "0.1")
2936 (source (origin
2937 (method url-fetch)
2938 (uri (string-append "https://files.ngyro.com/srfi-64-driver/"
2939 "srfi-64-driver-" version ".tar.gz"))
2940 (sha256
2941 (base32
2942 "188b6mb7sjjg0a8zldikinglf40ky8mg8rwh5768gjmch6gkk3ph"))))
2943 (build-system gnu-build-system)
2944 (arguments
2945 `(#:tests? #f
2946 #:phases
2947 (modify-phases %standard-phases
2948 (delete 'build))))
2949 (native-inputs
2950 `(("pkg-config" ,pkg-config)))
2951 (inputs
2952 `(("guile" ,guile-2.2)))
2953 (home-page "https://ngyro.com/software/srfi-64-driver.html")
2954 (synopsis "Automake test driver for SRFI 64 test suites")
2955 (description "This package provides an Automake test driver that can
2956run SRFI 64 test suites. It gives Automake insight into the individual
2957tests being run, resulting clearer and more specific output.")
2958 (license license:gpl3+)))
f6bf4b2c
TS
2959
2960(define-public guile-semver
2961 (package
2962 (name "guile-semver")
2963 (version "0.1.0")
2964 (source (origin
2965 (method url-fetch)
2966 (uri (string-append "https://files.ngyro.com/guile-semver/"
2967 "guile-semver-" version ".tar.gz"))
2968 (sha256
2969 (base32
2970 "06b66rj7nyhr6i3dpkwvfw1xb10w2pngrsw2hxfxkznwsbh9byfz"))))
2971 (build-system gnu-build-system)
2972 (native-inputs
2973 `(("pkg-config" ,pkg-config)
2974 ("srfi-64-driver" ,srfi-64-driver)))
2975 (inputs
2976 `(("guile" ,guile-2.2)))
2977 (home-page "https://ngyro.com/software/guile-semver.html")
2978 (synopsis "Semantic Versioning (SemVer) for Guile")
2979 (description "This Guile library provides tools for reading,
2980comparing, and writing Semantic Versions. It also includes ranges in
2981the style of the Node Package Manager (NPM).")
2982 (license license:gpl3+)))
d67fa5c8
LC
2983
2984(define-public guile-hashing
2985 (package
2986 (name "guile-hashing")
2987 (version "1.2.0")
2988 (home-page "https://github.com/weinholt/hashing")
2989 (source (origin
2990 (method git-fetch)
2991 (uri (git-reference
2992 (url home-page)
2993 (commit (string-append "v" version))))
2994 (file-name (git-file-name name version))
2995 (sha256
2996 (base32
2997 "1362d3lmpv7slmv1zmr9wy8panq9sjr9787gc2hagd646mpsfpkl"))))
2998 (build-system guile-build-system)
2999 (arguments
3000 `(#:modules ((guix build guile-build-system)
3001 (guix build utils)
3002 (srfi srfi-26)
3003 (ice-9 ftw))
3004 #:implicit-inputs? #f ;needs nothing but Guile
3005 #:phases (modify-phases %standard-phases
3006 (add-before 'build 'move-sls-files
3007 (lambda _
3008 ;; Move the source under hashing/ in order to match
3009 ;; module names, and rename .sls files to .scm.
3010 (define (target file)
3011 (string-append "hashing/" file))
3012
3013 (define (sls->scm sls)
3014 (string-append (string-drop-right sls 4)
3015 ".scm"))
3016
3017 (mkdir "hashing")
3018 (for-each (lambda (file)
3019 (rename-file file (sls->scm file)))
3020 (find-files "." "\\.sls$"))
3021 (for-each (lambda (file)
3022 (rename-file file (target file)))
3023 (scandir "." (cut string-suffix? ".scm" <>)))
3024 (rename-file "private" "hashing/private")
3025 #t)))))
3026 (native-inputs
3027 `(("guile" ,guile-2.2)))
3028 (synopsis "Cryprographic hash functions implemented in Scheme")
3029 (description
3030 "The @code{(hashing @dots{})} modules implement cryptographic hash
3031functions in pure R6RS Scheme: CRC, HMAC, MD5, SHA-1, and SHA-2 (SHA-256,
3032SHA-512).")
3033 (license license:expat)))
f918a8d9
LC
3034
3035(define-public guile3.0-hashing
3036 (package
3037 (inherit guile-hashing)
3038 (name "guile3.0-hashing")
3039 (native-inputs
3040 `(("guile" ,guile-next)))))
ef2b1d2c
RW
3041
3042(define-public guile-webutils
3043 (let ((commit "8541904f761066dc9c27b1153e9a838be9a55299")
3044 (revision "0"))
3045 (package
3046 (name "guile-webutils")
3047 (version (git-version "0.1" revision commit))
3048 (source (origin
3049 (method git-fetch)
3050 (uri (git-reference
3051 (url "https://notabug.org/cwebber/guile-webutils.git")
3052 (commit commit)))
3053 (file-name (git-file-name name version))
3054 (sha256
3055 (base32
3056 "1s9n3hbxd7lfpdi0x8wr0cfvlsf6g62ird9gbspxdrp5p05rbi64"))))
3057 (build-system gnu-build-system)
3058 (native-inputs
3059 `(("autoconf" ,autoconf)
3060 ("automake" ,automake)
3061 ("pkg-config" ,pkg-config)
3062 ("texinfo" ,texinfo)))
3063 (inputs
3064 `(("guile" ,guile-2.2)))
3065 (propagated-inputs
3066 `(("guile-irregex" ,guile-irregex)
3067 ("guile-gcrypt" ,guile-gcrypt)))
3068 (home-page "https://notabug.org/cwebber/guile-webutils")
3069 (synopsis "Web application authoring utilities for Guile")
3070 (description
3071 "This package provides tooling to write web applications in Guile, such
3072as signed sessions, multipart message support, etc.")
3073 (license license:gpl3+))))
5479cef8
RW
3074
3075(define-public guile-lens
3076 (let ((commit "14b15d07255f9d3f55d40a3b750d13c9ee3a154f")
3077 (revision "0"))
3078 (package
3079 (name "guile-lens")
3080 (version (git-version "0.1" revision commit))
3081 (source (origin
3082 (method git-fetch)
3083 (uri (git-reference
3084 (url "https://gitlab.com/a-sassmannshausen/guile-lens.git")
3085 (commit commit)))
3086 (file-name (git-file-name name version))
3087 (sha256
3088 (base32
3089 "0w8jzqyla56yrgj7acsgd4nspyir6zgp3vgxid4xmwhg9wmf1ida"))))
3090 (build-system gnu-build-system)
3091 (arguments
3092 '(#:phases
3093 (modify-phases %standard-phases
3094 (add-after 'unpack 'run-hall
3095 (lambda _
3096 (setenv "HOME" "/tmp") ; for ~/.hall
3097 (invoke "hall" "dist" "-x"))))))
3098 (native-inputs
3099 `(("autoconf" ,autoconf)
3100 ("automake" ,automake)
3101 ("guile" ,guile-2.2)
3102 ("guile-hall" ,guile-hall)
3103 ("pkg-config" ,pkg-config)
3104 ("texinfo" ,texinfo)))
3105 (home-page "https://gitlab.com/a-sassmannshausen/guile-lens.git")
3106 (synopsis "Composable lenses for data structures in Guile")
3107 (description
3108 "Guile-Lens is a library implementing lenses in Guile. The library is
3109currently a re-implementation of the lentes library for Clojure. Lenses
3110provide composable procedures, which can be used to focus, apply functions
3111over, or update a value in arbitrary data structures.")
3112 (license license:gpl3+))))