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