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