1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2014, 2015, 2018 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2015, 2017 Christopher Allan Webber <cwebber@dustycloud.org>
5 ;;; Copyright © 2016 Alex Sassmannshausen <alex@pompo.co>
6 ;;; Copyright © 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
7 ;;; Copyright © 2016 Erik Edrosa <erik.edrosa@gmail.com>
8 ;;; Copyright © 2016 Eraim Flashner <efraim@flashner.co.il>
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>
12 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
13 ;;; Copyright © 2017 Andy Wingo <wingo@igalia.com>
14 ;;; Copyright © 2017 David Thompson <davet@gnu.org>
15 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
16 ;;; Copyright © 2017 Theodoros Foradis <theodoros@foradis.org>
17 ;;; Copyright © 2017 Nils Gillmann <ng0@n0.is>
18 ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
19 ;;; Copyright © 2018 Maxim Cournoyer <maxim.cournoyer@gmail.com>
20 ;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
21 ;;; Copyright © 2018 Pierre-Antoine Rouby <pierre-antoine.rouby@inria.fr>
23 ;;; This file is part of GNU Guix.
25 ;;; GNU Guix is free software; you can redistribute it and/or modify it
26 ;;; under the terms of the GNU General Public License as published by
27 ;;; the Free Software Foundation; either version 3 of the License, or (at
28 ;;; your option) any later version.
30 ;;; GNU Guix is distributed in the hope that it will be useful, but
31 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
32 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33 ;;; GNU General Public License for more details.
35 ;;; You should have received a copy of the GNU General Public License
36 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
38 (define-module (gnu packages guile)
39 #:use-module ((guix licenses) #:prefix license:)
40 #:use-module (gnu packages)
41 #:use-module (gnu packages aspell)
42 #:use-module (gnu packages bash)
43 #:use-module (gnu packages bdw-gc)
44 #:use-module (gnu packages compression)
45 #:use-module (gnu packages gawk)
46 #:use-module (gnu packages gperf)
47 #:use-module (gnu packages libffi)
48 #:use-module (gnu packages autotools)
49 #:use-module (gnu packages flex)
50 #:use-module (gnu packages libunistring)
51 #:use-module (gnu packages linux)
52 #:use-module (gnu packages m4)
53 #:use-module (gnu packages multiprecision)
54 #:use-module (gnu packages pkg-config)
55 #:use-module (gnu packages readline)
56 #:use-module (gnu packages ncurses)
57 #:use-module (gnu packages ed)
58 #:use-module (gnu packages base)
59 #:use-module (gnu packages texinfo)
60 #:use-module (gnu packages man)
61 #:use-module (gnu packages gettext)
62 #:use-module (gnu packages databases)
63 #:use-module (gnu packages python)
64 #:use-module (gnu packages tls)
65 #:use-module (gnu packages gl)
66 #:use-module (gnu packages sdl)
67 #:use-module (gnu packages maths)
68 #:use-module (gnu packages image)
69 #:use-module (gnu packages version-control)
70 #:use-module (gnu packages xdisorg)
71 #:use-module (gnu packages xorg)
72 #:use-module (gnu packages networking)
73 #:use-module (guix packages)
74 #:use-module (guix download)
75 #:use-module (guix git-download)
76 #:use-module (guix build-system gnu)
77 #:use-module (guix build-system trivial)
78 #:use-module (guix utils)
79 #:use-module (ice-9 match)
80 #:use-module ((srfi srfi-1) #:prefix srfi-1:))
84 ;;; GNU Guile, and modules and extensions.
88 (define-public guile-1.8
94 (uri (string-append "mirror://gnu/guile/guile-" version
98 "0l200a0v7h8bh0cwz6v7hc13ds39cgqsmfrks55b1rbj5vniyiy3"))
99 (patches (search-patches "guile-1.8-cpp-4.5.patch"))))
100 (build-system gnu-build-system)
101 (arguments '(#:configure-flags '("--disable-error-on-warning")
103 ;; Insert a phase before `configure' to patch things up.
105 (modify-phases %standard-phases
106 (add-before 'configure 'patch-stuff
107 (lambda* (#:key outputs #:allow-other-keys)
108 ;; Add a call to `lt_dladdsearchdir' so that
109 ;; `libguile-readline.so' & co. are in the
110 ;; loader's search path.
111 (substitute* "libguile/dynl.c"
112 (("lt_dlinit.*$" match)
114 " ~a~% lt_dladdsearchdir(\"~a/lib\");~%"
116 (assoc-ref outputs "out"))))
118 ;; The usual /bin/sh...
119 (substitute* "ice-9/popen.scm"
120 (("/bin/sh") (which "sh")))
122 (inputs `(("gawk" ,gawk)
123 ("readline" ,readline)))
125 ;; Since `guile-1.8.pc' has "Libs: ... -lgmp -lltdl", these must be
127 (propagated-inputs `(("gmp" ,gmp)
128 ("libltdl" ,libltdl)))
130 ;; When cross-compiling, a native version of Guile itself is needed.
131 (self-native-input? #t)
134 (list (search-path-specification
135 (variable "GUILE_LOAD_PATH")
136 (files '("share/guile/site")))))
138 (synopsis "Scheme implementation intended especially for extensions")
140 "Guile is the GNU Ubiquitous Intelligent Language for Extensions, the
141 official extension language of the GNU system. It is an implementation of
142 the Scheme language which can be easily embedded in other applications to
143 provide a convenient means of extending the functionality of the application
144 without requiring the source code to be rewritten.")
145 (home-page "https://www.gnu.org/software/guile/")
146 (license license:lgpl2.0+)))
148 (define-public guile-2.0
154 (uri (string-append "mirror://gnu/guile/guile-" version
158 "10lxc6l5alf3lzbs3ihnbfy6dfcrsyf8667wa57f26vf4mk2ai78"))))
159 (build-system gnu-build-system)
160 (native-inputs `(("pkgconfig" ,pkg-config)))
161 (inputs `(("libffi" ,libffi)
162 ,@(libiconv-if-needed)
164 ;; We need Bash when cross-compiling because some of the scripts
165 ;; in bin/ refer to it. Use 'bash-minimal' because we don't need
166 ;; an interactive Bash with Readline and all.
167 ,@(if (target-mingw?) '() `(("bash" ,bash-minimal)))))
169 `( ;; These ones aren't normally needed here, but since `libguile-2.0.la'
170 ;; reads `-lltdl -lunistring', adding them here will add the needed
171 ;; `-L' flags. As for why the `.la' file lacks the `-L' flags, see
172 ;; <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/18903>.
173 ("libunistring" ,libunistring)
175 ;; Depend on LIBLTDL, not LIBTOOL. That way, we avoid some the extra
176 ;; dependencies that LIBTOOL has, which is helpful during bootstrap.
179 ;; The headers and/or `guile-2.0.pc' refer to these packages, so they
180 ;; must be propagated.
184 (self-native-input? #t)
186 (outputs '("out" "debug"))
189 `(#:configure-flags '("--disable-static") ; saves 3 MiB
191 (modify-phases %standard-phases
192 (add-before 'configure 'pre-configure
193 (lambda* (#:key inputs #:allow-other-keys)
194 ;; Tell (ice-9 popen) the file name of Bash.
195 (let ((bash (assoc-ref inputs "bash")))
196 (substitute* "module/ice-9/popen.scm"
197 ;; If bash is #f allow fallback for user to provide
198 ;; "bash" in PATH. This happens when cross-building to
199 ;; MinGW for which we do not have Bash yet.
201 ,@(if (target-mingw?)
203 (string-append bash "/bin/bash")
205 '((string-append bash "/bin/bash")))))
209 (list (search-path-specification
210 (variable "GUILE_LOAD_PATH")
211 (files '("share/guile/site/2.0")))
212 (search-path-specification
213 (variable "GUILE_LOAD_COMPILED_PATH")
214 (files '("lib/guile/2.0/site-ccache"
215 "share/guile/site/2.0")))))
217 (synopsis "Scheme implementation intended especially for extensions")
219 "Guile is the GNU Ubiquitous Intelligent Language for Extensions, the
220 official extension language of the GNU system. It is an implementation of
221 the Scheme language which can be easily embedded in other applications to
222 provide a convenient means of extending the functionality of the application
223 without requiring the source code to be rewritten.")
224 (home-page "https://www.gnu.org/software/guile/")
225 (license license:lgpl3+)))
227 (define-public guile-2.2
228 (package (inherit guile-2.0)
234 ;; Note: we are limited to one of the compression formats
235 ;; supported by the bootstrap binaries, so no lzip here.
236 (uri (string-append "mirror://gnu/guile/guile-" version
240 "11j01agvnci2cx32wwpqs9078856yxmvs15gcsz7ganpkj2ahlw3"))
241 (modules '((guix build utils)))
243 ;; Remove the pre-built object files. Instead, build everything
244 ;; from source, at the expense of significantly longer build
245 ;; times (almost 3 hours on a 4-core Intel i5).
247 (for-each delete-file
248 (find-files "prebuilt" "\\.go$"))
250 (properties '((timeout . 72000) ;20 hours
251 (max-silent-time . 36000))) ;10 hours (needed on ARM
252 ; when heavily loaded)
254 (list (search-path-specification
255 (variable "GUILE_LOAD_PATH")
256 (files '("share/guile/site/2.2")))
257 (search-path-specification
258 (variable "GUILE_LOAD_COMPILED_PATH")
259 (files '("lib/guile/2.2/site-ccache"
260 "share/guile/site/2.2")))))
263 (if (%current-target-system)
264 (substitute-keyword-arguments (package-arguments guile-2.0)
265 ((#:phases phases '%standard-phases)
266 `(modify-phases ,phases
267 (add-after 'unpack 'sacrifice-elisp-support
269 ;; Cross-compiling language/elisp/boot.el fails, so
271 ;; <https://git.savannah.gnu.org/cgit/guile.git/commit/?h=stable-2.2&id=988aa29238fca862c7e2cb55f15762a69b4c16ce>
272 ;; for the upstream fix.
273 (substitute* "module/Makefile.in"
274 (("language/elisp/boot\\.el")
277 (package-arguments guile-2.0)))))
279 (define-public guile-2.2/fixed
280 ;; A package of Guile 2.2 that's rarely changed. It is the one used
281 ;; in the `base' module, and thus changing it entails a full rebuild.
284 (properties '((hidden? . #t) ;people should install 'guile-2.2'
285 (timeout . 72000) ;20 hours
286 (max-silent-time . 36000))))) ;10 hours (needed on ARM
287 ; when heavily loaded)
289 (define-public guile-2.2.2
290 ;; Keep it so that, when 'guix' runs on 2.2.2, 'guix pull' compiles objects
291 ;; with 2.2.2, thereby avoiding the ABI incompatibility issues described in
292 ;; <https://bugs.gnu.org/29570>.
297 (inherit (package-source guile-2.2))
298 (uri (string-append "mirror://gnu/guile/guile-" version
302 "1azm25zcmxif0skxfrp11d2wc89nrzpjaann9yxdw6pvjxhs948w"))))))
304 (define-public guile-next
305 (deprecated-package "guile-next" guile-2.2))
307 (define (make-guile-readline guile)
309 (name "guile-readline")
310 (version (package-version guile))
311 (source (package-source guile))
312 (build-system gnu-build-system)
314 '(#:configure-flags '("--disable-silent-rules")
315 #:phases (modify-phases %standard-phases
316 (add-before 'build 'chdir
317 (lambda* (#:key outputs #:allow-other-keys)
318 (invoke "make" "-C" "libguile" "scmconfig.h")
319 (invoke "make" "-C" "lib")
320 (chdir "guile-readline")
322 (substitute* "Makefile"
323 (("../libguile/libguile-[[:graph:]]+\\.la")
324 ;; Remove dependency on libguile-X.Y.la.
326 (("^READLINE_LIBS = (.*)$" _ libs)
327 ;; Link against the provided libguile.
328 (string-append "READLINE_LIBS = "
329 "-lguile-$(GUILE_EFFECTIVE_VERSION) "
331 (("\\$\\(top_builddir\\)/meta/build-env")
332 ;; Use the provided Guile, not the one from
336 ;; Install modules to the 'site' directories.
338 "moddir = $(pkgdatadir)/site/$(GUILE_EFFECTIVE_VERSION)\n")
339 (("^ccachedir = .*$")
340 "ccachedir = $(pkglibdir)/$(GUILE_EFFECTIVE_VERSION)/site-ccache\n"))
342 ;; Load 'guile-readline.so' from the right place.
343 (substitute* "ice-9/readline.scm"
344 (("load-extension \"guile-readline\"")
345 (format #f "load-extension \
346 (string-append ~s \"/lib/guile/\" (effective-version) \"/extensions/guile-readline\")"
347 (assoc-ref outputs "out"))))
349 (home-page (package-home-page guile))
350 (native-inputs (package-native-inputs guile))
352 `(,@(package-inputs guile) ;to placate 'configure'
353 ,@(package-propagated-inputs guile)
355 ("readline" ,readline)))
356 (synopsis "Line editing support for GNU Guile")
358 "This module provides line editing support via the Readline library for
359 GNU@tie{}Guile. Use the @code{(ice-9 readline)} module and call its
360 @code{activate-readline} procedure to enable it.")
361 (license license:gpl3+)))
363 (define-public guile-readline
364 (make-guile-readline guile-2.2))
366 (define (guile-variant-package-name prefix)
368 "Return NAME with PREFIX instead of \"guile-\", when applicable."
369 (if (string-prefix? "guile-" name)
370 (string-append prefix "-"
372 (string-length "guile-")))
375 (define package-for-guile-2.2
376 ;; A procedure that rewrites the dependency tree of the given package to use
377 ;; GUILE-2.2 instead of GUILE-2.0.
378 (package-input-rewriting `((,guile-2.0 . ,guile-2.2))
379 (guile-variant-package-name "guile2.2")))
381 (define package-for-guile-2.0
382 ;; Likewise, but the other way around. :-)
383 (package-input-rewriting `((,guile-2.2 . ,guile-2.0))
384 (guile-variant-package-name "guile2.0")))
386 (define-public guile-for-guile-emacs
387 (package (inherit guile-2.2)
388 (name "guile-for-guile-emacs")
389 (version "20150510.d8d9a8d")
393 (url "git://git.hcoop.net/git/bpt/guile.git")
394 (commit "d8d9a8da05ec876acba81a559798eb5eeceb5a17")))
395 (file-name (string-append name "-" version "-checkout"))
398 "00sprsshy16y8pxjy126hr2adqcvvzzz96hjyjwgg8swva1qh6b0"))))
400 (substitute-keyword-arguments `(;; Tests aren't passing for now.
401 ;; Obviously we should re-enable this!
403 ,@(package-arguments guile-2.2))
405 `(modify-phases ,phases
406 (add-after 'unpack 'autogen
408 (zero? (system* "sh" "autogen.sh"))))
409 (add-before 'autogen 'patch-/bin/sh
411 (substitute* "build-aux/git-version-gen"
412 (("#!/bin/sh") (string-append "#!" (which "sh"))))
415 `(("autoconf" ,autoconf)
416 ("automake" ,automake)
420 ("gettext" ,gettext-minimal)
421 ,@(package-native-inputs guile-2.2)))
422 ;; Same as in guile-2.0
424 (list (search-path-specification
425 (variable "GUILE_LOAD_PATH")
426 (files '("share/guile/site/2.0")))
427 (search-path-specification
428 (variable "GUILE_LOAD_COMPILED_PATH")
429 (files '("lib/guile/2.0/site-ccache"
430 "share/guile/site/2.0")))))))
432 ;; There has not been any release yet.
433 (define-public guildhall
434 (let ((commit "2fe2cc539f4b811bbcd69e58738db03eb5a2b778")
438 (version (string-append "0-" revision "." (string-take commit 9)))
442 (url "https://github.com/ijp/guildhall.git")
444 (file-name (string-append name "-" version "-checkout"))
447 "115bym7bg66h3gs399yb2vkzc2ygriaqsn4zbrg8f054mgy8wzn1"))))
448 (build-system gnu-build-system)
451 (modify-phases %standard-phases
452 ;; Tests fail without this fix because they try to load the bash
453 ;; executable as a Scheme file. See bug report at
454 ;; https://github.com/ijp/guildhall/issues/22
455 (add-after 'unpack 'fix-bug-22
457 (substitute* "Makefile.am"
458 (("TESTS_ENVIRONMENT=.*")
459 "AM_TESTS_ENVIRONMENT=srcdir=$(abs_top_srcdir)/tests/
460 TEST_EXTENSIONS = .scm
461 SCM_LOG_COMPILER= $(top_builddir)/env $(GUILE)
462 AM_SCM_LOG_FLAGS = --no-auto-compile -s")
463 ;; FIXME: one of the database tests fails for unknown
464 ;; reasons. It does not fail when run outside of Guix.
465 (("tests/database.scm") ""))
467 (add-after 'fix-bug-22 'autogen
469 (zero? (system* "sh" "autogen.sh")))))))
471 `(("guile" ,guile-2.0)))
473 `(("zip" ,zip) ; for tests
474 ("autoconf" ,autoconf)
475 ("automake" ,automake)
476 ("texinfo" ,texinfo)))
477 (synopsis "Package manager for Guile")
479 "Guildhall is a package manager written for Guile Scheme. A guild is
480 an association of independent craftspeople. A guildhall is where they meet.
481 This Guildhall aims to make a virtual space for Guile wizards and journeyfolk
484 On a practical level, Guildhall lets you share Scheme modules and programs
485 over the internet, and install code that has been shared by others. Guildhall
486 can handle dependencies, so when a program requires several libraries, and
487 each of those has further dependencies, all of the prerequisites for the
488 program can be installed in one go.")
489 (home-page "https://github.com/ijp/guildhall")
490 (license license:gpl3+))))
497 (define-public artanis
498 (let ((release "0.2.1")
502 (version (if (zero? revision)
504 (string-append release "-"
505 (number->string revision))))
508 (uri (string-append "mirror://gnu/artanis/artanis-"
510 (file-name (string-append name "-" version ".tar.gz"))
513 "041ajcg2pz918kd9iqcj4inpzddc3impvz3r2nhlpbv8zrz011hn"))
514 (modules '((guix build utils)))
517 (delete-file-recursively "artanis/third-party/json.scm")
518 (delete-file-recursively "artanis/third-party/json")
519 (substitute* '("artanis/artanis.scm"
521 (("(#:use-module \\()artanis third-party (json\\))" _
523 (string-append use-module json)))
524 (substitute* "artanis/oht.scm"
525 (("([[:punct:][:space:]]+)(->json-string)([[:punct:][:space:]]+)"
526 _ pre json-string post)
530 (substitute* "artanis/artanis.scm"
531 (("[[:punct:][:space:]]+->json-string[[:punct:][:space:]]+")
534 (build-system gnu-build-system)
535 ;; TODO: Add guile-dbi and guile-dbd optional dependencies.
536 (inputs `(("guile" ,guile-2.2)
537 ("guile-json" ,guile-json)))
538 (native-inputs `(("bash" ,bash) ;for the `source' builtin
539 ("pkgconfig" ,pkg-config)
540 ("util-linux" ,util-linux))) ;for the `script' command
543 ;; TODO: The documentation must be built with the `docs' target.
544 (let* ((out (assoc-ref %outputs "out"))
545 (scm (string-append out "/share/guile/site/2.2"))
546 (go (string-append out "/lib/guile/2.2/site-ccache")))
547 ;; Don't use (%site-dir) for site paths.
548 (list (string-append "MOD_PATH=" scm)
549 (string-append "MOD_COMPILED_PATH=" go)))
552 (modify-phases %standard-phases
553 (add-before 'install 'substitute-root-dir
554 (lambda* (#:key outputs #:allow-other-keys)
555 (let ((out (assoc-ref outputs "out")))
556 (substitute* "Makefile" ;ignore the execution of bash.bashrc
557 ((" /etc/bash.bashrc") " /dev/null"))
558 (substitute* "Makefile" ;set the root of config files to OUT
559 ((" /etc") (string-append " " out "/etc")))
560 (mkdir-p (string-append out "/bin")) ;for the `art' executable
562 (add-after 'install 'wrap-art
563 (lambda* (#:key outputs #:allow-other-keys)
564 (let* ((out (assoc-ref outputs "out"))
565 (bin (string-append out "/bin"))
566 (scm (string-append out "/share/guile/site/2.2"))
567 (go (string-append out "/lib/guile/2.2/site-ccache")))
568 (wrap-program (string-append bin "/art")
569 `("GUILE_LOAD_PATH" ":" prefix (,scm))
570 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,go)))
572 (synopsis "Web application framework written in Guile")
573 (description "GNU Artanis is a web application framework written in Guile
574 Scheme. A web application framework (WAF) is a software framework that is
575 designed to support the development of dynamic websites, web applications, web
576 services and web resources. The framework aims to alleviate the overhead
577 associated with common activities performed in web development. Artanis
578 provides several tools for web development: database access, templating
579 frameworks, session management, URL-remapping for RESTful, page caching, and
581 (home-page "https://www.gnu.org/software/artanis/")
582 (license (list license:gpl3+ license:lgpl3+))))) ;dual license
584 (define-public guile-reader
586 (name "guile-reader")
590 (uri (string-append "mirror://savannah/guile-reader/guile-reader-"
594 "0592s2s8ampqmqwilc4fvcild6rb9gy79di6vxv5kcdmv23abkgx"))))
595 (build-system gnu-build-system)
596 (native-inputs `(("pkgconfig" ,pkg-config)
597 ("gperf" ,gperf-3.0)))
598 (inputs `(("guile" ,guile-2.2)))
599 (synopsis "Framework for building readers for GNU Guile")
601 "Guile-Reader is a simple framework for building readers for GNU Guile.
603 The idea is to make it easy to build procedures that extend Guile’s read
604 procedure. Readers supporting various syntax variants can easily be written,
605 possibly by re-using existing “token readers” of a standard Scheme
606 readers. For example, it is used to implement Skribilo’s R5RS-derived
609 Guile-Reader’s approach is similar to Common Lisp’s “read table”, but
610 hopefully more powerful and flexible (for instance, one may instantiate as
611 many readers as needed).")
612 (home-page "https://www.nongnu.org/guile-reader/")
613 (license license:gpl3+)))
615 (define-public guile2.0-reader
616 (package-for-guile-2.0 guile-reader))
617 (define-public guile2.2-reader
618 (deprecated-package "guile2.2-reader" guile-reader))
620 (define-public guile-ncurses
622 (name "guile-ncurses")
626 (uri (string-append "mirror://gnu/guile-ncurses/guile-ncurses-"
630 "1wvggbr4xv8idh1hzd8caj4xfp4pln78a7w1wqzd4zgzwmnzxr2f"))))
631 (build-system gnu-build-system)
632 (inputs `(("ncurses" ,ncurses)
633 ("guile" ,guile-2.2)))
634 (native-inputs `(("pkg-config" ,pkg-config)))
636 '(#:configure-flags (list "--with-ncursesw" ; Unicode support
637 "--with-gnu-filesystem-hierarchy")
639 (modify-phases %standard-phases
640 (add-before 'build 'fix-libguile-ncurses-file-name
641 (lambda* (#:key outputs #:allow-other-keys)
642 (and (zero? (system* "make" "install"
645 (parallel-job-count))))
646 (let* ((out (assoc-ref outputs "out"))
648 (files (find-files dir ".scm")))
650 (("\"libguile-ncurses\"")
651 (format #f "\"~a/lib/guile/2.2/libguile-ncurses\""
654 (home-page "https://www.gnu.org/software/guile-ncurses/")
655 (synopsis "Guile bindings to ncurses")
657 "guile-ncurses provides Guile language bindings for the ncurses
659 (license license:lgpl3+)))
661 (define-public guile-ncurses/gpm
663 (inherit guile-ncurses)
664 (name "guile-ncurses-with-gpm")
665 (inputs `(("ncurses" ,ncurses/gpm)
666 ("guile" ,guile-2.2)))))
674 (uri (string-append "mirror://gnu/mcron/mcron-"
678 "1i9mcp6r6my61zfiydsm3n6my41mwvl7dfala4q29qx0zn1ynlm4"))))
679 (build-system gnu-build-system)
681 '(#:phases (modify-phases %standard-phases
682 (add-before 'check 'set-timezone
683 (lambda* (#:key inputs #:allow-other-keys)
684 ;; 'tests/job-specifier.scm' expects to be running in
685 ;; UTC-2 or something.
686 ;; FIXME: This issue is being investigated upstream, for
687 ;; now we'll just skip the tests (see below):
688 ;; <https://lists.gnu.org/archive/html/bug-mcron/2018-04/msg00005.html>.
689 (let ((tzdata (assoc-ref inputs "tzdata")))
691 (string-append tzdata
693 (setenv "TZ" "UTC-2")
695 (add-before 'check 'adjust-tests
697 (substitute* "tests/job-specifier.scm"
698 ;; (getpw) fails with "entry not found" in the build
699 ;; environment, so pass an argument.
701 "(getpwnam (getuid))")
702 ;; The build environment lacks an entry for root in
705 "(getpwnam \"nobody\")")
707 ;; FIXME: Skip the 4 faulty tests (see above).
708 (("\\(test-equal \"next-year\"" all)
709 (string-append "(test-skip 4)\n" all)))
711 (native-inputs `(("pkg-config" ,pkg-config)
712 ("tzdata" ,tzdata-for-tests)))
713 (inputs `(("ed" ,ed) ("which" ,which) ("guile" ,guile-2.2)))
714 (home-page "https://www.gnu.org/software/mcron/")
715 (synopsis "Run jobs at scheduled times")
717 "GNU Mcron is a complete replacement for Vixie cron. It is used to run
718 tasks on a schedule, such as every hour or every Monday. Mcron is written in
719 Guile, so its configuration can be written in Scheme; the original cron
720 format is also supported.")
721 (license license:gpl3+)))
723 (define-public mcron2
724 ;; This was mthl's mcron development branch, and it became mcron 1.1.
725 (deprecated-package "mcron2" mcron))
727 (define-public guile-ics
734 (url "https://github.com/artyom-poptsov/guile-ics")
735 (commit (string-append "v" version))))
736 (file-name (string-append name "-" version "-checkout"))
739 "0qjjvadr7gibdq9jvwkmlkb4afsw9n2shfj9phpiadinxk3p4m2g"))))
740 (build-system gnu-build-system)
742 '(#:phases (modify-phases %standard-phases
743 (add-after 'unpack 'autoreconf
745 ;; Repository comes with a broken symlink
746 (delete-file "README")
747 (symlink "README.org" "README")
748 (zero? (system* "autoreconf" "-fi")))))))
750 `(("autoconf" ,autoconf-wrapper)
751 ("automake" ,automake)
753 ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'.
754 ("gettext" ,gettext-minimal)
755 ("pkg-config" ,pkg-config)))
756 (inputs `(("guile" ,guile-2.2) ("which" ,which)))
757 (propagated-inputs `(("guile-lib" ,guile-lib)))
758 (home-page "https://github.com/artyom-poptsov/guile-ics")
759 (synopsis "Guile parser library for the iCalendar format")
761 "Guile-ICS is an iCalendar (RFC5545) format parser library written in
762 pure Scheme. The library can be used to read and write iCalendar data.
764 The library is shipped with documentation in Info format and usage examples.")
765 (license license:gpl3+)))
767 (define-public guile-lib
773 (uri (string-append "mirror://savannah/guile-lib/guile-lib-"
777 "19q420i3is3d4jmkdqs5y7ir7ipp4s795saflqgwf6617cx2zpj4"))))
778 (build-system gnu-build-system)
781 '("GUILE_AUTO_COMPILE=0") ;to prevent guild errors
783 (modify-phases %standard-phases
784 (add-before 'configure 'patch-module-dir
786 (substitute* "src/Makefile.in"
787 (("^moddir = ([[:graph:]]+)")
788 "moddir = $(datadir)/guile/site/@GUILE_EFFECTIVE_VERSION@\n")
789 (("^godir = ([[:graph:]]+)")
791 $(libdir)/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n"))
793 (native-inputs `(("pkg-config" ,pkg-config)))
794 (inputs `(("guile" ,guile-2.2)))
795 (home-page "https://www.nongnu.org/guile-lib/")
796 (synopsis "Collection of useful Guile Scheme modules")
798 "Guile-Lib is intended as an accumulation place for pure-scheme Guile
799 modules, allowing for people to cooperate integrating their generic Guile
800 modules into a coherent library. Think \"a down-scaled, limited-scope CPAN
803 ;; The whole is under GPLv3+, but some modules are under laxer
804 ;; distribution terms such as LGPL and public domain. See `COPYING' for
806 (license license:gpl3+)))
808 (define-public guile2.0-lib
809 (package-for-guile-2.0 guile-lib))
811 (define-public guile2.2-lib
812 (deprecated-package "guile2.2-lib" guile-lib))
814 (define-public guile-json
818 (home-page "https://github.com/aconchillo/guile-json")
821 (uri (string-append home-page "/archive/"
823 (file-name (string-append name "-" version ".tar.gz"))
826 "16155dv30rhagz6dwv7xc87l386i8v0f1kgydqa2ajr166fi9qhr"))
827 (modules '((guix build utils)))
829 ;; Make sure everything goes under .../site/X.Y, like Guile's
830 ;; search paths expects.
832 (substitute* "configure.ac"
834 (string-append "GUILE_PROGS\n"
835 "AC_SUBST([GUILE_EFFECTIVE_VERSION])\n")))
836 (substitute* '("Makefile.am" "json/Makefile.am")
837 (("moddir[[:blank:]]*=.*/share/guile/site" all)
838 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))
840 (build-system gnu-build-system)
841 (native-inputs `(("autoconf" ,autoconf)
842 ("automake" ,automake)
843 ("guile" ,guile-2.2)))
844 (inputs `(("guile" ,guile-2.2)))
845 (synopsis "JSON module for Guile")
847 "Guile-JSON supports parsing and building JSON documents according to the
848 specification. These are the main features:
851 @item Strictly complies to @uref{http://json.org, specification}.
852 @item Build JSON documents programmatically via macros.
853 @item Unicode support for strings.
854 @item Allows JSON pretty printing.
856 (license license:lgpl3+)))
858 (define-public guile2.2-json
859 (deprecated-package "guile2.2-json" guile-json))
861 (define-public guile2.0-json
862 (package-for-guile-2.0 guile-json))
864 (define-public guile-minikanren
866 (name "guile-minikanren")
867 (version "20150424.e844d85")
871 (url "https://github.com/ijp/minikanren.git")
872 (commit "e844d85512f8c055d3f96143ee506007389a25e3")))
873 (file-name (string-append name "-" version "-checkout"))
876 "0r50jlpzi940jlmxyy3ddqqwmj5r12gb4bcv0ssini9v8km13xz6"))))
877 (build-system trivial-build-system)
879 `(#:modules ((guix build utils))
882 (use-modules (guix build utils)
887 (let* ((out (assoc-ref %outputs "out"))
888 (guile (assoc-ref %build-inputs "guile"))
889 (effective (read-line
890 (open-pipe* OPEN_READ
891 (string-append guile "/bin/guile")
892 "-c" "(display (effective-version))")))
893 (module-dir (string-append out "/share/guile/site/"
895 (source (assoc-ref %build-inputs "source"))
896 (doc (string-append out "/share/doc/guile-minikanren"))
897 (scm-files '("minikanren.scm"
898 "minikanren/mkextraforms.scm"
899 "minikanren/mkprelude.scm"
900 "minikanren/mk.scm"))
901 (guild (string-append (assoc-ref %build-inputs "guile")
903 ;; Make installation directories.
904 (mkdir-p (string-append module-dir "/minikanren"))
907 ;; Compile .scm files and install.
909 (setenv "GUILE_AUTO_COMPILE" "0")
910 (for-each (lambda (file)
911 (let* ((dest-file (string-append module-dir "/"
913 (go-file (match (string-split file #\.)
915 (string-append module-dir "/"
917 ;; Install source module.
918 (copy-file file dest-file)
919 ;; Install compiled module.
920 (invoke guild "compile"
926 ;; Also copy over the README.
927 (install-file "README.org" doc)
931 `(("guile" ,guile-2.2)))
932 (home-page "https://github.com/ijp/minikanren")
933 (synopsis "MiniKanren declarative logic system, packaged for Guile")
935 "MiniKanren is a relational programming extension to the Scheme
936 programming Language, written as a smaller version of Kanren suitable for
937 pedagogical purposes. It is featured in the book, The Reasoned Schemer,
938 written by Dan Friedman, William Byrd, and Oleg Kiselyov.
940 This is Ian Price's r6rs packaged version of miniKanren, which deviates
941 slightly from miniKanren mainline.
943 See http://minikanren.org/ for more on miniKanren generally.")
944 (license license:expat)))
946 (define-public guile2.0-minikanren
947 (package-for-guile-2.0 guile-minikanren))
949 (define-public guile2.2-minikanren
950 (deprecated-package "guile2.2-minikanren" guile-minikanren))
952 (define-public guile-miniadapton
953 (let ((commit "1b5749422304567c96ac5367f2221dda9eff5880")
956 (name "guile-miniadapton")
957 (version (string-append "0-" revision "." (string-take commit 9)))
961 (url "https://github.com/fisherdj/miniAdapton.git")
963 (file-name (string-append name "-" version "-checkout"))
966 "09q51zkw2fypad5xixskfzw2cjhjgs5cswdp3i7cpp651rb3zndh"))))
967 (build-system gnu-build-system)
969 `(#:modules ((guix build utils)
973 (guix build gnu-build-system))
974 #:tests? #f ; there is no test target
976 (modify-phases %standard-phases
980 (lambda* (#:key outputs #:allow-other-keys)
981 (let* ((cwd (getcwd))
982 (scm-files (find-files "." "\\.scm$"))
983 (effective (read-line
984 (open-pipe* OPEN_READ
986 "(display (effective-version))")))
987 (module-dir (string-append (assoc-ref outputs "out")
991 ;; Make installation directories.
994 (setenv "GUILE_AUTO_COMPILE" "0")
996 ;; Compile .scm files and install.
997 (every (lambda (file)
998 (let ((go-file (string-append module-dir "/"
999 (basename file ".scm") ".go")))
1000 ;; Install source module.
1001 (install-file file module-dir)
1002 ;; Compile and install module.
1003 (zero? (system* "guild" "compile" "-L" cwd
1004 "-o" go-file file))))
1007 `(("guile" ,guile-2.2)))
1008 (home-page "https://github.com/fisherdj/miniAdapton")
1009 (synopsis "Minimal implementation of incremental computation in Guile
1011 (description "This package provides a complete Scheme implementation of
1012 miniAdapton, which implements the core functionality of the Adapton system for
1013 incremental computation (also known as self-adjusting computation). Like
1014 Adapton, miniAdapton allows programmers to safely combine mutation and
1015 memoization. miniAdapton is built on top of an even simpler system,
1016 microAdapton. Both miniAdapton and microAdapton are designed to be easy to
1017 understand, extend, and port to host languages other than Scheme.")
1018 (license license:expat))))
1020 (define-public guile-irregex
1022 (name "guile-irregex")
1027 "http://synthcode.com/scheme/irregex/irregex-"
1031 "1ia3m7dp3lcxa048q0gqbiwwsyvn99baw6xkhb4bhhzn4k7bwyqq"))))
1032 (build-system gnu-build-system)
1034 `(#:modules ((guix build utils)
1038 (guix build gnu-build-system))
1040 (modify-phases %standard-phases
1045 (lambda* (#:key inputs outputs #:allow-other-keys)
1046 (let* ((out (assoc-ref outputs "out"))
1047 (effective (read-line
1048 (open-pipe* OPEN_READ
1050 "(display (effective-version))")))
1051 (module-dir (string-append out "/share/guile/site/"
1053 (source (assoc-ref inputs "source"))
1054 (doc (string-append out "/share/doc/guile-irregex/"))
1055 (guild (string-append (assoc-ref %build-inputs "guile")
1057 ;; Make installation directories.
1058 (mkdir-p (string-append module-dir "/rx/source"))
1061 ;; Compile .scm files and install.
1062 (setenv "GUILE_AUTO_COMPILE" "0")
1064 (for-each (lambda (copy-info)
1066 ((src-file dest-file-basis)
1067 (let* ((dest-file (string-append
1068 module-dir dest-file-basis
1070 (go-file (string-append
1071 module-dir dest-file-basis
1073 ;; Install source module.
1076 ;; Install compiled module.
1077 (invoke guild "compile"
1081 '(("irregex-guile.scm" "/rx/irregex")
1082 ("irregex.scm" "/rx/source/irregex")
1083 ;; Not really reachable via guile's packaging system,
1084 ;; but nice to have around
1085 ("irregex-utils.scm" "/rx/source/irregex-utils")))
1087 ;; Also copy over the README.
1088 (install-file "irregex.html" doc)
1091 `(("guile" ,guile-2.2)))
1092 (home-page "http://synthcode.com/scheme/irregex")
1093 (synopsis "S-expression based regular expressions")
1095 "Irregex is an s-expression based alternative to your classic
1096 string-based regular expressions. It implements SRFI 115 and is deeply
1097 inspired by the SCSH regular expression system.")
1098 (license license:bsd-3)))
1100 (define-public guile2.0-irregex
1101 (package-for-guile-2.0 guile-irregex))
1103 (define-public guile2.2-irregex
1104 (deprecated-package "guile2.2-irregex" guile-irregex))
1106 ;; There are two guile-gdbm packages, one using the FFI and one with
1107 ;; direct C bindings, hence the verbose name.
1109 (define-public guile-gdbm-ffi
1111 (name "guile-gdbm-ffi")
1112 (version "20120209.fa1d5b6")
1116 (url "https://github.com/ijp/guile-gdbm.git")
1117 (commit "fa1d5b6231d0e4d096687b378c025f2148c5f246")))
1118 (file-name (string-append name "-" version "-checkout"))
1121 "1j8wrsw7v9w6qkl47xz0rdikg50v16nn6kbs3lgzcymjzpa7babj"))))
1122 (build-system trivial-build-system)
1124 `(("guile" ,guile-2.2)
1125 ;; patch-and-repack doesn't work for git checkouts,
1126 ;; so we must apply the patch manually.
1128 ("patch-file" ,(search-patch
1129 "guile-gdbm-ffi-support-gdbm-1.14.patch"))))
1134 ((guix build utils))
1137 (use-modules (guix build utils)
1141 ;; Avoid warnings we can safely ignore
1142 (setenv "GUILE_AUTO_COMPILE" "0")
1144 (let* ((out (assoc-ref %outputs "out"))
1147 (open-pipe* OPEN_READ
1149 (assoc-ref %build-inputs "guile")
1151 "-c" "(display (effective-version))")))
1152 (module-dir (string-append out "/share/guile/site/"
1154 (source (assoc-ref %build-inputs "source"))
1155 (doc (string-append out "/share/doc"))
1156 (guild (string-append (assoc-ref %build-inputs "guile")
1159 (string-append module-dir "/gdbm.scm"))
1161 (string-append module-dir "/gdbm.go"))
1163 (lambda (in-file out-file)
1164 (invoke guild "compile" "-o" out-file in-file))))
1165 ;; Switch directory for compiling and installing
1168 ;; Install the documentation.
1169 (install-file "README.md" doc)
1170 (copy-recursively "examples" (string-append doc "/examples"))
1172 ;; Make installation directories.
1173 (mkdir-p module-dir)
1176 (copy-file "gdbm.scm" gdbm.scm-dest)
1179 (substitute* gdbm.scm-dest
1180 (("\\(dynamic-link \"libgdbm\"\\)")
1181 (format #f "(dynamic-link \"~a/lib/libgdbm.so\")"
1182 (assoc-ref %build-inputs "gdbm"))))
1184 ;; Apply the patch to add support for gdbm-1.14.
1185 (let ((patch-command (string-append (assoc-ref %build-inputs "patch")
1187 (patch-file (assoc-ref %build-inputs "patch-file")))
1188 (with-directory-excursion (dirname gdbm.scm-dest)
1189 (format #t "applying '~a'...~%" patch-file)
1190 (invoke patch-command "--force" "--input" patch-file)))
1192 ;; compile to the destination
1193 (compile-file gdbm.scm-dest gdbm.go-dest)
1196 (home-page "https://github.com/ijp/guile-gdbm")
1197 (synopsis "Guile bindings to the GDBM library via Guile's FFI")
1199 "Guile bindings to the GDBM key-value storage system, using
1200 Guile's foreign function interface.")
1201 (license license:gpl3+)))
1203 (define-public guile2.0-gdbm-ffi
1204 (package-for-guile-2.0 guile-gdbm-ffi))
1206 (define-public guile2.2-gdbm-ffi
1207 (deprecated-package "guile2.2-gdbm-ffi" guile-gdbm-ffi))
1209 (define-public guile-sqlite3
1210 (let ((commit "10c13a7e02ab1655c8a758e560cafc9d6eff26f4")
1213 (name "guile-sqlite3")
1214 (version (git-version "0.0" revision commit))
1216 ;; XXX: This used to be available read-only at
1217 ;; <https://www.gitorious.org/guile-sqlite3/guile-sqlite3.git/> but it
1218 ;; eventually disappeared, so we have our own copy here.
1219 (home-page "https://notabug.org/civodul/guile-sqlite3.git")
1227 "0nhhswpd7nb2f0gfr55fzcc2xm3l2xx4rbljsd1clrm8fj2d7q9d"))
1228 (file-name (string-append name "-" version "-checkout"))
1229 (modules '((guix build utils)))
1231 ;; Upgrade 'Makefile.am' to the current way of doing things.
1233 (substitute* "Makefile.am"
1234 (("TESTS_ENVIRONMENT")
1235 "TEST_LOG_COMPILER"))
1238 (build-system gnu-build-system)
1240 `(("autoconf" ,autoconf)
1241 ("automake" ,automake)
1242 ("pkg-config" ,pkg-config)))
1244 `(("guile" ,guile-2.2)
1245 ("sqlite" ,sqlite)))
1247 '(#:phases (modify-phases %standard-phases
1248 (add-after 'unpack 'autoreconf
1250 (zero? (system* "autoreconf" "-vfi"))))
1251 (add-before 'build 'set-sqlite3-file-name
1252 (lambda* (#:key inputs #:allow-other-keys)
1253 (substitute* "sqlite3.scm"
1255 (string-append "\"" (assoc-ref inputs "sqlite")
1256 "/lib/libsqlite3\"")))
1258 (synopsis "Access SQLite databases from Guile")
1260 "This package provides Guile bindings to the SQLite database system.")
1261 (license license:gpl3+))))
1263 (define-public haunt
1269 (uri (string-append "https://files.dthompson.us/haunt/haunt-"
1273 "0nm00krmqq4zmqi2irh35dbf2cn6al58s620hijmhfvhgvdqznlp"))))
1274 (build-system gnu-build-system)
1276 `(#:modules ((ice-9 match) (ice-9 ftw)
1277 ,@%gnu-build-system-modules)
1278 #:tests? #f ; test suite is non-deterministic :(
1279 #:phases (modify-phases %standard-phases
1280 (add-after 'install 'wrap-haunt
1281 (lambda* (#:key outputs #:allow-other-keys)
1282 ;; Wrap the 'haunt' command to refer to the right
1284 (let* ((out (assoc-ref outputs "out"))
1285 (bin (string-append out "/bin"))
1286 (site (string-append
1287 out "/share/guile/site")))
1288 (match (scandir site)
1290 (let ((modules (string-append site "/" version))
1291 (compiled-modules (string-append
1292 out "/lib/guile/" version
1294 (wrap-program (string-append bin "/haunt")
1295 `("GUILE_LOAD_PATH" ":" prefix
1297 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
1298 (,compiled-modules)))
1301 `(("pkg-config" ,pkg-config)
1302 ("texinfo" ,texinfo)))
1304 `(("guile" ,guile-2.2)))
1306 `(("guile-reader" ,guile-reader)
1307 ("guile-commonmark" ,guile-commonmark)))
1308 (synopsis "Functional static site generator")
1309 (description "Haunt is a static site generator written in Guile
1310 Scheme. Haunt features a functional build system and an extensible
1311 interface for reading articles in any format.")
1312 (home-page "http://haunt.dthompson.us")
1313 (license license:gpl3+)))
1315 (define-public guile2.0-haunt
1316 (package-for-guile-2.0
1317 (package (inherit haunt) (name "guile2.0-haunt"))))
1318 (define-public guile2.2-haunt
1319 (deprecated-package "guile2.2-haunt" haunt))
1321 (define-public guile-config
1323 (name "guile-config")
1328 (url "https://github.com/a-sassmannshausen/guile-config")
1329 (commit "guile-config-0.2")))
1330 (file-name (string-append name "-" version "-checkout"))
1333 "07q86vqdwmm81wwxz1d1ah27hbhs6qbn8kiizrfpj0s4bf95w3r9"))))
1334 (build-system gnu-build-system)
1336 '(#:phases (modify-phases %standard-phases
1337 (add-after 'unpack 'autoreconf
1339 (zero? (system* "autoreconf" "-fi")))))))
1341 `(("autoconf" ,autoconf)
1342 ("automake" ,automake)
1343 ("pkg-config" ,pkg-config)
1344 ("texinfo" ,texinfo)))
1346 `(("guile" ,guile-2.2)))
1347 (synopsis "Guile application configuration parsing library")
1349 "Guile Config is a library providing a declarative approach to
1350 application configuration specification. The library provides clean
1351 configuration declaration forms, and processors that take care of:
1352 configuration file creation; configuration file parsing; command-line
1353 parameter parsing using getopt-long; basic GNU command-line parameter
1354 generation (--help, --usage, --version); automatic output generation for the
1355 above command-line parameters.")
1356 (home-page "https://github.com/a-sassmannshausen/guile-config")
1357 (license license:gpl3+)))
1359 (define-public guile-redis
1361 (name "guile-redis")
1365 (uri (string-append "mirror://savannah/guile-redis/guile-redis-"
1369 "0vx6if6b4r3kwx64vzbs6vpc0cpcr85x11w9vkzq27gw8n7isv56"))
1370 (modules '((guix build utils)))
1372 ;; Make sure everything goes under .../site/X.Y, like Guile's
1373 ;; search paths expects.
1375 (substitute* "configure"
1376 (("ac_subst_vars='")
1377 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
1378 (substitute* '("Makefile.in"
1380 "redis/commands/Makefile.in")
1381 (("moddir =.*/share/guile/site" all)
1382 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))
1384 (build-system gnu-build-system)
1386 `(("guile" ,guile-2.2)))
1387 (home-page "https://savannah.nongnu.org/projects/guile-redis/")
1388 (synopsis "Redis client library for Guile")
1389 (description "Guile-redis provides a Scheme interface to the Redis
1390 key-value cache and store.")
1391 (license license:lgpl3+)))
1393 (define-public guile2.0-redis
1394 (package-for-guile-2.0 guile-redis))
1396 (define-public guile2.2-redis
1397 (deprecated-package "guile2.2-redis" guile-redis))
1399 (define-public guile-wisp
1405 (uri (string-append "https://bitbucket.org/ArneBab/"
1406 "wisp/downloads/wisp-"
1410 "1f2bbicq1rxnwmiplrm4r75wj06w385mjkyvi7g4k740bgwcrzxr"))))
1411 (build-system gnu-build-system)
1413 `(#:modules ((guix build gnu-build-system)
1419 (modify-phases %standard-phases
1420 (add-before 'configure 'substitute-before-config
1422 (lambda* (#:key inputs #:allow-other-keys)
1423 (let ((bash (assoc-ref inputs "bash")))
1424 ;; Puts together some test files with /bin/bash hardcoded
1425 (substitute* "Makefile.in"
1426 (("/usr/bin/env bash")
1427 (string-append bash "/bin/bash"))
1428 (("\\$\\(GUILE_EFFECTIVE_VERSION\\)/site")
1429 "site/$(GUILE_EFFECTIVE_VERSION)")) ;use the right order
1432 ;; auto compilation breaks, but if we set HOME to /tmp,
1435 'check 'auto-compile-hacky-workaround
1437 (setenv "HOME" "/tmp")
1439 (add-after 'install 'install-go-files
1440 (lambda* (#:key outputs inputs #:allow-other-keys)
1441 (let* ((out (assoc-ref outputs "out"))
1442 (effective (read-line
1443 (open-pipe* OPEN_READ
1445 "(display (effective-version))")))
1446 (module-dir (string-append out "/share/guile/site/"
1448 (object-dir (string-append out "/lib/guile/" effective
1450 (prefix (string-length module-dir)))
1451 ;; compile to the destination
1452 (for-each (lambda (file)
1453 (let* ((base (string-drop (string-drop-right file 4)
1455 (go (string-append object-dir base ".go")))
1456 (invoke "guild" "compile" "-L" module-dir
1458 (find-files module-dir "\\.scm$"))
1460 (home-page "http://draketo.de/english/wisp")
1462 `(("guile" ,guile-2.2)))
1464 `(("python" ,python)
1465 ("pkg-config" ,pkg-config)))
1466 (synopsis "Whitespace to lisp syntax for Guile")
1467 (description "Wisp is a syntax for Guile which provides a Python-like
1468 whitespace-significant language. It may be easier on the eyes for some
1469 users and in some situations.")
1470 (license license:gpl3+)))
1472 (define-public guile-sly
1478 (uri (string-append "https://files.dthompson.us/sly/sly-"
1482 "1svzlbz2vripmyq2kjh0rig16bsrnbkwbsm558pjln9l65mcl4qq"))
1483 (modules '((guix build utils)))
1486 (substitute* "configure"
1487 (("_guile_required_version=\"2.0.11\"")
1488 "_guile_required_version=\"2\"")
1489 (("ac_subst_vars='")
1490 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
1491 (substitute* (find-files "." "Makefile.in")
1495 "$(prefix)/share/guile/site/@GUILE_EFFECTIVE_VERSION@\n"))
1499 "$(prefix)/lib/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n")))
1501 (build-system gnu-build-system)
1504 (list (string-append "--with-libfreeimage-prefix="
1505 (assoc-ref %build-inputs "freeimage"))
1506 (string-append "--with-libgslcblas-prefix="
1507 (assoc-ref %build-inputs "gsl")))))
1509 `(("pkg-config" ,pkg-config)))
1511 `(("guile-sdl" ,guile-sdl)
1512 ("guile-opengl" ,guile-opengl)))
1514 `(("guile" ,guile-2.2)
1516 ("freeimage" ,freeimage)
1518 (synopsis "2D/3D game engine for GNU Guile")
1519 (description "Sly is a 2D/3D game engine written in Guile Scheme. Sly
1520 features a functional reactive programming interface and live coding
1522 (home-page "https://dthompson.us/projects/sly.html")
1523 (license license:gpl3+)))
1525 (define-public g-wrap
1531 (uri (string-append "mirror://savannah/g-wrap/g-wrap-"
1535 "0ak0bha37dfpj9kmyw1r8fj8nva639aw5xr66wr5gd3l1rqf5xhg"))))
1536 (build-system gnu-build-system)
1538 `(("pkg-config" ,pkg-config)))
1540 `(("guile" ,guile-2.2)
1541 ("guile-lib" ,guile-lib)))
1543 `(("libffi" ,libffi)))
1545 `(#:configure-flags '("--disable-Werror")
1547 (modify-phases %standard-phases
1548 (add-before 'configure 'pre-configure
1549 (lambda* (#:key outputs #:allow-other-keys)
1550 (let ((out (assoc-ref outputs "out")))
1551 (substitute* (find-files "." "^Makefile.in$")
1552 (("guilemoduledir =.*guile/site" all)
1553 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))
1555 (synopsis "Generate C bindings for Guile")
1556 (description "G-Wrap is a tool and Guile library for generating function
1557 wrappers for inter-language calls. It currently only supports generating Guile
1558 wrappers for C functions. Given a definition of the types and prototypes for
1559 a given C interface, G-Wrap will automatically generate the C code that
1560 provides access to that interface and its types from the Scheme level.")
1561 (home-page "https://www.nongnu.org/g-wrap/index.html")
1562 (license license:lgpl2.1+)))
1564 (define-public guile-dbi
1571 "http://download.gna.org/guile-dbi/guile-dbi-"
1575 "116njrprhgrsv1qm904sp3b02rq01fx639r433d657gyhw3x159n"))))
1576 (build-system gnu-build-system)
1579 (list (string-append
1580 "--with-guile-site-dir=" %output "/share/guile/site/2.2"))
1582 (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib:"
1583 (assoc-ref %build-inputs "guile-dbd-sqlite3") "/lib"))
1585 (modify-phases %standard-phases
1586 (add-after 'install 'patch-extension-path
1587 (lambda* (#:key outputs #:allow-other-keys)
1588 (let* ((out (assoc-ref outputs "out"))
1589 (dbi.scm (string-append
1590 out "/share/guile/site/2.2/dbi/dbi.scm"))
1591 (ext (string-append out "/lib/libguile-dbi")))
1592 (substitute* dbi.scm (("libguile-dbi") ext))
1595 `(("guile-dbd-sqlite3" ,guile-dbd-sqlite3))) ; only shared library, no scheme files
1597 `(("guile" ,guile-2.2)))
1598 (synopsis "Guile database abstraction layer")
1599 (home-page "http://home.gna.org/guile-dbi/guile-dbi.html")
1601 "guile-dbi is a library for Guile that provides a convenient interface to
1602 SQL databases. Database programming with guile-dbi is generic in that the same
1603 programming interface is presented regardless of which database system is used.
1604 It currently supports MySQL, Postgres and SQLite3.")
1605 (license license:gpl2+)))
1607 (define guile-dbi-bootstrap
1610 (name "guile-dbi-bootstrap")
1613 (substitute-keyword-arguments (package-arguments guile-dbi)
1614 ((#:make-flags _) '(list))))))
1616 (define-public guile-dbd-sqlite3
1618 (name "guile-dbd-sqlite3")
1623 "http://download.gna.org/guile-dbi/guile-dbd-sqlite3-"
1627 "0rg71jchxd2y8x496s8zmfmikr5g8zxi8zv2ar3f7a23pph92iw2"))))
1628 (build-system gnu-build-system)
1630 `(("pkg-config" ,pkg-config)
1631 ("guile-dbi-bootstrap" ,guile-dbi-bootstrap))) ; only required for headers
1633 `(("sqlite" ,sqlite)
1634 ("zlib" ,(@ (gnu packages compression) zlib))))
1635 (synopsis "Guile DBI driver for SQLite")
1636 (home-page "https://github.com/jkalbhenn/guile-dbd-sqlite3")
1638 "guile-dbi is a library for Guile that provides a convenient interface to
1639 SQL databases. This package implements the interface for SQLite.")
1640 (license license:gpl2+)))
1642 (define-public guile-dsv
1649 (url "https://github.com/artyom-poptsov/guile-dsv")
1650 (commit "bdc5267d007478abc20ea96d7c459b7dd9560b3d")))
1651 (file-name (string-append name "-" version "-checkout"))
1654 "1irw6mz8998nwyhzrw9g94jcz60b9zljgqfmipaz1ybn8579qjx0"))))
1655 (build-system gnu-build-system)
1657 `(("autoconf" ,autoconf)
1658 ("automake" ,automake)
1659 ("pkg-config" ,pkg-config)
1660 ("texinfo" ,texinfo)))
1661 (inputs `(("guile" ,guile-2.2)))
1662 (propagated-inputs `(("guile-lib" ,guile-lib)))
1664 '(#:phases (modify-phases %standard-phases
1665 (add-before 'configure 'set-guilesitedir
1667 (substitute* "Makefile.in"
1668 (("^guilesitedir =.*$")
1670 $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
1671 (substitute* "modules/Makefile.in"
1672 (("^guilesitedir =.*$")
1674 $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
1675 (substitute* "modules/dsv/Makefile.in"
1676 (("^guilesitedir =.*$")
1678 $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
1680 (add-after 'unpack 'autoreconf
1682 (zero? (system* "autoreconf" "-vfi")))))))
1683 (home-page "https://github.com/artyom-poptsov/guile-dsv")
1684 (synopsis "DSV module for Guile")
1686 "Guile-DSV is a GNU Guile module for working with the
1687 delimiter-separated values (DSV) data format. Guile-DSV supports the
1688 Unix-style DSV format and RFC 4180 format.")
1689 (license license:gpl3+)))
1691 (define-public guile-xosd
1697 (uri (string-append "https://github.com/alezost/" name
1698 "/releases/download/v" version
1699 "/" name "-" version ".tar.gz"))
1702 "1ri5065c16kmgrf2pysn2ymxjqi5302lhpb07wkl1jr75ym8fn8p"))))
1703 (build-system gnu-build-system)
1705 `(("pkg-config" ,pkg-config)))
1707 `(("guile" ,guile-2.2)
1709 ("libxext" ,libxext)
1710 ("libxinerama" ,libxinerama)
1712 (home-page "https://github.com/alezost/guile-xosd")
1713 (synopsis "XOSD bindings for Guile")
1715 "Guile-XOSD provides Guile bindings for @code{libxosd},
1716 @uref{http://sourceforge.net/projects/libxosd/, the X On Screen Display
1718 (license license:gpl3+)))
1720 (define-public guile-daemon
1722 (name "guile-daemon")
1726 (uri (string-append "https://github.com/alezost/" name
1727 "/releases/download/v" version
1728 "/" name "-" version ".tar.gz"))
1731 "0hh6gq6b6phpxm0b1dkxyzj3f4sxdf7dji63609lzypa5v1ad2gv"))))
1732 (build-system gnu-build-system)
1734 `(("pkg-config" ,pkg-config)))
1736 `(("guile" ,guile-2.2)))
1737 (home-page "https://github.com/alezost/guile-daemon")
1738 (synopsis "Evaluate code in a running Guile process")
1740 "Guile-Daemon is a small Guile program that loads your initial
1741 configuration file, and then reads and evaluates Guile expressions that
1742 you send to a FIFO file.")
1743 (license license:gpl3+)))
1745 (define-public guile-commonmark
1747 (name "guile-commonmark")
1751 (uri (string-append "https://github.com/OrangeShark/" name
1752 "/releases/download/v" version
1753 "/" name "-" version ".tar.gz"))
1756 "12cb5fqvvgc87f5xp0ih5az305wnjia89l5jba83d0r2p8bfy0b0"))
1757 (modules '((guix build utils)))
1759 ;; Use the real effective version of Guile in directory names
1760 ;; instead of a hard-coded "/2.0".
1762 (substitute* "configure"
1763 (("ac_subst_vars='")
1764 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
1765 (substitute* "Makefile.in"
1767 "/site/@GUILE_EFFECTIVE_VERSION@"))
1769 (build-system gnu-build-system)
1771 `(("guile" ,guile-2.2)))
1772 (synopsis "CommonMark parser for Guile")
1774 "guile-commonmark is a library for parsing CommonMark, a fully specified
1775 variant of Markdown. The library is written in Guile Scheme and is designed
1776 to transform a CommonMark document to SXML. guile-commonmark tries to closely
1777 follow the @uref{http://commonmark.org/, CommonMark spec}, the main difference
1778 is no support for parsing block and inline level HTML.")
1779 (home-page "https://github.com/OrangeShark/guile-commonmark")
1780 (license license:lgpl3+)))
1782 (define-public guile2.0-commonmark
1783 (package-for-guile-2.0 guile-commonmark))
1784 (define-public guile2.2-commonmark
1785 (deprecated-package "guile2.2-commonmark" guile-commonmark))
1787 (define-public guile-bytestructures
1789 (name "guile-bytestructures")
1793 (uri (string-append "https://github.com/TaylanUB/scheme-bytestructures"
1794 "/releases/download/v" version
1795 "/bytestructures-" version ".tar.gz"))
1798 "0xf6s8gd3656j8k2ar6y7i62r68azawyzxhsagsk8nvldnrs1r18"))))
1799 (build-system gnu-build-system)
1801 `(("pkg-config" ,pkg-config)))
1803 `(("guile" ,guile-2.2)))
1804 (home-page "https://github.com/TaylanUB/scheme-bytestructures")
1805 (synopsis "Structured access to bytevector contents for Guile")
1807 "Guile bytestructures offers a system imitating the type system
1808 of the C programming language, to be used on bytevectors. C's type
1809 system works on raw memory, and Guile works on bytevectors which are
1810 an abstraction over raw memory. It's also more powerful than the C
1811 type system, elevating types to first-class status.")
1812 (license license:gpl3+)))
1814 (define-public guile2.0-bytestructures
1815 (package-for-guile-2.0 guile-bytestructures))
1817 (define-public guile-aspell
1819 (name "guile-aspell")
1824 "http://lonelycactus.com/tarball/guile_aspell-"
1828 "0vpk5xj9m9qc702z3khmkwhgpb949qbsyz8kw2qycda6qnxk0077"))))
1829 (build-system gnu-build-system)
1831 '(#:phases (modify-phases %standard-phases
1832 (add-before 'configure 'set-guilesitedir
1834 (substitute* "Makefile.in"
1835 (("^guilesitedir =.*$")
1837 $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
1839 (add-before 'build 'set-libaspell-file-name
1840 (lambda* (#:key inputs #:allow-other-keys)
1841 (let ((aspell (assoc-ref inputs "aspell")))
1842 (substitute* "aspell.scm"
1843 (("\"libaspell\\.so\"")
1844 (string-append "\"" aspell
1845 "/lib/libaspell\"")))
1847 (native-inputs `(("pkg-config" ,pkg-config)))
1848 (inputs `(("guile" ,guile-2.2)
1849 ("aspell" ,aspell)))
1850 (home-page "https://github.com/spk121/guile-aspell")
1851 (synopsis "Spell-checking from Guile")
1853 "guile-aspell is a Guile Scheme library for comparing a string against a
1854 dictionary and suggesting spelling corrections.")
1855 (license license:gpl3+)))
1857 (define-public guile-bash
1858 ;; This project is currently retired. It was initially announced here:
1859 ;; <https://lists.gnu.org/archive/html/guile-user/2015-02/msg00003.html>.
1860 (let ((commit "1eabc563ca5692b3e08d84f1f0e6fd2283284469")
1864 (version (string-append "0.1.6-" revision "." (string-take commit 7)))
1866 "https://anonscm.debian.org/cgit/users/kaction-guest/retired/dev.guile-bash.git")
1874 "097vny990wp2qpjij6a5a5gwc6fxzg5wk56inhy18iki5v6pif1p"))
1875 (file-name (string-append name "-" version "-checkout"))))
1876 (build-system gnu-build-system)
1879 ;; Add -I to match 'bash.pc' of Bash 4.4.
1880 (list (string-append "CPPFLAGS=-I"
1881 (assoc-ref %build-inputs "bash:include")
1882 "/include/bash/include")
1884 ;; The '.a' file is useless.
1887 ;; Install 'lib/bash' as Bash 4.4 expects.
1888 (string-append "--libdir=" (assoc-ref %outputs "out")
1890 (native-inputs `(("pkg-config" ,pkg-config)
1891 ("autoconf" ,autoconf-wrapper)
1892 ("automake" ,automake)
1893 ("libtool" ,libtool)
1894 ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'.
1895 ("gettext" ,gettext-minimal)
1897 ;; Bash with loadable module support, for the test
1899 ("bash-full" ,bash)))
1900 (inputs `(("guile" ,guile-2.0)
1901 ("bash:include" ,bash "include")))
1902 (synopsis "Extend Bash using Guile")
1904 "Guile-Bash provides a shared library and set of Guile modules,
1905 allowing you to extend Bash in Scheme. Scheme interfaces allow you to access
1906 the following aspects of Bash:
1910 @item setting and getting Bash variables;
1911 @item creating dynamic variables;
1912 @item creating Bash functions with a Scheme implementation;
1913 @item reader macro for output capturing;
1914 @item reader macro for evaluating raw Bash commands.
1920 enable -f ~/.guix-profile/lib/bash/libguile-bash.so scm
1923 and then run @command{scm example.scm}.")
1924 (license license:gpl3+))))
1926 (define-public guile-8sync
1928 (name "guile-8sync")
1932 (uri (string-append "mirror://gnu/8sync/8sync-" version
1936 "031wm13srak3wsnll7j2mbbi29g1pcm4swdb71ds9yn567pn20qw"))))
1937 (build-system gnu-build-system)
1938 (native-inputs `(("autoconf" ,autoconf)
1939 ("automake" ,automake)
1940 ("guile" ,guile-2.2)
1941 ("pkg-config" ,pkg-config)
1942 ("texinfo" ,texinfo)))
1944 `(#:phases (modify-phases %standard-phases
1945 (add-before 'configure 'setenv
1948 (setenv "GUILE_AUTO_COMPILE" "0")
1950 (home-page "https://gnu.org/s/8sync/")
1951 (synopsis "Asynchronous actor model library for Guile")
1953 "GNU 8sync (pronounced \"eight-sync\") is an asynchronous programming
1954 library for GNU Guile based on the actor model.
1956 Note that 8sync is only available for Guile 2.2.")
1957 (license license:lgpl3+)))
1959 (define-public guile-fibers
1961 (name "guile-fibers")
1965 (uri (string-append "https://wingolog.org/pub/fibers/fibers-"
1969 "0vjkg72ghgdgphzbjz9ig8al8271rq8974viknb2r1rg4lz92ld0"))))
1970 (build-system gnu-build-system)
1972 `(("texinfo" ,texinfo)
1973 ("pkg-config" ,pkg-config)))
1975 `(("guile" ,guile-2.2)))
1976 (synopsis "Lightweight concurrency facility for Guile")
1978 "Fibers is a Guile library that implements a a lightweight concurrency
1979 facility, inspired by systems like Concurrent ML, Go, and Erlang. A fiber is
1980 like a \"goroutine\" from the Go language: a lightweight thread-like
1981 abstraction. Systems built with Fibers can scale up to millions of concurrent
1982 fibers, tens of thousands of concurrent socket connections, and many parallel
1983 cores. The Fibers library also provides Concurrent ML-like channels for
1984 communication between fibers.
1986 Note that Fibers makes use of some Guile 2.1/2.2-specific features and
1987 is not available for Guile 2.0.")
1988 (home-page "https://github.com/wingo/fibers")
1989 (license license:lgpl3+)))
1991 (define-public guile-git
1992 (let ((revision "6")
1993 (commit "36f93c174adc396c90ec3a6923487f0444fe5d69"))
1996 (version (string-append "0.0-" revision "." (string-take commit 7)))
1997 (home-page "https://gitlab.com/guile-git/guile-git.git")
2000 (uri (git-reference (url home-page) (commit commit)))
2003 "0z1dvn0scx59pbgjkpacam7p5n7630z4qm8fazim7ixq9xv3s8wx"))
2004 (file-name (git-file-name name version))))
2005 (build-system gnu-build-system)
2007 `(("autoconf" ,autoconf)
2008 ("automake" ,automake)
2009 ("texinfo" ,texinfo)
2010 ("pkg-config" ,pkg-config)))
2012 `(("guile" ,guile-2.2)
2013 ("libgit2" ,libgit2)))
2015 `(("guile-bytestructures" ,guile-bytestructures)))
2016 (synopsis "Guile bindings for libgit2")
2018 "This package provides Guile bindings to libgit2, a library to
2019 manipulate repositories of the Git version control system.")
2020 (license license:gpl3+))))
2022 (define-public guile2.0-git
2023 (package-for-guile-2.0 guile-git))
2025 (define-public guile-syntax-highlight
2027 (name "guile-syntax-highlight")
2031 (uri (string-append "https://files.dthompson.us/"
2032 "guile-syntax-highlight/"
2033 "guile-syntax-highlight-"
2037 "1p771kq15x83483m23bhah1sz6vkalg3drm7x279f4j1cxligkzi"))))
2038 (build-system gnu-build-system)
2040 `(("pkg-config" ,pkg-config)))
2042 `(("guile" ,guile-2.2)))
2043 (synopsis "General-purpose syntax highlighter for GNU Guile")
2044 (description "Guile-syntax-highlight is a general-purpose syntax
2045 highlighting library for GNU Guile. It can parse code written in various
2046 programming languages into a simple s-expression that can be converted to
2047 HTML (via SXML) or any other format for rendering.")
2048 (home-page "http://dthompson.us/projects/guile-syntax-highlight.html")
2049 (license license:lgpl3+)))
2051 (define-public guile-sjson
2053 (name "guile-sjson")
2057 (uri (string-append "https://dustycloud.org/misc/sjson-" version
2061 "1mzmapln79vv10qxaggz9qwcdbag3jnrj19xx8bgkmxss8h03sv3"))))
2062 (build-system gnu-build-system)
2064 `(("autoconf" ,autoconf)
2065 ("automake" ,automake)
2066 ("pkg-config" ,pkg-config)))
2068 `(("guile" ,guile-2.2)))
2069 (home-page "https://gitlab.com/dustyweb/guile-sjson")
2070 (synopsis "S-expression based json reader/writer for Guile")
2071 (description "guile-sjson is a json reader/writer for Guile.
2072 It has a nice, simple s-expression based syntax.")
2073 (license license:lgpl3+)))
2075 (define-public guile-colorized
2077 (name "guile-colorized")
2081 (uri (string-append "https://github.com/NalaGinrut/guile-colorized/"
2082 "archive/v" version ".tar.gz"))
2083 (file-name (string-append name "-" version ".tar.gz"))
2086 "16xhc3an6aglnca8xl3mvgi8hsqzqn68vsl5ga4bz8bvbap5fn4p"))))
2087 (build-system gnu-build-system)
2089 `(#:modules ((system base compile)
2090 ,@%gnu-build-system-modules)
2091 #:tests? #f ;No tests included
2093 (modify-phases %standard-phases
2094 (delete 'configure) ;No configure script
2096 (lambda* (#:key outputs inputs #:allow-other-keys)
2097 (let* ((out (assoc-ref outputs "out"))
2098 (module-dir (string-append out "/share/guile/site/2.2"))
2099 (language-dir (string-append module-dir "/ice-9"))
2100 (guild (string-append (assoc-ref inputs "guile")
2102 ;; The original 'make install' is too primitive.
2105 (install-file "ice-9/colorized.scm" language-dir)
2107 ;; compile to the destination
2108 (compile-file "ice-9/colorized.scm"
2109 #:output-file (string-append
2110 language-dir "/colorized.go"))
2113 `(("guile" ,guile-2.2)))
2114 (home-page "https://github.com/NalaGinrut/guile-colorized")
2115 (synopsis "Colorized REPL for Guile")
2117 "Guile-colorized provides you with a colorized REPL for GNU Guile.")
2118 (license license:gpl3+)))
2120 (define-public guile-simple-zmq
2121 (let ((commit "1f3b7c0b9b249c6fde8e8a632b252d8a1b794424")
2124 (name "guile-simple-zmq")
2125 (version (git-version "0.0.0" revision commit))
2130 (url "https://github.com/jerry40/guile-simple-zmq")
2134 "0nj2pd5bsmmgd3c54wh4sixfhmsv1arsq7yam2d7487h3n9q57r7"))
2135 (file-name (git-file-name name version))))
2136 (build-system trivial-build-system)
2138 `(#:modules ((guix build utils))
2141 (use-modules (guix build utils)
2147 (let* ((out (assoc-ref %outputs "out"))
2148 (guile (assoc-ref %build-inputs "guile"))
2149 (effective (read-line
2150 (open-pipe* OPEN_READ
2151 (string-append guile "/bin/guile")
2152 "-c" "(display (effective-version))")))
2153 (module-dir (string-append out "/share/guile/site/"
2155 (go-dir (string-append out "/lib/guile/"
2156 effective "/site-ccache/"))
2157 (source (string-append (assoc-ref %build-inputs "source")
2159 (scm-file "simple-zmq.scm")
2160 (guild (string-append (assoc-ref %build-inputs "guile")
2162 (zmq (assoc-ref %build-inputs "zeromq"))
2165 (map (cut string-append <>
2169 ;; Make installation directories.
2170 (mkdir-p module-dir)
2173 ;; Compile .scm files and install.
2175 (setenv "GUILE_AUTO_COMPILE" "0")
2176 (for-each (lambda (file)
2177 (let* ((dest-file (string-append module-dir "/"
2179 (go-file (match (string-split file #\.)
2181 (string-append go-dir "/"
2183 ;; Install source module.
2184 (copy-file file dest-file)
2185 (substitute* dest-file
2186 (("\\(dynamic-link \"libzmq\"\\)")
2187 (format #f "(dynamic-link \"~a/lib/libzmq.so\")"
2188 (assoc-ref %build-inputs "zeromq"))))
2190 ;; Install and compile module.
2191 (unless (zero? (system* guild "compile"
2195 (error (format #f "Failed to compile ~s to ~s!"
2200 `(("guile" ,guile-2.2)))
2202 `(("zeromq" ,zeromq)))
2203 (home-page "https://github.com/jerry40/guile-simple-zmq")
2204 (synopsis "Guile wrapper over ZeroMQ library")
2206 "This package provides a Guile programming interface to the ZeroMQ
2207 messaging library.")
2208 (license license:gpl3+))))
2210 (define-public jupyter-guile-kernel
2211 (let ((commit "a5c5f3ea3215b65e770bcb62f71117b0ec4575ed")
2214 (name "jupyter-guile-kernel")
2215 (version (git-version "0.0.0" revision commit))
2220 (url "https://github.com/jerry40/guile-kernel")
2224 "0y5jr0f0dyskvsawqbf6n0bpg8jirw4mhqbarf2a6p9lxhqha9s9"))))
2225 (build-system trivial-build-system)
2227 `(#:modules ((guix build utils))
2230 (use-modules (guix build utils)
2236 (let* ((out (assoc-ref %outputs "out"))
2237 (guile (assoc-ref %build-inputs "guile"))
2238 (effective (read-line
2239 (open-pipe* OPEN_READ
2240 (string-append guile "/bin/guile")
2241 "-c" "(display (effective-version))")))
2242 (module-dir (string-append out "/share/guile/site/"
2244 (kernel-dir (string-append out "/share/jupyter/kernels/guile"))
2245 (go-dir (string-append out "/lib/guile/"
2248 (source (string-append (assoc-ref %build-inputs "source")
2250 (scm-files '("hmac.scm"
2252 "guile-jupyter-kernel.scm"))
2253 (kernel-file "kernel.json")
2254 (guild (string-append (assoc-ref %build-inputs "guile")
2256 (g-szmq (assoc-ref %build-inputs "guile-simple-zmq"))
2257 (json (assoc-ref %build-inputs "guile-json"))
2258 (deps (list g-szmq json))
2260 (map (cut string-append <>
2261 "/share/guile/site/"
2265 (gopath (string-join
2266 (map (cut string-append <>
2267 "/lib/guile/" effective
2272 ;; Make installation directories.
2273 (mkdir-p module-dir)
2274 (mkdir-p kernel-dir)
2277 ;; Make a writable copy of SOURCE.
2278 (copy-recursively source ".")
2280 ;; Record the absolute file name of the 'openssl' command.
2281 (substitute* "hmac.scm"
2283 (string-append (assoc-ref %build-inputs "openssl")
2286 ;; Compile .scm files and install.
2287 (setenv "GUILE_AUTO_COMPILE" "0")
2288 (setenv "GUILE_LOAD_PATH" path)
2289 (setenv "GUILE_LOAD_COMPILED_PATH" gopath)
2291 (for-each (lambda (file)
2292 (let* ((dest-file (string-append module-dir "/"
2294 (go-file (match (string-split file #\.)
2296 (string-append go-dir "/"
2298 ;; Install source module.
2299 (copy-file file dest-file)
2301 ;; Install compiled module.
2302 (unless (zero? (system* guild "compile"
2306 (error (format #f "Failed to compile ~s to ~s!"
2311 (copy-file kernel-file (string-append kernel-dir "/"
2313 ;; Fix hard-coded file name in the kernel
2314 (substitute* (string-append kernel-dir "/"
2316 (("/home/jerry/.local/share/jupyter/kernels/guile/guile-jupyter-kernel.scm")
2317 (string-append module-dir "/guile-jupyter-kernel.scm"))
2319 (string-append "\"" (assoc-ref %build-inputs "guile")
2322 (string-append "--no-auto-compile\", \"-s")))
2326 `(("openssl" ,openssl)
2327 ("guile" ,guile-2.2)))
2329 `(("guile-json" ,guile-json)
2330 ("guile-simple-zmq" ,guile-simple-zmq)))
2331 (synopsis "Guile kernel for the Jupyter Notebook")
2333 "This package provides a Guile 2.x kernel for the Jupyter Notebook. It
2334 allows users to interact with the Guile REPL through Jupyter.")
2335 (home-page "https://github.com/jerry40/guile-kernel")
2336 (license license:gpl3+))))
2338 (define-public guile-sparql
2340 (name "guile-sparql")
2345 "https://github.com/roelj/guile-sparql/releases/download/"
2346 version "/guile-sparql-" version ".tar.gz"))
2348 (base32 "1drnvhsgl0gc5crmb16yyw1j98nkhwwcgssv9vgm36ng43nnzffd"))))
2349 (build-system gnu-build-system)
2350 (arguments `(#:tests? #f)) ; There are no tests.
2352 `(("pkg-config" ,pkg-config)))
2354 `(("guile" ,guile-2.2)))
2355 (home-page "https://github.com/roelj/guile-sparql")
2356 (synopsis "SPARQL module for Guile")
2357 (description "This package provides the functionality to query a SPARQL
2358 endpoint. Additionally, it provides an interface to write SPARQL queries
2359 using S-expressions.")
2360 (license license:gpl3+)))
2362 ;;; guile.scm ends here