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