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