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