Commit | Line | Data |
---|---|---|
233e7676 | 1 | ;;; GNU Guix --- Functional package management for GNU |
189be331 | 2 | ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org> |
6cbee49d | 3 | ;;; Copyright © 2014, 2015, 2018 Mark H Weaver <mhw@netris.org> |
c5793e7e | 4 | ;;; Copyright © 2015, 2017 Christopher Allan Webber <cwebber@dustycloud.org> |
44a2bdf8 | 5 | ;;; Copyright © 2016 Alex Sassmannshausen <alex@pompo.co> |
71311e4e | 6 | ;;; Copyright © 2016, 2017 Ricardo Wurmus <rekado@elephly.net> |
76e6e663 | 7 | ;;; Copyright © 2016 Erik Edrosa <erik.edrosa@gmail.com> |
4176eb19 | 8 | ;;; Copyright © 2016 Eraim Flashner <efraim@flashner.co.il> |
5245399f | 9 | ;;; Copyright © 2016, 2017 Alex Kost <alezost@gmail.com> |
12235a12 | 10 | ;;; Copyright © 2016, 2017 Adonay "adfeno" Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno@openmailbox.org> |
3b5783fc | 11 | ;;; Copyright © 2016 Amirouche <amirouche@hypermove.net> |
c5793e7e | 12 | ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org> |
aaf1bdc3 | 13 | ;;; Copyright © 2017 Andy Wingo <wingo@igalia.com> |
f252d6df | 14 | ;;; Copyright © 2017 David Thompson <davet@gnu.org> |
b3542d77 | 15 | ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com> |
d109b1e8 | 16 | ;;; Copyright © 2017 Theodoros Foradis <theodoros@foradis.org> |
4a78fd46 | 17 | ;;; Copyright © 2017 Nils Gillmann <ng0@n0.is> |
20897536 | 18 | ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr> |
d4660a54 | 19 | ;;; Copyright © 2018 Maxim Cournoyer <maxim.cournoyer@gmail.com> |
34e00c7b | 20 | ;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net> |
f858e58f | 21 | ;;; Copyright © 2018 Pierre-Antoine Rouby <pierre-antoine.rouby@inria.fr> |
1722d680 | 22 | ;;; |
233e7676 | 23 | ;;; This file is part of GNU Guix. |
1722d680 | 24 | ;;; |
233e7676 | 25 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
1722d680 LC |
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. | |
29 | ;;; | |
233e7676 | 30 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
1722d680 LC |
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. | |
34 | ;;; | |
35 | ;;; You should have received a copy of the GNU General Public License | |
233e7676 | 36 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
1722d680 | 37 | |
1ffa7090 | 38 | (define-module (gnu packages guile) |
71e0f217 | 39 | #:use-module ((guix licenses) #:prefix license:) |
59a43334 | 40 | #:use-module (gnu packages) |
472fc855 | 41 | #:use-module (gnu packages aspell) |
9c782445 | 42 | #:use-module (gnu packages bash) |
1ffa7090 | 43 | #:use-module (gnu packages bdw-gc) |
148585c2 | 44 | #:use-module (gnu packages compression) |
1ffa7090 LC |
45 | #:use-module (gnu packages gawk) |
46 | #:use-module (gnu packages gperf) | |
47 | #:use-module (gnu packages libffi) | |
48 | #:use-module (gnu packages autotools) | |
f906d30c | 49 | #:use-module (gnu packages flex) |
1ffa7090 | 50 | #:use-module (gnu packages libunistring) |
7119cca8 | 51 | #:use-module (gnu packages linux) |
1ffa7090 LC |
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) | |
ef02e1e9 | 56 | #:use-module (gnu packages ncurses) |
87d836b2 | 57 | #:use-module (gnu packages ed) |
ce0614dd | 58 | #:use-module (gnu packages base) |
f906d30c | 59 | #:use-module (gnu packages texinfo) |
01497dfe | 60 | #:use-module (gnu packages man) |
f906d30c | 61 | #:use-module (gnu packages gettext) |
b416aadf | 62 | #:use-module (gnu packages databases) |
9d373377 | 63 | #:use-module (gnu packages python) |
fa6a3bb7 | 64 | #:use-module (gnu packages tls) |
5649c8cd DT |
65 | #:use-module (gnu packages gl) |
66 | #:use-module (gnu packages sdl) | |
67 | #:use-module (gnu packages maths) | |
68 | #:use-module (gnu packages image) | |
bd233722 | 69 | #:use-module (gnu packages version-control) |
bd9af610 AK |
70 | #:use-module (gnu packages xdisorg) |
71 | #:use-module (gnu packages xorg) | |
f858e58f | 72 | #:use-module (gnu packages networking) |
1722d680 | 73 | #:use-module (guix packages) |
87f5d366 | 74 | #:use-module (guix download) |
6bc24063 | 75 | #:use-module (guix git-download) |
32795fcf | 76 | #:use-module (guix build-system gnu) |
6bc24063 | 77 | #:use-module (guix build-system trivial) |
32795fcf | 78 | #:use-module (guix utils) |
d4660a54 MC |
79 | #:use-module (ice-9 match) |
80 | #:use-module ((srfi srfi-1) #:prefix srfi-1:)) | |
1722d680 LC |
81 | |
82 | ;;; Commentary: | |
83 | ;;; | |
c44899a2 | 84 | ;;; GNU Guile, and modules and extensions. |
1722d680 LC |
85 | ;;; |
86 | ;;; Code: | |
87 | ||
c44899a2 LC |
88 | (define-public guile-1.8 |
89 | (package | |
90 | (name "guile") | |
91 | (version "1.8.8") | |
92 | (source (origin | |
87f5d366 | 93 | (method url-fetch) |
0db342a5 | 94 | (uri (string-append "mirror://gnu/guile/guile-" version |
c44899a2 LC |
95 | ".tar.gz")) |
96 | (sha256 | |
97 | (base32 | |
01eafd38 | 98 | "0l200a0v7h8bh0cwz6v7hc13ds39cgqsmfrks55b1rbj5vniyiy3")) |
fc1adab1 | 99 | (patches (search-patches "guile-1.8-cpp-4.5.patch")))) |
c44899a2 LC |
100 | (build-system gnu-build-system) |
101 | (arguments '(#:configure-flags '("--disable-error-on-warning") | |
c44899a2 LC |
102 | |
103 | ;; Insert a phase before `configure' to patch things up. | |
dc1d3cde KK |
104 | #:phases |
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) | |
113 | (format #f | |
114 | " ~a~% lt_dladdsearchdir(\"~a/lib\");~%" | |
115 | match | |
116 | (assoc-ref outputs "out")))) | |
2f4fbe1c | 117 | |
dc1d3cde KK |
118 | ;; The usual /bin/sh... |
119 | (substitute* "ice-9/popen.scm" | |
120 | (("/bin/sh") (which "sh"))) | |
121 | #t))))) | |
01eafd38 | 122 | (inputs `(("gawk" ,gawk) |
c44899a2 LC |
123 | ("readline" ,readline))) |
124 | ||
125 | ;; Since `guile-1.8.pc' has "Libs: ... -lgmp -lltdl", these must be | |
126 | ;; propagated. | |
127 | (propagated-inputs `(("gmp" ,gmp) | |
be11b102 | 128 | ("libltdl" ,libltdl))) |
c44899a2 LC |
129 | |
130 | ;; When cross-compiling, a native version of Guile itself is needed. | |
131 | (self-native-input? #t) | |
132 | ||
9be8d7c8 LC |
133 | (native-search-paths |
134 | (list (search-path-specification | |
135 | (variable "GUILE_LOAD_PATH") | |
af070955 | 136 | (files '("share/guile/site"))))) |
9be8d7c8 | 137 | |
f50d2669 | 138 | (synopsis "Scheme implementation intended especially for extensions") |
c44899a2 | 139 | (description |
a22dc0c4 LC |
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.") | |
6fd52309 | 145 | (home-page "https://www.gnu.org/software/guile/") |
71e0f217 | 146 | (license license:lgpl2.0+))) |
c44899a2 LC |
147 | |
148 | (define-public guile-2.0 | |
149 | (package | |
150 | (name "guile") | |
b5efd14a | 151 | (version "2.0.14") |
c44899a2 | 152 | (source (origin |
87f5d366 | 153 | (method url-fetch) |
0db342a5 | 154 | (uri (string-append "mirror://gnu/guile/guile-" version |
c44899a2 LC |
155 | ".tar.xz")) |
156 | (sha256 | |
157 | (base32 | |
b5efd14a | 158 | "10lxc6l5alf3lzbs3ihnbfy6dfcrsyf8667wa57f26vf4mk2ai78")))) |
c44899a2 LC |
159 | (build-system gnu-build-system) |
160 | (native-inputs `(("pkgconfig" ,pkg-config))) | |
161 | (inputs `(("libffi" ,libffi) | |
88da729f | 162 | ,@(libiconv-if-needed) |
baf549df LC |
163 | |
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))))) | |
c44899a2 LC |
168 | (propagated-inputs |
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) | |
be11b102 LC |
174 | |
175 | ;; Depend on LIBLTDL, not LIBTOOL. That way, we avoid some the extra | |
176 | ;; dependencies that LIBTOOL has, which is helpful during bootstrap. | |
177 | ("libltdl" ,libltdl) | |
c44899a2 LC |
178 | |
179 | ;; The headers and/or `guile-2.0.pc' refer to these packages, so they | |
180 | ;; must be propagated. | |
bda1bc6c | 181 | ("bdw-gc" ,libgc) |
c44899a2 LC |
182 | ("gmp" ,gmp))) |
183 | ||
184 | (self-native-input? #t) | |
185 | ||
9bf62d9b LC |
186 | (outputs '("out" "debug")) |
187 | ||
8ffaa93b | 188 | (arguments |
20897536 TGR |
189 | `(#:configure-flags '("--disable-static") ; saves 3 MiB |
190 | #:phases | |
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. | |
200 | (("/bin/sh") | |
201 | ,@(if (target-mingw?) | |
202 | '((if bash | |
203 | (string-append bash "/bin/bash") | |
204 | "bash")) | |
205 | '((string-append bash "/bin/bash"))))) | |
206 | #t)))))) | |
8ffaa93b | 207 | |
9be8d7c8 LC |
208 | (native-search-paths |
209 | (list (search-path-specification | |
210 | (variable "GUILE_LOAD_PATH") | |
af070955 | 211 | (files '("share/guile/site/2.0"))) |
9be8d7c8 LC |
212 | (search-path-specification |
213 | (variable "GUILE_LOAD_COMPILED_PATH") | |
ca408580 | 214 | (files '("lib/guile/2.0/site-ccache" |
05f1e956 | 215 | "share/guile/site/2.0"))))) |
9be8d7c8 | 216 | |
f50d2669 | 217 | (synopsis "Scheme implementation intended especially for extensions") |
c44899a2 | 218 | (description |
a22dc0c4 LC |
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.") | |
6fd52309 | 224 | (home-page "https://www.gnu.org/software/guile/") |
71e0f217 | 225 | (license license:lgpl3+))) |
c44899a2 | 226 | |
f6396d86 | 227 | (define-public guile-2.2 |
f906d30c | 228 | (package (inherit guile-2.0) |
f6396d86 | 229 | (name "guile") |
2664e0f6 | 230 | (version "2.2.3") |
4eae7980 LC |
231 | (source (origin |
232 | (method url-fetch) | |
34d624ce LC |
233 | |
234 | ;; Note: we are limited to one of the compression formats | |
235 | ;; supported by the bootstrap binaries, so no lzip here. | |
80a72572 | 236 | (uri (string-append "mirror://gnu/guile/guile-" version |
34d624ce | 237 | ".tar.xz")) |
4eae7980 LC |
238 | (sha256 |
239 | (base32 | |
2664e0f6 | 240 | "11j01agvnci2cx32wwpqs9078856yxmvs15gcsz7ganpkj2ahlw3")) |
d9f0788a LC |
241 | (modules '((guix build utils))) |
242 | ||
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). | |
6cbee49d MW |
246 | (snippet '(begin |
247 | (for-each delete-file | |
248 | (find-files "prebuilt" "\\.go$")) | |
249 | #t)))) | |
4fbd0f4f | 250 | (properties '((timeout . 72000) ;20 hours |
16b0f205 | 251 | (max-silent-time . 36000))) ;10 hours (needed on ARM |
1577a658 | 252 | ; when heavily loaded) |
dd90ed89 DT |
253 | (native-search-paths |
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") | |
31769b9f | 259 | (files '("lib/guile/2.2/site-ccache" |
33c3a214 LC |
260 | "share/guile/site/2.2"))))) |
261 | ||
262 | (arguments | |
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 | |
268 | (lambda _ | |
269 | ;; Cross-compiling language/elisp/boot.el fails, so | |
270 | ;; sacrifice it. See | |
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") | |
275 | "\n")) | |
276 | #t))))) | |
277 | (package-arguments guile-2.0))))) | |
4eae7980 | 278 | |
34d624ce LC |
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. | |
282 | (package | |
283 | (inherit guile-2.2) | |
a9308efe | 284 | (properties '((hidden? . #t) ;people should install 'guile-2.2' |
5a5b3632 MW |
285 | (timeout . 72000) ;20 hours |
286 | (max-silent-time . 36000))))) ;10 hours (needed on ARM | |
287 | ; when heavily loaded) | |
34d624ce | 288 | |
3aab8851 LC |
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>. | |
293 | (package | |
294 | (inherit guile-2.2) | |
295 | (version "2.2.2") | |
296 | (source (origin | |
297 | (inherit (package-source guile-2.2)) | |
298 | (uri (string-append "mirror://gnu/guile/guile-" version | |
299 | ".tar.xz")) | |
300 | (sha256 | |
301 | (base32 | |
302 | "1azm25zcmxif0skxfrp11d2wc89nrzpjaann9yxdw6pvjxhs948w")))))) | |
303 | ||
5cd074ea LC |
304 | (define-public guile-next |
305 | (deprecated-package "guile-next" guile-2.2)) | |
306 | ||
2ba2c98d LC |
307 | (define (make-guile-readline guile) |
308 | (package | |
309 | (name "guile-readline") | |
310 | (version (package-version guile)) | |
311 | (source (package-source guile)) | |
312 | (build-system gnu-build-system) | |
313 | (arguments | |
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") | |
321 | ||
322 | (substitute* "Makefile" | |
323 | (("../libguile/libguile-[[:graph:]]+\\.la") | |
324 | ;; Remove dependency on libguile-X.Y.la. | |
325 | "") | |
326 | (("^READLINE_LIBS = (.*)$" _ libs) | |
327 | ;; Link against the provided libguile. | |
328 | (string-append "READLINE_LIBS = " | |
329 | "-lguile-$(GUILE_EFFECTIVE_VERSION) " | |
330 | libs "\n")) | |
331 | (("\\$\\(top_builddir\\)/meta/build-env") | |
332 | ;; Use the provided Guile, not the one from | |
333 | ;; $(builddir). | |
334 | "") | |
335 | ||
336 | ;; Install modules to the 'site' directories. | |
337 | (("^moddir = .*$") | |
338 | "moddir = $(pkgdatadir)/site/$(GUILE_EFFECTIVE_VERSION)\n") | |
339 | (("^ccachedir = .*$") | |
340 | "ccachedir = $(pkglibdir)/$(GUILE_EFFECTIVE_VERSION)/site-ccache\n")) | |
341 | ||
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")))) | |
348 | #t))))) | |
349 | (home-page (package-home-page guile)) | |
350 | (native-inputs (package-native-inputs guile)) | |
351 | (inputs | |
352 | `(,@(package-inputs guile) ;to placate 'configure' | |
353 | ,@(package-propagated-inputs guile) | |
354 | ("guile" ,guile) | |
355 | ("readline" ,readline))) | |
356 | (synopsis "Line editing support for GNU Guile") | |
357 | (description | |
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+))) | |
362 | ||
363 | (define-public guile-readline | |
364 | (make-guile-readline guile-2.2)) | |
365 | ||
8f4acad7 LC |
366 | (define (guile-variant-package-name prefix) |
367 | (lambda (name) | |
368 | "Return NAME with PREFIX instead of \"guile-\", when applicable." | |
369 | (if (string-prefix? "guile-" name) | |
370 | (string-append prefix "-" | |
371 | (string-drop name | |
372 | (string-length "guile-"))) | |
373 | name))) | |
947a5d47 LC |
374 | |
375 | (define package-for-guile-2.2 | |
376 | ;; A procedure that rewrites the dependency tree of the given package to use | |
f6396d86 LC |
377 | ;; GUILE-2.2 instead of GUILE-2.0. |
378 | (package-input-rewriting `((,guile-2.0 . ,guile-2.2)) | |
8f4acad7 LC |
379 | (guile-variant-package-name "guile2.2"))) |
380 | ||
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"))) | |
947a5d47 | 385 | |
4eae7980 | 386 | (define-public guile-for-guile-emacs |
f6396d86 | 387 | (package (inherit guile-2.2) |
4eae7980 LC |
388 | (name "guile-for-guile-emacs") |
389 | (version "20150510.d8d9a8d") | |
f906d30c CAW |
390 | (source (origin |
391 | (method git-fetch) | |
392 | (uri (git-reference | |
4eae7980 LC |
393 | (url "git://git.hcoop.net/git/bpt/guile.git") |
394 | (commit "d8d9a8da05ec876acba81a559798eb5eeceb5a17"))) | |
51988e3a | 395 | (file-name (string-append name "-" version "-checkout")) |
f906d30c CAW |
396 | (sha256 |
397 | (base32 | |
4eae7980 | 398 | "00sprsshy16y8pxjy126hr2adqcvvzzz96hjyjwgg8swva1qh6b0")))) |
f906d30c CAW |
399 | (arguments |
400 | (substitute-keyword-arguments `(;; Tests aren't passing for now. | |
401 | ;; Obviously we should re-enable this! | |
402 | #:tests? #f | |
f6396d86 | 403 | ,@(package-arguments guile-2.2)) |
f906d30c CAW |
404 | ((#:phases phases) |
405 | `(modify-phases ,phases | |
406 | (add-after 'unpack 'autogen | |
407 | (lambda _ | |
408 | (zero? (system* "sh" "autogen.sh")))) | |
409 | (add-before 'autogen 'patch-/bin/sh | |
410 | (lambda _ | |
411 | (substitute* "build-aux/git-version-gen" | |
412 | (("#!/bin/sh") (string-append "#!" (which "sh")))) | |
413 | #t)))))) | |
414 | (native-inputs | |
415 | `(("autoconf" ,autoconf) | |
416 | ("automake" ,automake) | |
417 | ("libtool" ,libtool) | |
418 | ("flex" ,flex) | |
419 | ("texinfo" ,texinfo) | |
b94a6ca0 | 420 | ("gettext" ,gettext-minimal) |
f6396d86 | 421 | ,@(package-native-inputs guile-2.2))) |
daeb61f7 RW |
422 | ;; Same as in guile-2.0 |
423 | (native-search-paths | |
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") | |
31769b9f | 429 | (files '("lib/guile/2.0/site-ccache" |
daeb61f7 | 430 | "share/guile/site/2.0"))))))) |
be3feafe | 431 | |
71311e4e RW |
432 | ;; There has not been any release yet. |
433 | (define-public guildhall | |
434 | (let ((commit "2fe2cc539f4b811bbcd69e58738db03eb5a2b778") | |
435 | (revision "1")) | |
436 | (package | |
437 | (name "guildhall") | |
438 | (version (string-append "0-" revision "." (string-take commit 9))) | |
439 | (source (origin | |
440 | (method git-fetch) | |
441 | (uri (git-reference | |
442 | (url "https://github.com/ijp/guildhall.git") | |
443 | (commit commit))) | |
444 | (file-name (string-append name "-" version "-checkout")) | |
445 | (sha256 | |
446 | (base32 | |
447 | "115bym7bg66h3gs399yb2vkzc2ygriaqsn4zbrg8f054mgy8wzn1")))) | |
448 | (build-system gnu-build-system) | |
449 | (arguments | |
450 | `(#:phases | |
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 | |
456 | (lambda _ | |
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") "")) | |
466 | #t)) | |
d10092b8 | 467 | (add-after 'fix-bug-22 'autogen |
71311e4e RW |
468 | (lambda _ |
469 | (zero? (system* "sh" "autogen.sh"))))))) | |
470 | (inputs | |
471 | `(("guile" ,guile-2.0))) | |
472 | (native-inputs | |
473 | `(("zip" ,zip) ; for tests | |
474 | ("autoconf" ,autoconf) | |
475 | ("automake" ,automake) | |
476 | ("texinfo" ,texinfo))) | |
477 | (synopsis "Package manager for Guile") | |
478 | (description | |
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 | |
482 | to share code. | |
483 | ||
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+)))) | |
491 | ||
c44899a2 LC |
492 | \f |
493 | ;;; | |
494 | ;;; Extensions. | |
495 | ;;; | |
496 | ||
7119cca8 | 497 | (define-public artanis |
12235a12 AFN |
498 | (let ((release "0.2.1") |
499 | (revision 3)) | |
500 | (package | |
501 | (name "artanis") | |
502 | (version (if (zero? revision) | |
503 | release | |
504 | (string-append release "-" | |
505 | (number->string revision)))) | |
506 | (source (origin | |
507 | (method url-fetch) | |
508 | (uri (string-append "mirror://gnu/artanis/artanis-" | |
509 | release ".tar.gz")) | |
510 | (file-name (string-append name "-" version ".tar.gz")) | |
511 | (sha256 | |
512 | (base32 | |
513 | "041ajcg2pz918kd9iqcj4inpzddc3impvz3r2nhlpbv8zrz011hn")) | |
514 | (modules '((guix build utils))) | |
515 | (snippet | |
516 | '(begin | |
517 | (delete-file-recursively "artanis/third-party/json.scm") | |
518 | (delete-file-recursively "artanis/third-party/json") | |
519 | (substitute* '("artanis/artanis.scm" | |
520 | "artanis/oht.scm") | |
521 | (("(#:use-module \\()artanis third-party (json\\))" _ | |
522 | use-module json) | |
523 | (string-append use-module json))) | |
524 | (substitute* "artanis/oht.scm" | |
525 | (("([[:punct:][:space:]]+)(->json-string)([[:punct:][:space:]]+)" | |
526 | _ pre json-string post) | |
527 | (string-append pre | |
528 | "scm" json-string | |
529 | post))) | |
530 | (substitute* "artanis/artanis.scm" | |
531 | (("[[:punct:][:space:]]+->json-string[[:punct:][:space:]]+") | |
6cbee49d MW |
532 | "")) |
533 | #t)))) | |
12235a12 AFN |
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 | |
541 | (arguments | |
542 | '(#:make-flags | |
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))) | |
550 | #:test-target "test" | |
551 | #:phases | |
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 | |
561 | #t))) | |
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))) | |
571 | #t)))))) | |
572 | (synopsis "Web application framework written in Guile") | |
573 | (description "GNU Artanis is a web application framework written in Guile | |
7119cca8 ML |
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 | |
580 | more.") | |
12235a12 AFN |
581 | (home-page "https://www.gnu.org/software/artanis/") |
582 | (license (list license:gpl3+ license:lgpl3+))))) ;dual license | |
7119cca8 | 583 | |
d6d9f1f7 | 584 | (define-public guile-reader |
1722d680 | 585 | (package |
d6d9f1f7 | 586 | (name "guile-reader") |
77aa0887 | 587 | (version "0.6.2") |
d6d9f1f7 LC |
588 | (source (origin |
589 | (method url-fetch) | |
590 | (uri (string-append "mirror://savannah/guile-reader/guile-reader-" | |
591 | version ".tar.gz")) | |
592 | (sha256 | |
593 | (base32 | |
77aa0887 | 594 | "0592s2s8ampqmqwilc4fvcild6rb9gy79di6vxv5kcdmv23abkgx")))) |
d6d9f1f7 LC |
595 | (build-system gnu-build-system) |
596 | (native-inputs `(("pkgconfig" ,pkg-config) | |
2fa077f3 | 597 | ("gperf" ,gperf-3.0))) |
bdf1022d | 598 | (inputs `(("guile" ,guile-2.2))) |
d6d9f1f7 LC |
599 | (synopsis "Framework for building readers for GNU Guile") |
600 | (description | |
601 | "Guile-Reader is a simple framework for building readers for GNU Guile. | |
1722d680 LC |
602 | |
603 | The idea is to make it easy to build procedures that extend Guile’s read | |
35b9e423 | 604 | procedure. Readers supporting various syntax variants can easily be written, |
1722d680 | 605 | possibly by re-using existing “token readers” of a standard Scheme |
35b9e423 | 606 | readers. For example, it is used to implement Skribilo’s R5RS-derived |
1722d680 LC |
607 | document syntax. |
608 | ||
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).") | |
340978d7 | 612 | (home-page "https://www.nongnu.org/guile-reader/") |
71e0f217 | 613 | (license license:gpl3+))) |
1722d680 | 614 | |
bdf1022d LC |
615 | (define-public guile2.0-reader |
616 | (package-for-guile-2.0 guile-reader)) | |
517fce63 | 617 | (define-public guile2.2-reader |
bdf1022d | 618 | (deprecated-package "guile2.2-reader" guile-reader)) |
517fce63 | 619 | |
ef02e1e9 LC |
620 | (define-public guile-ncurses |
621 | (package | |
622 | (name "guile-ncurses") | |
958d357a | 623 | (version "2.2") |
ef02e1e9 LC |
624 | (source (origin |
625 | (method url-fetch) | |
626 | (uri (string-append "mirror://gnu/guile-ncurses/guile-ncurses-" | |
627 | version ".tar.gz")) | |
628 | (sha256 | |
629 | (base32 | |
958d357a | 630 | "1wvggbr4xv8idh1hzd8caj4xfp4pln78a7w1wqzd4zgzwmnzxr2f")))) |
ef02e1e9 LC |
631 | (build-system gnu-build-system) |
632 | (inputs `(("ncurses" ,ncurses) | |
81eaa3f8 | 633 | ("guile" ,guile-2.2))) |
0881b616 | 634 | (native-inputs `(("pkg-config" ,pkg-config))) |
ef02e1e9 | 635 | (arguments |
2c6b7c7d | 636 | '(#:configure-flags (list "--with-ncursesw" ; Unicode support |
0881b616 | 637 | "--with-gnu-filesystem-hierarchy") |
fa37f21b EF |
638 | #:phases |
639 | (modify-phases %standard-phases | |
8c4e99cc | 640 | (add-before 'build 'fix-libguile-ncurses-file-name |
fa37f21b | 641 | (lambda* (#:key outputs #:allow-other-keys) |
8c4e99cc JD |
642 | (and (zero? (system* "make" "install" |
643 | "-C" "src/ncurses" | |
644 | "-j" (number->string | |
645 | (parallel-job-count)))) | |
646 | (let* ((out (assoc-ref outputs "out")) | |
647 | (dir "src/ncurses") | |
648 | (files (find-files dir ".scm"))) | |
649 | (substitute* files | |
650 | (("\"libguile-ncurses\"") | |
81eaa3f8 | 651 | (format #f "\"~a/lib/guile/2.2/libguile-ncurses\"" |
8c4e99cc JD |
652 | out))) |
653 | #t))))))) | |
d81850d4 | 654 | (home-page "https://www.gnu.org/software/guile-ncurses/") |
f50d2669 | 655 | (synopsis "Guile bindings to ncurses") |
ef02e1e9 | 656 | (description |
12bcf94a | 657 | "guile-ncurses provides Guile language bindings for the ncurses |
79c311b8 | 658 | library.") |
71e0f217 | 659 | (license license:lgpl3+))) |
ef02e1e9 | 660 | |
4d02e9ff DM |
661 | (define-public guile-ncurses/gpm |
662 | (package | |
663 | (inherit guile-ncurses) | |
664 | (name "guile-ncurses-with-gpm") | |
665 | (inputs `(("ncurses" ,ncurses/gpm) | |
666 | ("guile" ,guile-2.2))))) | |
667 | ||
87d836b2 LC |
668 | (define-public mcron |
669 | (package | |
670 | (name "mcron") | |
67a51b67 | 671 | (version "1.1.1") |
87d836b2 | 672 | (source (origin |
cfbf6de1 LC |
673 | (method url-fetch) |
674 | (uri (string-append "mirror://gnu/mcron/mcron-" | |
675 | version ".tar.gz")) | |
676 | (sha256 | |
677 | (base32 | |
67a51b67 | 678 | "1i9mcp6r6my61zfiydsm3n6my41mwvl7dfala4q29qx0zn1ynlm4")))) |
87d836b2 | 679 | (build-system gnu-build-system) |
cfbf6de1 LC |
680 | (arguments |
681 | '(#:phases (modify-phases %standard-phases | |
682 | (add-before 'check 'set-timezone | |
683 | (lambda* (#:key inputs #:allow-other-keys) | |
67a51b67 LC |
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>. | |
cfbf6de1 LC |
689 | (let ((tzdata (assoc-ref inputs "tzdata"))) |
690 | (setenv "TZDIR" | |
691 | (string-append tzdata | |
692 | "/share/zoneinfo")) | |
67a51b67 | 693 | (setenv "TZ" "UTC-2") |
cfbf6de1 | 694 | #t))) |
67a51b67 | 695 | (add-before 'check 'adjust-tests |
cfbf6de1 | 696 | (lambda _ |
67a51b67 LC |
697 | (substitute* "tests/job-specifier.scm" |
698 | ;; (getpw) fails with "entry not found" in the build | |
699 | ;; environment, so pass an argument. | |
700 | (("\\(getpw\\)") | |
701 | "(getpwnam (getuid))") | |
702 | ;; The build environment lacks an entry for root in | |
703 | ;; /etc/passwd. | |
704 | (("\\(getpw 0\\)") | |
705 | "(getpwnam \"nobody\")") | |
706 | ||
707 | ;; FIXME: Skip the 4 faulty tests (see above). | |
708 | (("\\(test-equal \"next-year\"" all) | |
709 | (string-append "(test-skip 4)\n" all))) | |
710 | #t))))) | |
cfbf6de1 LC |
711 | (native-inputs `(("pkg-config" ,pkg-config) |
712 | ("tzdata" ,tzdata-for-tests))) | |
713 | (inputs `(("ed" ,ed) ("which" ,which) ("guile" ,guile-2.2))) | |
6fd52309 | 714 | (home-page "https://www.gnu.org/software/mcron/") |
f50d2669 | 715 | (synopsis "Run jobs at scheduled times") |
87d836b2 | 716 | (description |
79c311b8 | 717 | "GNU Mcron is a complete replacement for Vixie cron. It is used to run |
a22dc0c4 | 718 | tasks on a schedule, such as every hour or every Monday. Mcron is written in |
79c311b8 LC |
719 | Guile, so its configuration can be written in Scheme; the original cron |
720 | format is also supported.") | |
71e0f217 | 721 | (license license:gpl3+))) |
87d836b2 | 722 | |
01497dfe | 723 | (define-public mcron2 |
cfbf6de1 LC |
724 | ;; This was mthl's mcron development branch, and it became mcron 1.1. |
725 | (deprecated-package "mcron2" mcron)) | |
01497dfe | 726 | |
814b18e5 AS |
727 | (define-public guile-ics |
728 | (package | |
729 | (name "guile-ics") | |
291c2d57 | 730 | (version "0.2.0") |
814b18e5 AS |
731 | (source (origin |
732 | (method git-fetch) | |
733 | (uri (git-reference | |
734 | (url "https://github.com/artyom-poptsov/guile-ics") | |
291c2d57 | 735 | (commit (string-append "v" version)))) |
814b18e5 AS |
736 | (file-name (string-append name "-" version "-checkout")) |
737 | (sha256 | |
738 | (base32 | |
291c2d57 | 739 | "0qjjvadr7gibdq9jvwkmlkb4afsw9n2shfj9phpiadinxk3p4m2g")))) |
814b18e5 AS |
740 | (build-system gnu-build-system) |
741 | (arguments | |
742 | '(#:phases (modify-phases %standard-phases | |
d10092b8 KK |
743 | (add-after 'unpack 'autoreconf |
744 | (lambda _ | |
745 | ;; Repository comes with a broken symlink | |
746 | (delete-file "README") | |
747 | (symlink "README.org" "README") | |
748 | (zero? (system* "autoreconf" "-fi"))))))) | |
814b18e5 | 749 | (native-inputs |
464f5447 | 750 | `(("autoconf" ,autoconf-wrapper) |
814b18e5 AS |
751 | ("automake" ,automake) |
752 | ("texinfo" ,texinfo) | |
753 | ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'. | |
754 | ("gettext" ,gettext-minimal) | |
755 | ("pkg-config" ,pkg-config))) | |
d573d892 LC |
756 | (inputs `(("guile" ,guile-2.2) ("which" ,which))) |
757 | (propagated-inputs `(("guile-lib" ,guile-lib))) | |
814b18e5 AS |
758 | (home-page "https://github.com/artyom-poptsov/guile-ics") |
759 | (synopsis "Guile parser library for the iCalendar format") | |
760 | (description | |
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. | |
763 | ||
764 | The library is shipped with documentation in Info format and usage examples.") | |
71e0f217 | 765 | (license license:gpl3+))) |
814b18e5 | 766 | |
3e9066fc LC |
767 | (define-public guile-lib |
768 | (package | |
769 | (name "guile-lib") | |
30f17d73 | 770 | (version "0.2.5.1") |
3e9066fc | 771 | (source (origin |
af126875 MC |
772 | (method url-fetch) |
773 | (uri (string-append "mirror://savannah/guile-lib/guile-lib-" | |
774 | version ".tar.gz")) | |
775 | (sha256 | |
776 | (base32 | |
30f17d73 | 777 | "19q420i3is3d4jmkdqs5y7ir7ipp4s795saflqgwf6617cx2zpj4")))) |
3e9066fc LC |
778 | (build-system gnu-build-system) |
779 | (arguments | |
af126875 MC |
780 | '(#:make-flags |
781 | '("GUILE_AUTO_COMPILE=0") ;to prevent guild errors | |
782 | #:phases | |
783 | (modify-phases %standard-phases | |
784 | (add-before 'configure 'patch-module-dir | |
785 | (lambda _ | |
786 | (substitute* "src/Makefile.in" | |
787 | (("^moddir = ([[:graph:]]+)") | |
788 | "moddir = $(datadir)/guile/site/@GUILE_EFFECTIVE_VERSION@\n") | |
789 | (("^godir = ([[:graph:]]+)") | |
790 | "godir = \ | |
bf62b8ff | 791 | $(libdir)/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n")) |
af126875 | 792 | #t))))) |
bf62b8ff | 793 | (native-inputs `(("pkg-config" ,pkg-config))) |
1b0f266e | 794 | (inputs `(("guile" ,guile-2.2))) |
340978d7 | 795 | (home-page "https://www.nongnu.org/guile-lib/") |
3e9066fc LC |
796 | (synopsis "Collection of useful Guile Scheme modules") |
797 | (description | |
35b9e423 | 798 | "Guile-Lib is intended as an accumulation place for pure-scheme Guile |
3e9066fc LC |
799 | modules, allowing for people to cooperate integrating their generic Guile |
800 | modules into a coherent library. Think \"a down-scaled, limited-scope CPAN | |
801 | for Guile\".") | |
802 | ||
803 | ;; The whole is under GPLv3+, but some modules are under laxer | |
804 | ;; distribution terms such as LGPL and public domain. See `COPYING' for | |
805 | ;; details. | |
71e0f217 | 806 | (license license:gpl3+))) |
3e9066fc | 807 | |
1b0f266e LC |
808 | (define-public guile2.0-lib |
809 | (package-for-guile-2.0 guile-lib)) | |
810 | ||
12773de3 | 811 | (define-public guile2.2-lib |
1b0f266e | 812 | (deprecated-package "guile2.2-lib" guile-lib)) |
12773de3 | 813 | |
6050a1fb CR |
814 | (define-public guile-json |
815 | (package | |
816 | (name "guile-json") | |
f52ef55e LC |
817 | (version "1.0.1") |
818 | (home-page "https://github.com/aconchillo/guile-json") | |
6050a1fb | 819 | (source (origin |
ffc72ec6 | 820 | (method url-fetch) |
f52ef55e | 821 | (uri (string-append home-page "/archive/" |
ffc72ec6 | 822 | version ".tar.gz")) |
f52ef55e | 823 | (file-name (string-append name "-" version ".tar.gz")) |
ffc72ec6 LC |
824 | (sha256 |
825 | (base32 | |
f52ef55e | 826 | "16155dv30rhagz6dwv7xc87l386i8v0f1kgydqa2ajr166fi9qhr")) |
ffc72ec6 LC |
827 | (modules '((guix build utils))) |
828 | (snippet | |
829 | ;; Make sure everything goes under .../site/X.Y, like Guile's | |
830 | ;; search paths expects. | |
831 | '(begin | |
f52ef55e LC |
832 | (substitute* "configure.ac" |
833 | (("GUILE_PROGS") | |
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) | |
9f0afbae MW |
838 | (string-append all "/@GUILE_EFFECTIVE_VERSION@"))) |
839 | #t)))) | |
6050a1fb | 840 | (build-system gnu-build-system) |
f52ef55e LC |
841 | (native-inputs `(("autoconf" ,autoconf) |
842 | ("automake" ,automake) | |
843 | ("guile" ,guile-2.2))) | |
844 | (inputs `(("guile" ,guile-2.2))) | |
6050a1fb CR |
845 | (synopsis "JSON module for Guile") |
846 | (description | |
0f31d4f0 LC |
847 | "Guile-JSON supports parsing and building JSON documents according to the |
848 | specification. These are the main features: | |
849 | ||
850 | @itemize | |
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. | |
855 | @end itemize\n") | |
71e0f217 | 856 | (license license:lgpl3+))) |
6050a1fb | 857 | |
947a5d47 | 858 | (define-public guile2.2-json |
2252f087 LC |
859 | (deprecated-package "guile2.2-json" guile-json)) |
860 | ||
861 | (define-public guile2.0-json | |
862 | (package-for-guile-2.0 guile-json)) | |
947a5d47 | 863 | |
6bc24063 CAW |
864 | (define-public guile-minikanren |
865 | (package | |
866 | (name "guile-minikanren") | |
867 | (version "20150424.e844d85") | |
868 | (source (origin | |
869 | (method git-fetch) | |
870 | (uri (git-reference | |
871 | (url "https://github.com/ijp/minikanren.git") | |
872 | (commit "e844d85512f8c055d3f96143ee506007389a25e3"))) | |
821f4dc2 | 873 | (file-name (string-append name "-" version "-checkout")) |
6bc24063 CAW |
874 | (sha256 |
875 | (base32 | |
876 | "0r50jlpzi940jlmxyy3ddqqwmj5r12gb4bcv0ssini9v8km13xz6")))) | |
877 | (build-system trivial-build-system) | |
878 | (arguments | |
4b74a29d | 879 | `(#:modules ((guix build utils)) |
6bc24063 CAW |
880 | #:builder |
881 | (begin | |
882 | (use-modules (guix build utils) | |
4b74a29d LC |
883 | (ice-9 match) |
884 | (ice-9 popen) | |
885 | (ice-9 rdelim)) | |
886 | ||
6bc24063 | 887 | (let* ((out (assoc-ref %outputs "out")) |
4b74a29d LC |
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/" | |
894 | effective)) | |
6bc24063 | 895 | (source (assoc-ref %build-inputs "source")) |
f3d8cd79 | 896 | (doc (string-append out "/share/doc/guile-minikanren")) |
6bc24063 CAW |
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") | |
902 | "/bin/guild"))) | |
903 | ;; Make installation directories. | |
904 | (mkdir-p (string-append module-dir "/minikanren")) | |
905 | (mkdir-p doc) | |
906 | ||
907 | ;; Compile .scm files and install. | |
908 | (chdir source) | |
909 | (setenv "GUILE_AUTO_COMPILE" "0") | |
910 | (for-each (lambda (file) | |
911 | (let* ((dest-file (string-append module-dir "/" | |
76e6e663 | 912 | file)) |
6bc24063 CAW |
913 | (go-file (match (string-split file #\.) |
914 | ((base _) | |
915 | (string-append module-dir "/" | |
916 | base ".go"))))) | |
917 | ;; Install source module. | |
918 | (copy-file file dest-file) | |
919 | ;; Install compiled module. | |
e3cfef22 MW |
920 | (invoke guild "compile" |
921 | "-L" source | |
922 | "-o" go-file | |
923 | file))) | |
6bc24063 CAW |
924 | scm-files) |
925 | ||
926 | ;; Also copy over the README. | |
96c46210 | 927 | (install-file "README.org" doc) |
e3cfef22 | 928 | |
6bc24063 CAW |
929 | #t)))) |
930 | (inputs | |
d58ee08d | 931 | `(("guile" ,guile-2.2))) |
6bc24063 | 932 | (home-page "https://github.com/ijp/minikanren") |
e881752c | 933 | (synopsis "MiniKanren declarative logic system, packaged for Guile") |
6bc24063 CAW |
934 | (description |
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. | |
939 | ||
e881752c | 940 | This is Ian Price's r6rs packaged version of miniKanren, which deviates |
6bc24063 CAW |
941 | slightly from miniKanren mainline. |
942 | ||
943 | See http://minikanren.org/ for more on miniKanren generally.") | |
71e0f217 | 944 | (license license:expat))) |
6bc24063 | 945 | |
d58ee08d LC |
946 | (define-public guile2.0-minikanren |
947 | (package-for-guile-2.0 guile-minikanren)) | |
948 | ||
947a5d47 | 949 | (define-public guile2.2-minikanren |
d58ee08d | 950 | (deprecated-package "guile2.2-minikanren" guile-minikanren)) |
947a5d47 | 951 | |
28a1041f AP |
952 | (define-public guile-miniadapton |
953 | (let ((commit "1b5749422304567c96ac5367f2221dda9eff5880") | |
954 | (revision "1")) | |
955 | (package | |
956 | (name "guile-miniadapton") | |
957 | (version (string-append "0-" revision "." (string-take commit 9))) | |
958 | (source (origin | |
959 | (method git-fetch) | |
960 | (uri (git-reference | |
961 | (url "https://github.com/fisherdj/miniAdapton.git") | |
962 | (commit commit))) | |
963 | (file-name (string-append name "-" version "-checkout")) | |
964 | (sha256 | |
965 | (base32 | |
966 | "09q51zkw2fypad5xixskfzw2cjhjgs5cswdp3i7cpp651rb3zndh")))) | |
967 | (build-system gnu-build-system) | |
968 | (arguments | |
969 | `(#:modules ((guix build utils) | |
970 | (ice-9 popen) | |
971 | (ice-9 rdelim) | |
972 | (srfi srfi-1) | |
973 | (guix build gnu-build-system)) | |
974 | #:tests? #f ; there is no test target | |
975 | #:phases | |
976 | (modify-phases %standard-phases | |
977 | (delete 'configure) | |
978 | (delete 'build) | |
979 | (replace 'install | |
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 | |
985 | "guile" "-c" | |
986 | "(display (effective-version))"))) | |
987 | (module-dir (string-append (assoc-ref outputs "out") | |
988 | "/share/guile/site/" | |
989 | effective))) | |
990 | ||
991 | ;; Make installation directories. | |
992 | (mkdir-p module-dir) | |
993 | ||
994 | (setenv "GUILE_AUTO_COMPILE" "0") | |
995 | ||
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)))) | |
1005 | scm-files))))))) | |
1006 | (inputs | |
1007 | `(("guile" ,guile-2.2))) | |
1008 | (home-page "https://github.com/fisherdj/miniAdapton") | |
1009 | (synopsis "Minimal implementation of incremental computation in Guile | |
1010 | Scheme") | |
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)))) | |
1019 | ||
32e14fc1 CAW |
1020 | (define-public guile-irregex |
1021 | (package | |
1022 | (name "guile-irregex") | |
fb73f07a | 1023 | (version "0.9.6") |
32e14fc1 CAW |
1024 | (source (origin |
1025 | (method url-fetch) | |
1026 | (uri (string-append | |
1027 | "http://synthcode.com/scheme/irregex/irregex-" | |
d03f9446 | 1028 | version ".tar.gz")) |
32e14fc1 CAW |
1029 | (sha256 |
1030 | (base32 | |
fb73f07a | 1031 | "1ia3m7dp3lcxa048q0gqbiwwsyvn99baw6xkhb4bhhzn4k7bwyqq")))) |
32e14fc1 CAW |
1032 | (build-system gnu-build-system) |
1033 | (arguments | |
1034 | `(#:modules ((guix build utils) | |
1035 | (ice-9 match) | |
fe447664 LC |
1036 | (ice-9 rdelim) |
1037 | (ice-9 popen) | |
32e14fc1 CAW |
1038 | (guix build gnu-build-system)) |
1039 | #:phases | |
1040 | (modify-phases %standard-phases | |
32e14fc1 CAW |
1041 | (delete 'configure) |
1042 | (delete 'build) | |
1043 | (delete 'check) | |
1044 | (replace 'install | |
1045 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
fe447664 LC |
1046 | (let* ((out (assoc-ref outputs "out")) |
1047 | (effective (read-line | |
1048 | (open-pipe* OPEN_READ | |
1049 | "guile" "-c" | |
1050 | "(display (effective-version))"))) | |
1051 | (module-dir (string-append out "/share/guile/site/" | |
1052 | effective)) | |
1053 | (source (assoc-ref inputs "source")) | |
1054 | (doc (string-append out "/share/doc/guile-irregex/")) | |
1055 | (guild (string-append (assoc-ref %build-inputs "guile") | |
1056 | "/bin/guild"))) | |
1057 | ;; Make installation directories. | |
1058 | (mkdir-p (string-append module-dir "/rx/source")) | |
1059 | (mkdir-p doc) | |
1060 | ||
1061 | ;; Compile .scm files and install. | |
1062 | (setenv "GUILE_AUTO_COMPILE" "0") | |
1063 | ||
1064 | (for-each (lambda (copy-info) | |
1065 | (match copy-info | |
1066 | ((src-file dest-file-basis) | |
1067 | (let* ((dest-file (string-append | |
32e14fc1 | 1068 | module-dir dest-file-basis |
fe447664 LC |
1069 | ".scm")) |
1070 | (go-file (string-append | |
1071 | module-dir dest-file-basis | |
1072 | ".go"))) | |
1073 | ;; Install source module. | |
1074 | (copy-file src-file | |
1075 | dest-file) | |
1076 | ;; Install compiled module. | |
67eb6f50 MW |
1077 | (invoke guild "compile" |
1078 | "-L" (getcwd) | |
1079 | "-o" go-file | |
1080 | src-file))))) | |
fe447664 LC |
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"))) | |
1086 | ||
1087 | ;; Also copy over the README. | |
1088 | (install-file "irregex.html" doc) | |
1089 | #t)))))) | |
32e14fc1 | 1090 | (inputs |
2863860b | 1091 | `(("guile" ,guile-2.2))) |
32e14fc1 CAW |
1092 | (home-page "http://synthcode.com/scheme/irregex") |
1093 | (synopsis "S-expression based regular expressions") | |
1094 | (description | |
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.") | |
71e0f217 | 1098 | (license license:bsd-3))) |
93e7199b | 1099 | |
2863860b LC |
1100 | (define-public guile2.0-irregex |
1101 | (package-for-guile-2.0 guile-irregex)) | |
1102 | ||
947a5d47 | 1103 | (define-public guile2.2-irregex |
2863860b | 1104 | (deprecated-package "guile2.2-irregex" guile-irregex)) |
947a5d47 | 1105 | |
93e7199b CAW |
1106 | ;; There are two guile-gdbm packages, one using the FFI and one with |
1107 | ;; direct C bindings, hence the verbose name. | |
1108 | ||
1109 | (define-public guile-gdbm-ffi | |
1110 | (package | |
1111 | (name "guile-gdbm-ffi") | |
1112 | (version "20120209.fa1d5b6") | |
1113 | (source (origin | |
1114 | (method git-fetch) | |
1115 | (uri (git-reference | |
1116 | (url "https://github.com/ijp/guile-gdbm.git") | |
1117 | (commit "fa1d5b6231d0e4d096687b378c025f2148c5f246"))) | |
821f4dc2 | 1118 | (file-name (string-append name "-" version "-checkout")) |
93e7199b CAW |
1119 | (sha256 |
1120 | (base32 | |
1121 | "1j8wrsw7v9w6qkl47xz0rdikg50v16nn6kbs3lgzcymjzpa7babj")))) | |
1122 | (build-system trivial-build-system) | |
56f31a9f MW |
1123 | (inputs |
1124 | `(("guile" ,guile-2.2) | |
1125 | ;; patch-and-repack doesn't work for git checkouts, | |
1126 | ;; so we must apply the patch manually. | |
1127 | ("patch" ,patch) | |
1128 | ("patch-file" ,(search-patch | |
1129 | "guile-gdbm-ffi-support-gdbm-1.14.patch")))) | |
1130 | (propagated-inputs | |
1131 | `(("gdbm" ,gdbm))) | |
93e7199b CAW |
1132 | (arguments |
1133 | `(#:modules | |
1134 | ((guix build utils)) | |
1135 | #:builder | |
1136 | (begin | |
1137 | (use-modules (guix build utils) | |
a5bd6a5e CAW |
1138 | (ice-9 rdelim) |
1139 | (ice-9 popen)) | |
1140 | ||
1141 | ;; Avoid warnings we can safely ignore | |
1142 | (setenv "GUILE_AUTO_COMPILE" "0") | |
93e7199b CAW |
1143 | |
1144 | (let* ((out (assoc-ref %outputs "out")) | |
a5bd6a5e CAW |
1145 | (effective-version |
1146 | (read-line | |
1147 | (open-pipe* OPEN_READ | |
1148 | (string-append | |
1149 | (assoc-ref %build-inputs "guile") | |
1150 | "/bin/guile") | |
1151 | "-c" "(display (effective-version))"))) | |
1152 | (module-dir (string-append out "/share/guile/site/" | |
1153 | effective-version)) | |
93e7199b CAW |
1154 | (source (assoc-ref %build-inputs "source")) |
1155 | (doc (string-append out "/share/doc")) | |
1156 | (guild (string-append (assoc-ref %build-inputs "guile") | |
1157 | "/bin/guild")) | |
1158 | (gdbm.scm-dest | |
1159 | (string-append module-dir "/gdbm.scm")) | |
1160 | (gdbm.go-dest | |
a5bd6a5e CAW |
1161 | (string-append module-dir "/gdbm.go")) |
1162 | (compile-file | |
1163 | (lambda (in-file out-file) | |
07e36357 | 1164 | (invoke guild "compile" "-o" out-file in-file)))) |
93e7199b CAW |
1165 | ;; Switch directory for compiling and installing |
1166 | (chdir source) | |
1167 | ||
4168ddf6 TGR |
1168 | ;; Install the documentation. |
1169 | (install-file "README.md" doc) | |
1170 | (copy-recursively "examples" (string-append doc "/examples")) | |
1171 | ||
1172 | ;; Make installation directories. | |
1173 | (mkdir-p module-dir) | |
1174 | ||
93e7199b CAW |
1175 | ;; copy the source |
1176 | (copy-file "gdbm.scm" gdbm.scm-dest) | |
1177 | ||
1178 | ;; Patch the FFI | |
1179 | (substitute* gdbm.scm-dest | |
1180 | (("\\(dynamic-link \"libgdbm\"\\)") | |
1181 | (format #f "(dynamic-link \"~a/lib/libgdbm.so\")" | |
1182 | (assoc-ref %build-inputs "gdbm")))) | |
1183 | ||
56f31a9f MW |
1184 | ;; Apply the patch to add support for gdbm-1.14. |
1185 | (let ((patch-command (string-append (assoc-ref %build-inputs "patch") | |
1186 | "/bin/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))) | |
1191 | ||
93e7199b | 1192 | ;; compile to the destination |
e3cfef22 MW |
1193 | (compile-file gdbm.scm-dest gdbm.go-dest) |
1194 | ||
1195 | #t)))) | |
93e7199b CAW |
1196 | (home-page "https://github.com/ijp/guile-gdbm") |
1197 | (synopsis "Guile bindings to the GDBM library via Guile's FFI") | |
1198 | (description | |
1199 | "Guile bindings to the GDBM key-value storage system, using | |
1200 | Guile's foreign function interface.") | |
71e0f217 | 1201 | (license license:gpl3+))) |
93e7199b | 1202 | |
5bd3a841 LC |
1203 | (define-public guile2.0-gdbm-ffi |
1204 | (package-for-guile-2.0 guile-gdbm-ffi)) | |
1205 | ||
2737bcff | 1206 | (define-public guile2.2-gdbm-ffi |
5bd3a841 | 1207 | (deprecated-package "guile2.2-gdbm-ffi" guile-gdbm-ffi)) |
93e7199b | 1208 | |
e8ac1f8f | 1209 | (define-public guile-sqlite3 |
499e499b LC |
1210 | (let ((commit "10c13a7e02ab1655c8a758e560cafc9d6eff26f4") |
1211 | (revision "4")) | |
e8ac1f8f LC |
1212 | (package |
1213 | (name "guile-sqlite3") | |
18adb1f0 | 1214 | (version (git-version "0.0" revision commit)) |
e8ac1f8f | 1215 | |
ae21519f LC |
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") | |
e8ac1f8f LC |
1220 | (source (origin |
1221 | (method git-fetch) | |
1222 | (uri (git-reference | |
1223 | (url home-page) | |
1224 | (commit commit))) | |
1225 | (sha256 | |
1226 | (base32 | |
499e499b | 1227 | "0nhhswpd7nb2f0gfr55fzcc2xm3l2xx4rbljsd1clrm8fj2d7q9d")) |
e8ac1f8f LC |
1228 | (file-name (string-append name "-" version "-checkout")) |
1229 | (modules '((guix build utils))) | |
1230 | (snippet | |
1231 | ;; Upgrade 'Makefile.am' to the current way of doing things. | |
6cbee49d MW |
1232 | '(begin |
1233 | (substitute* "Makefile.am" | |
1234 | (("TESTS_ENVIRONMENT") | |
1235 | "TEST_LOG_COMPILER")) | |
1236 | #t)))) | |
e8ac1f8f LC |
1237 | |
1238 | (build-system gnu-build-system) | |
1239 | (native-inputs | |
1240 | `(("autoconf" ,autoconf) | |
1241 | ("automake" ,automake) | |
1242 | ("pkg-config" ,pkg-config))) | |
1243 | (inputs | |
99bde93b | 1244 | `(("guile" ,guile-2.2) |
e8ac1f8f LC |
1245 | ("sqlite" ,sqlite))) |
1246 | (arguments | |
1247 | '(#:phases (modify-phases %standard-phases | |
d10092b8 | 1248 | (add-after 'unpack 'autoreconf |
e8ac1f8f LC |
1249 | (lambda _ |
1250 | (zero? (system* "autoreconf" "-vfi")))) | |
1251 | (add-before 'build 'set-sqlite3-file-name | |
1252 | (lambda* (#:key inputs #:allow-other-keys) | |
1253 | (substitute* "sqlite3.scm" | |
1254 | (("\"libsqlite3\"") | |
1255 | (string-append "\"" (assoc-ref inputs "sqlite") | |
1256 | "/lib/libsqlite3\""))) | |
1257 | #t))))) | |
1258 | (synopsis "Access SQLite databases from Guile") | |
1259 | (description | |
1260 | "This package provides Guile bindings to the SQLite database system.") | |
71e0f217 | 1261 | (license license:gpl3+)))) |
e8ac1f8f | 1262 | |
27f5e13e DT |
1263 | (define-public haunt |
1264 | (package | |
1265 | (name "haunt") | |
907254e5 | 1266 | (version "0.2.2") |
27f5e13e DT |
1267 | (source (origin |
1268 | (method url-fetch) | |
4960beaa | 1269 | (uri (string-append "https://files.dthompson.us/haunt/haunt-" |
27f5e13e DT |
1270 | version ".tar.gz")) |
1271 | (sha256 | |
1272 | (base32 | |
907254e5 | 1273 | "0nm00krmqq4zmqi2irh35dbf2cn6al58s620hijmhfvhgvdqznlp")))) |
27f5e13e | 1274 | (build-system gnu-build-system) |
4ecbf6d2 LC |
1275 | (arguments |
1276 | `(#:modules ((ice-9 match) (ice-9 ftw) | |
1277 | ,@%gnu-build-system-modules) | |
1e406301 | 1278 | #:tests? #f ; test suite is non-deterministic :( |
4ecbf6d2 LC |
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 | |
1283 | ;; modules. | |
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) | |
1289 | (("." ".." version) | |
907254e5 DT |
1290 | (let ((modules (string-append site "/" version)) |
1291 | (compiled-modules (string-append | |
1292 | out "/lib/guile/" version | |
1293 | "/site-ccache"))) | |
4ecbf6d2 LC |
1294 | (wrap-program (string-append bin "/haunt") |
1295 | `("GUILE_LOAD_PATH" ":" prefix | |
1296 | (,modules)) | |
1297 | `("GUILE_LOAD_COMPILED_PATH" ":" prefix | |
907254e5 | 1298 | (,compiled-modules))) |
4ecbf6d2 | 1299 | #t))))))))) |
4960beaa DT |
1300 | (native-inputs |
1301 | `(("pkg-config" ,pkg-config) | |
1302 | ("texinfo" ,texinfo))) | |
27f5e13e | 1303 | (inputs |
bd19f65a | 1304 | `(("guile" ,guile-2.2))) |
4960beaa | 1305 | (propagated-inputs |
9b1a497e AP |
1306 | `(("guile-reader" ,guile-reader) |
1307 | ("guile-commonmark" ,guile-commonmark))) | |
27f5e13e DT |
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") | |
71e0f217 | 1313 | (license license:gpl3+))) |
27f5e13e | 1314 | |
bd19f65a LC |
1315 | (define-public guile2.0-haunt |
1316 | (package-for-guile-2.0 | |
1317 | (package (inherit haunt) (name "guile2.0-haunt")))) | |
64f34aef | 1318 | (define-public guile2.2-haunt |
bd19f65a | 1319 | (deprecated-package "guile2.2-haunt" haunt)) |
64f34aef | 1320 | |
44a2bdf8 AS |
1321 | (define-public guile-config |
1322 | (package | |
1323 | (name "guile-config") | |
43d5df98 | 1324 | (version "0.2") |
44a2bdf8 | 1325 | (source (origin |
43d5df98 AS |
1326 | (method git-fetch) |
1327 | (uri (git-reference | |
1328 | (url "https://github.com/a-sassmannshausen/guile-config") | |
1329 | (commit "guile-config-0.2"))) | |
1330 | (file-name (string-append name "-" version "-checkout")) | |
44a2bdf8 AS |
1331 | (sha256 |
1332 | (base32 | |
43d5df98 | 1333 | "07q86vqdwmm81wwxz1d1ah27hbhs6qbn8kiizrfpj0s4bf95w3r9")))) |
44a2bdf8 | 1334 | (build-system gnu-build-system) |
43d5df98 AS |
1335 | (arguments |
1336 | '(#:phases (modify-phases %standard-phases | |
1337 | (add-after 'unpack 'autoreconf | |
1338 | (lambda _ | |
1339 | (zero? (system* "autoreconf" "-fi"))))))) | |
1340 | (native-inputs | |
1341 | `(("autoconf" ,autoconf) | |
1342 | ("automake" ,automake) | |
1343 | ("pkg-config" ,pkg-config) | |
1344 | ("texinfo" ,texinfo))) | |
44a2bdf8 | 1345 | (inputs |
43d5df98 | 1346 | `(("guile" ,guile-2.2))) |
44a2bdf8 AS |
1347 | (synopsis "Guile application configuration parsing library") |
1348 | (description | |
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") | |
43d5df98 | 1357 | (license license:gpl3+))) |
44a2bdf8 | 1358 | |
36548111 DT |
1359 | (define-public guile-redis |
1360 | (package | |
1361 | (name "guile-redis") | |
1362 | (version "0.1.0") | |
1363 | (source (origin | |
1364 | (method url-fetch) | |
1365 | (uri (string-append "mirror://savannah/guile-redis/guile-redis-" | |
1366 | version ".tar.gz")) | |
1367 | (sha256 | |
1368 | (base32 | |
1369 | "0vx6if6b4r3kwx64vzbs6vpc0cpcr85x11w9vkzq27gw8n7isv56")) | |
1370 | (modules '((guix build utils))) | |
1371 | (snippet | |
ea833d30 | 1372 | ;; Make sure everything goes under .../site/X.Y, like Guile's |
36548111 | 1373 | ;; search paths expects. |
ea833d30 RW |
1374 | '(begin |
1375 | (substitute* "configure" | |
1376 | (("ac_subst_vars='") | |
1377 | "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n")) | |
1378 | (substitute* '("Makefile.in" | |
1379 | "redis/Makefile.in" | |
1380 | "redis/commands/Makefile.in") | |
1381 | (("moddir =.*/share/guile/site" all) | |
6cbee49d MW |
1382 | (string-append all "/@GUILE_EFFECTIVE_VERSION@"))) |
1383 | #t)))) | |
36548111 DT |
1384 | (build-system gnu-build-system) |
1385 | (native-inputs | |
d5eacecc | 1386 | `(("guile" ,guile-2.2))) |
340978d7 | 1387 | (home-page "https://savannah.nongnu.org/projects/guile-redis/") |
36548111 DT |
1388 | (synopsis "Redis client library for Guile") |
1389 | (description "Guile-redis provides a Scheme interface to the Redis | |
1390 | key-value cache and store.") | |
71e0f217 | 1391 | (license license:lgpl3+))) |
36548111 | 1392 | |
d5eacecc LC |
1393 | (define-public guile2.0-redis |
1394 | (package-for-guile-2.0 guile-redis)) | |
1395 | ||
85313be8 | 1396 | (define-public guile2.2-redis |
d5eacecc | 1397 | (deprecated-package "guile2.2-redis" guile-redis)) |
85313be8 | 1398 | |
9d373377 CAW |
1399 | (define-public guile-wisp |
1400 | (package | |
1401 | (name "guile-wisp") | |
e0840905 | 1402 | (version "0.9.8") |
9d373377 CAW |
1403 | (source (origin |
1404 | (method url-fetch) | |
1405 | (uri (string-append "https://bitbucket.org/ArneBab/" | |
1406 | "wisp/downloads/wisp-" | |
1407 | version ".tar.gz")) | |
1408 | (sha256 | |
1409 | (base32 | |
e0840905 | 1410 | "1f2bbicq1rxnwmiplrm4r75wj06w385mjkyvi7g4k740bgwcrzxr")))) |
9d373377 CAW |
1411 | (build-system gnu-build-system) |
1412 | (arguments | |
e8374e69 LC |
1413 | `(#:modules ((guix build gnu-build-system) |
1414 | (guix build utils) | |
1415 | (ice-9 rdelim) | |
1416 | (ice-9 popen)) | |
1417 | ||
9d373377 CAW |
1418 | #:phases |
1419 | (modify-phases %standard-phases | |
e0840905 | 1420 | (add-before 'configure 'substitute-before-config |
9d373377 CAW |
1421 | |
1422 | (lambda* (#:key inputs #:allow-other-keys) | |
1423 | (let ((bash (assoc-ref inputs "bash"))) | |
9d373377 CAW |
1424 | ;; Puts together some test files with /bin/bash hardcoded |
1425 | (substitute* "Makefile.in" | |
e0840905 LC |
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 | |
9d373377 CAW |
1430 | #t))) |
1431 | ||
1432 | ;; auto compilation breaks, but if we set HOME to /tmp, | |
1433 | ;; that works ok | |
1434 | (add-before | |
1435 | 'check 'auto-compile-hacky-workaround | |
1436 | (lambda _ | |
1437 | (setenv "HOME" "/tmp") | |
1438 | #t)) | |
e0840905 | 1439 | (add-after 'install 'install-go-files |
9d373377 CAW |
1440 | (lambda* (#:key outputs inputs #:allow-other-keys) |
1441 | (let* ((out (assoc-ref outputs "out")) | |
e8374e69 LC |
1442 | (effective (read-line |
1443 | (open-pipe* OPEN_READ | |
1444 | "guile" "-c" | |
1445 | "(display (effective-version))"))) | |
1446 | (module-dir (string-append out "/share/guile/site/" | |
1447 | effective)) | |
1448 | (object-dir (string-append out "/lib/guile/" effective | |
1449 | "/site-ccache")) | |
1450 | (prefix (string-length module-dir))) | |
9d373377 | 1451 | ;; compile to the destination |
e0840905 | 1452 | (for-each (lambda (file) |
e8374e69 LC |
1453 | (let* ((base (string-drop (string-drop-right file 4) |
1454 | prefix)) | |
1455 | (go (string-append object-dir base ".go"))) | |
1456 | (invoke "guild" "compile" "-L" module-dir | |
1457 | file "-o" go))) | |
e0840905 | 1458 | (find-files module-dir "\\.scm$")) |
9d373377 CAW |
1459 | #t)))))) |
1460 | (home-page "http://draketo.de/english/wisp") | |
1461 | (inputs | |
89c4bfe7 | 1462 | `(("guile" ,guile-2.2))) |
e0840905 LC |
1463 | (native-inputs |
1464 | `(("python" ,python) | |
1465 | ("pkg-config" ,pkg-config))) | |
a124bbd2 SB |
1466 | (synopsis "Whitespace to lisp syntax for Guile") |
1467 | (description "Wisp is a syntax for Guile which provides a Python-like | |
9d373377 CAW |
1468 | whitespace-significant language. It may be easier on the eyes for some |
1469 | users and in some situations.") | |
71e0f217 | 1470 | (license license:gpl3+))) |
9d373377 | 1471 | |
5649c8cd DT |
1472 | (define-public guile-sly |
1473 | (package | |
1474 | (name "guile-sly") | |
1475 | (version "0.1") | |
1476 | (source (origin | |
1477 | (method url-fetch) | |
8d5e7ad2 | 1478 | (uri (string-append "https://files.dthompson.us/sly/sly-" |
5649c8cd DT |
1479 | version ".tar.gz")) |
1480 | (sha256 | |
1481 | (base32 | |
44394ef9 LC |
1482 | "1svzlbz2vripmyq2kjh0rig16bsrnbkwbsm558pjln9l65mcl4qq")) |
1483 | (modules '((guix build utils))) | |
1484 | (snippet | |
1485 | '(begin | |
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") | |
1492 | (("moddir = .*$") | |
1493 | (string-append | |
1494 | "moddir = " | |
1495 | "$(prefix)/share/guile/site/@GUILE_EFFECTIVE_VERSION@\n")) | |
1496 | (("godir = .*$") | |
1497 | (string-append | |
1498 | "godir = " | |
6cbee49d MW |
1499 | "$(prefix)/lib/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n"))) |
1500 | #t)))) | |
5649c8cd DT |
1501 | (build-system gnu-build-system) |
1502 | (arguments | |
1503 | '(#:configure-flags | |
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"))))) | |
1508 | (native-inputs | |
1509 | `(("pkg-config" ,pkg-config))) | |
1510 | (propagated-inputs | |
2e7825bc | 1511 | `(("guile-sdl" ,guile-sdl) |
5649c8cd DT |
1512 | ("guile-opengl" ,guile-opengl))) |
1513 | (inputs | |
2e7825bc LC |
1514 | `(("guile" ,guile-2.2) |
1515 | ("gsl" ,gsl) | |
5649c8cd DT |
1516 | ("freeimage" ,freeimage) |
1517 | ("mesa" ,mesa))) | |
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 | |
1521 | capabilities.") | |
0eb3b8c0 | 1522 | (home-page "https://dthompson.us/projects/sly.html") |
71e0f217 | 1523 | (license license:gpl3+))) |
5649c8cd | 1524 | |
dec1e2b3 AB |
1525 | (define-public g-wrap |
1526 | (package | |
1527 | (name "g-wrap") | |
1528 | (version "1.9.15") | |
1529 | (source (origin | |
1530 | (method url-fetch) | |
1531 | (uri (string-append "mirror://savannah/g-wrap/g-wrap-" | |
1532 | version ".tar.gz")) | |
1533 | (sha256 | |
1534 | (base32 | |
1535 | "0ak0bha37dfpj9kmyw1r8fj8nva639aw5xr66wr5gd3l1rqf5xhg")))) | |
1536 | (build-system gnu-build-system) | |
1537 | (native-inputs | |
1538 | `(("pkg-config" ,pkg-config))) | |
1539 | (propagated-inputs | |
61583094 | 1540 | `(("guile" ,guile-2.2) |
dec1e2b3 AB |
1541 | ("guile-lib" ,guile-lib))) |
1542 | (inputs | |
1543 | `(("libffi" ,libffi))) | |
9e8599a3 | 1544 | (arguments |
61583094 TF |
1545 | `(#:configure-flags '("--disable-Werror") |
1546 | #:phases | |
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@"))) | |
1554 | #t)))))) | |
dec1e2b3 AB |
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.") | |
340978d7 | 1561 | (home-page "https://www.nongnu.org/g-wrap/index.html") |
71e0f217 | 1562 | (license license:lgpl2.1+))) |
dec1e2b3 | 1563 | |
01497dfe LC |
1564 | (define-public guile-dbi |
1565 | (package | |
1566 | (name "guile-dbi") | |
1567 | (version "2.1.6") | |
1568 | (source (origin | |
1569 | (method url-fetch) | |
1570 | (uri (string-append | |
1571 | "http://download.gna.org/guile-dbi/guile-dbi-" | |
1572 | version ".tar.gz")) | |
1573 | (sha256 | |
1574 | (base32 | |
1575 | "116njrprhgrsv1qm904sp3b02rq01fx639r433d657gyhw3x159n")))) | |
1576 | (build-system gnu-build-system) | |
1577 | (arguments | |
1578 | '(#:configure-flags | |
1579 | (list (string-append | |
b989c3e3 | 1580 | "--with-guile-site-dir=" %output "/share/guile/site/2.2")) |
34e00c7b AI |
1581 | #:make-flags |
1582 | (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib:" | |
1583 | (assoc-ref %build-inputs "guile-dbd-sqlite3") "/lib")) | |
01497dfe LC |
1584 | #:phases |
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 | |
b989c3e3 | 1590 | out "/share/guile/site/2.2/dbi/dbi.scm")) |
01497dfe LC |
1591 | (ext (string-append out "/lib/libguile-dbi"))) |
1592 | (substitute* dbi.scm (("libguile-dbi") ext)) | |
1593 | #t)))))) | |
34e00c7b AI |
1594 | (inputs |
1595 | `(("guile-dbd-sqlite3" ,guile-dbd-sqlite3))) ; only shared library, no scheme files | |
01497dfe | 1596 | (propagated-inputs |
b989c3e3 | 1597 | `(("guile" ,guile-2.2))) |
01497dfe LC |
1598 | (synopsis "Guile database abstraction layer") |
1599 | (home-page "http://home.gna.org/guile-dbi/guile-dbi.html") | |
1600 | (description | |
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.") | |
71e0f217 | 1605 | (license license:gpl2+))) |
01497dfe | 1606 | |
34e00c7b AI |
1607 | (define guile-dbi-bootstrap |
1608 | (package | |
1609 | (inherit guile-dbi) | |
1610 | (name "guile-dbi-bootstrap") | |
1611 | (inputs '()) | |
1612 | (arguments | |
1613 | (substitute-keyword-arguments (package-arguments guile-dbi) | |
1614 | ((#:make-flags _) '(list)))))) | |
1615 | ||
01497dfe LC |
1616 | (define-public guile-dbd-sqlite3 |
1617 | (package | |
1618 | (name "guile-dbd-sqlite3") | |
1619 | (version "2.1.6") | |
1620 | (source (origin | |
1621 | (method url-fetch) | |
1622 | (uri (string-append | |
1623 | "http://download.gna.org/guile-dbi/guile-dbd-sqlite3-" | |
1624 | version ".tar.gz")) | |
1625 | (sha256 | |
1626 | (base32 | |
1627 | "0rg71jchxd2y8x496s8zmfmikr5g8zxi8zv2ar3f7a23pph92iw2")))) | |
1628 | (build-system gnu-build-system) | |
1629 | (native-inputs | |
34e00c7b AI |
1630 | `(("pkg-config" ,pkg-config) |
1631 | ("guile-dbi-bootstrap" ,guile-dbi-bootstrap))) ; only required for headers | |
01497dfe LC |
1632 | (inputs |
1633 | `(("sqlite" ,sqlite) | |
1634 | ("zlib" ,(@ (gnu packages compression) zlib)))) | |
01497dfe LC |
1635 | (synopsis "Guile DBI driver for SQLite") |
1636 | (home-page "https://github.com/jkalbhenn/guile-dbd-sqlite3") | |
1637 | (description | |
1638 | "guile-dbi is a library for Guile that provides a convenient interface to | |
1639 | SQL databases. This package implements the interface for SQLite.") | |
71e0f217 | 1640 | (license license:gpl2+))) |
01497dfe | 1641 | |
e9291eaa AS |
1642 | (define-public guile-dsv |
1643 | (package | |
1644 | (name "guile-dsv") | |
8c80f8ef | 1645 | (version "0.2.1") |
e9291eaa AS |
1646 | (source (origin |
1647 | (method git-fetch) | |
1648 | (uri (git-reference | |
1649 | (url "https://github.com/artyom-poptsov/guile-dsv") | |
8c80f8ef | 1650 | (commit "bdc5267d007478abc20ea96d7c459b7dd9560b3d"))) |
e9291eaa AS |
1651 | (file-name (string-append name "-" version "-checkout")) |
1652 | (sha256 | |
1653 | (base32 | |
8c80f8ef | 1654 | "1irw6mz8998nwyhzrw9g94jcz60b9zljgqfmipaz1ybn8579qjx0")))) |
e9291eaa AS |
1655 | (build-system gnu-build-system) |
1656 | (native-inputs | |
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))) | |
1663 | (arguments | |
1664 | '(#:phases (modify-phases %standard-phases | |
1665 | (add-before 'configure 'set-guilesitedir | |
1666 | (lambda _ | |
1667 | (substitute* "Makefile.in" | |
1668 | (("^guilesitedir =.*$") | |
1669 | "guilesitedir = \ | |
1670 | $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n")) | |
1671 | (substitute* "modules/Makefile.in" | |
1672 | (("^guilesitedir =.*$") | |
1673 | "guilesitedir = \ | |
1674 | $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n")) | |
1675 | (substitute* "modules/dsv/Makefile.in" | |
1676 | (("^guilesitedir =.*$") | |
1677 | "guilesitedir = \ | |
1678 | $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n")) | |
1679 | #t)) | |
1680 | (add-after 'unpack 'autoreconf | |
1681 | (lambda _ | |
1682 | (zero? (system* "autoreconf" "-vfi"))))))) | |
1683 | (home-page "https://github.com/artyom-poptsov/guile-dsv") | |
1684 | (synopsis "DSV module for Guile") | |
1685 | (description | |
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+))) | |
1690 | ||
bd9af610 AK |
1691 | (define-public guile-xosd |
1692 | (package | |
1693 | (name "guile-xosd") | |
4b2b7135 | 1694 | (version "0.2.1") |
bd9af610 AK |
1695 | (source (origin |
1696 | (method url-fetch) | |
1697 | (uri (string-append "https://github.com/alezost/" name | |
1698 | "/releases/download/v" version | |
1699 | "/" name "-" version ".tar.gz")) | |
1700 | (sha256 | |
1701 | (base32 | |
4b2b7135 | 1702 | "1ri5065c16kmgrf2pysn2ymxjqi5302lhpb07wkl1jr75ym8fn8p")))) |
bd9af610 AK |
1703 | (build-system gnu-build-system) |
1704 | (native-inputs | |
1705 | `(("pkg-config" ,pkg-config))) | |
1706 | (inputs | |
c6726a5f | 1707 | `(("guile" ,guile-2.2) |
bd9af610 AK |
1708 | ("libx11" ,libx11) |
1709 | ("libxext" ,libxext) | |
1710 | ("libxinerama" ,libxinerama) | |
1711 | ("xosd" ,xosd))) | |
1712 | (home-page "https://github.com/alezost/guile-xosd") | |
1713 | (synopsis "XOSD bindings for Guile") | |
1714 | (description | |
1715 | "Guile-XOSD provides Guile bindings for @code{libxosd}, | |
1716 | @uref{http://sourceforge.net/projects/libxosd/, the X On Screen Display | |
1717 | library}.") | |
71e0f217 | 1718 | (license license:gpl3+))) |
bd9af610 | 1719 | |
07f7cc03 AK |
1720 | (define-public guile-daemon |
1721 | (package | |
1722 | (name "guile-daemon") | |
5245399f | 1723 | (version "0.1.2") |
07f7cc03 AK |
1724 | (source (origin |
1725 | (method url-fetch) | |
1726 | (uri (string-append "https://github.com/alezost/" name | |
1727 | "/releases/download/v" version | |
1728 | "/" name "-" version ".tar.gz")) | |
1729 | (sha256 | |
1730 | (base32 | |
5245399f | 1731 | "0hh6gq6b6phpxm0b1dkxyzj3f4sxdf7dji63609lzypa5v1ad2gv")))) |
07f7cc03 AK |
1732 | (build-system gnu-build-system) |
1733 | (native-inputs | |
1734 | `(("pkg-config" ,pkg-config))) | |
1735 | (inputs | |
c6726a5f | 1736 | `(("guile" ,guile-2.2))) |
07f7cc03 AK |
1737 | (home-page "https://github.com/alezost/guile-daemon") |
1738 | (synopsis "Evaluate code in a running Guile process") | |
1739 | (description | |
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.") | |
71e0f217 | 1743 | (license license:gpl3+))) |
07f7cc03 | 1744 | |
e28e74a5 EE |
1745 | (define-public guile-commonmark |
1746 | (package | |
1747 | (name "guile-commonmark") | |
1748 | (version "0.1") | |
1749 | (source (origin | |
1750 | (method url-fetch) | |
1751 | (uri (string-append "https://github.com/OrangeShark/" name | |
1752 | "/releases/download/v" version | |
1753 | "/" name "-" version ".tar.gz")) | |
1754 | (sha256 | |
1755 | (base32 | |
757ce0f9 LC |
1756 | "12cb5fqvvgc87f5xp0ih5az305wnjia89l5jba83d0r2p8bfy0b0")) |
1757 | (modules '((guix build utils))) | |
1758 | (snippet | |
1759 | ;; Use the real effective version of Guile in directory names | |
1760 | ;; instead of a hard-coded "/2.0". | |
1761 | '(begin | |
1762 | (substitute* "configure" | |
1763 | (("ac_subst_vars='") | |
1764 | "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n")) | |
1765 | (substitute* "Makefile.in" | |
1766 | (("/site/2.0") | |
6cbee49d MW |
1767 | "/site/@GUILE_EFFECTIVE_VERSION@")) |
1768 | #t)))) | |
e28e74a5 EE |
1769 | (build-system gnu-build-system) |
1770 | (inputs | |
7c86c031 | 1771 | `(("guile" ,guile-2.2))) |
e28e74a5 EE |
1772 | (synopsis "CommonMark parser for Guile") |
1773 | (description | |
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") | |
71e0f217 | 1780 | (license license:lgpl3+))) |
e28e74a5 | 1781 | |
7c86c031 LC |
1782 | (define-public guile2.0-commonmark |
1783 | (package-for-guile-2.0 guile-commonmark)) | |
947a5d47 | 1784 | (define-public guile2.2-commonmark |
7c86c031 | 1785 | (deprecated-package "guile2.2-commonmark" guile-commonmark)) |
947a5d47 | 1786 | |
3b5783fc AB |
1787 | (define-public guile-bytestructures |
1788 | (package | |
1789 | (name "guile-bytestructures") | |
90977eb5 | 1790 | (version "1.0.3") |
3b5783fc | 1791 | (source (origin |
4f85f7f7 | 1792 | (method url-fetch) |
1793 | (uri (string-append "https://github.com/TaylanUB/scheme-bytestructures" | |
1794 | "/releases/download/v" version | |
1795 | "/bytestructures-" version ".tar.gz")) | |
3b5783fc AB |
1796 | (sha256 |
1797 | (base32 | |
90977eb5 | 1798 | "0xf6s8gd3656j8k2ar6y7i62r68azawyzxhsagsk8nvldnrs1r18")))) |
4f85f7f7 | 1799 | (build-system gnu-build-system) |
726ecfeb | 1800 | (native-inputs |
4f85f7f7 | 1801 | `(("pkg-config" ,pkg-config))) |
3b5783fc | 1802 | (inputs |
aabece2e | 1803 | `(("guile" ,guile-2.2))) |
3b5783fc AB |
1804 | (home-page "https://github.com/TaylanUB/scheme-bytestructures") |
1805 | (synopsis "Structured access to bytevector contents for Guile") | |
1806 | (description | |
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.") | |
71e0f217 | 1812 | (license license:gpl3+))) |
3b5783fc | 1813 | |
726ecfeb LC |
1814 | (define-public guile2.0-bytestructures |
1815 | (package-for-guile-2.0 guile-bytestructures)) | |
1816 | ||
472fc855 LC |
1817 | (define-public guile-aspell |
1818 | (package | |
1819 | (name "guile-aspell") | |
234ea3d6 | 1820 | (version "0.4") |
472fc855 LC |
1821 | (source (origin |
1822 | (method url-fetch) | |
1823 | (uri (string-append | |
1824 | "http://lonelycactus.com/tarball/guile_aspell-" | |
1825 | version ".tar.gz")) | |
1826 | (sha256 | |
1827 | (base32 | |
234ea3d6 | 1828 | "0vpk5xj9m9qc702z3khmkwhgpb949qbsyz8kw2qycda6qnxk0077")))) |
472fc855 LC |
1829 | (build-system gnu-build-system) |
1830 | (arguments | |
7295087e LC |
1831 | '(#:phases (modify-phases %standard-phases |
1832 | (add-before 'configure 'set-guilesitedir | |
1833 | (lambda _ | |
1834 | (substitute* "Makefile.in" | |
1835 | (("^guilesitedir =.*$") | |
1836 | "guilesitedir = \ | |
1837 | $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n")) | |
1838 | #t)) | |
472fc855 LC |
1839 | (add-before 'build 'set-libaspell-file-name |
1840 | (lambda* (#:key inputs #:allow-other-keys) | |
1841 | (let ((aspell (assoc-ref inputs "aspell"))) | |
234ea3d6 | 1842 | (substitute* "aspell.scm" |
472fc855 LC |
1843 | (("\"libaspell\\.so\"") |
1844 | (string-append "\"" aspell | |
1845 | "/lib/libaspell\""))) | |
1846 | #t)))))) | |
1847 | (native-inputs `(("pkg-config" ,pkg-config))) | |
cb5be6df | 1848 | (inputs `(("guile" ,guile-2.2) |
472fc855 LC |
1849 | ("aspell" ,aspell))) |
1850 | (home-page "https://github.com/spk121/guile-aspell") | |
1851 | (synopsis "Spell-checking from Guile") | |
1852 | (description | |
1853 | "guile-aspell is a Guile Scheme library for comparing a string against a | |
1854 | dictionary and suggesting spelling corrections.") | |
71e0f217 | 1855 | (license license:gpl3+))) |
472fc855 | 1856 | |
a614ce38 LC |
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") | |
1861 | (revision "0")) | |
1862 | (package | |
1863 | (name "guile-bash") | |
1864 | (version (string-append "0.1.6-" revision "." (string-take commit 7))) | |
1865 | (home-page | |
1866 | "https://anonscm.debian.org/cgit/users/kaction-guest/retired/dev.guile-bash.git") | |
1867 | (source (origin | |
1868 | (method git-fetch) | |
1869 | (uri (git-reference | |
1870 | (commit commit) | |
1871 | (url home-page))) | |
1872 | (sha256 | |
1873 | (base32 | |
1874 | "097vny990wp2qpjij6a5a5gwc6fxzg5wk56inhy18iki5v6pif1p")) | |
1875 | (file-name (string-append name "-" version "-checkout")))) | |
1876 | (build-system gnu-build-system) | |
1877 | (arguments | |
189be331 | 1878 | '(#:configure-flags |
a614ce38 LC |
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") | |
1883 | ||
1884 | ;; The '.a' file is useless. | |
1885 | "--disable-static" | |
1886 | ||
1887 | ;; Install 'lib/bash' as Bash 4.4 expects. | |
1888 | (string-append "--libdir=" (assoc-ref %outputs "out") | |
1889 | "/lib/bash")))) | |
1890 | (native-inputs `(("pkg-config" ,pkg-config) | |
464f5447 | 1891 | ("autoconf" ,autoconf-wrapper) |
a614ce38 LC |
1892 | ("automake" ,automake) |
1893 | ("libtool" ,libtool) | |
1894 | ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'. | |
b7158b76 LC |
1895 | ("gettext" ,gettext-minimal) |
1896 | ||
1897 | ;; Bash with loadable module support, for the test | |
1898 | ;; suite. | |
1899 | ("bash-full" ,bash))) | |
a614ce38 LC |
1900 | (inputs `(("guile" ,guile-2.0) |
1901 | ("bash:include" ,bash "include"))) | |
1902 | (synopsis "Extend Bash using Guile") | |
1903 | (description | |
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: | |
1907 | ||
1908 | @itemize | |
1909 | @item aliases; | |
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. | |
1915 | @end itemize | |
1916 | ||
1917 | To enable it, run: | |
1918 | ||
1919 | @example | |
1920 | enable -f ~/.guix-profile/lib/bash/libguile-bash.so scm | |
1921 | @end example | |
1922 | ||
1923 | and then run @command{scm example.scm}.") | |
71e0f217 | 1924 | (license license:gpl3+)))) |
a614ce38 | 1925 | |
c5793e7e CAW |
1926 | (define-public guile-8sync |
1927 | (package | |
1928 | (name "guile-8sync") | |
525acb6e | 1929 | (version "0.4.2") |
c5793e7e CAW |
1930 | (source (origin |
1931 | (method url-fetch) | |
1932 | (uri (string-append "mirror://gnu/8sync/8sync-" version | |
1933 | ".tar.gz")) | |
1934 | (sha256 | |
1935 | (base32 | |
525acb6e | 1936 | "031wm13srak3wsnll7j2mbbi29g1pcm4swdb71ds9yn567pn20qw")))) |
c5793e7e CAW |
1937 | (build-system gnu-build-system) |
1938 | (native-inputs `(("autoconf" ,autoconf) | |
1939 | ("automake" ,automake) | |
f6396d86 | 1940 | ("guile" ,guile-2.2) |
c5793e7e CAW |
1941 | ("pkg-config" ,pkg-config) |
1942 | ("texinfo" ,texinfo))) | |
1943 | (arguments | |
1944 | `(#:phases (modify-phases %standard-phases | |
1945 | (add-before 'configure 'setenv | |
1946 | (lambda _ | |
1947 | ;; quiet warnings | |
ab4a1731 CAW |
1948 | (setenv "GUILE_AUTO_COMPILE" "0") |
1949 | #t))))) | |
c5793e7e CAW |
1950 | (home-page "https://gnu.org/s/8sync/") |
1951 | (synopsis "Asynchronous actor model library for Guile") | |
1952 | (description | |
1953 | "GNU 8sync (pronounced \"eight-sync\") is an asynchronous programming | |
1954 | library for GNU Guile based on the actor model. | |
1955 | ||
f6396d86 | 1956 | Note that 8sync is only available for Guile 2.2.") |
71e0f217 | 1957 | (license license:lgpl3+))) |
c5793e7e | 1958 | |
aaf1bdc3 CAW |
1959 | (define-public guile-fibers |
1960 | (package | |
1961 | (name "guile-fibers") | |
1962 | (version "1.0.0") | |
1963 | (source (origin | |
1964 | (method url-fetch) | |
1965 | (uri (string-append "https://wingolog.org/pub/fibers/fibers-" | |
1966 | version ".tar.gz")) | |
1967 | (sha256 | |
1968 | (base32 | |
1969 | "0vjkg72ghgdgphzbjz9ig8al8271rq8974viknb2r1rg4lz92ld0")))) | |
1970 | (build-system gnu-build-system) | |
1971 | (native-inputs | |
1972 | `(("texinfo" ,texinfo) | |
1973 | ("pkg-config" ,pkg-config))) | |
1974 | (inputs | |
f6396d86 | 1975 | `(("guile" ,guile-2.2))) |
aaf1bdc3 CAW |
1976 | (synopsis "Lightweight concurrency facility for Guile") |
1977 | (description | |
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. | |
1985 | ||
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+))) | |
1990 | ||
bd233722 | 1991 | (define-public guile-git |
576f245c LC |
1992 | (let ((revision "6") |
1993 | (commit "36f93c174adc396c90ec3a6923487f0444fe5d69")) | |
bd233722 LC |
1994 | (package |
1995 | (name "guile-git") | |
1996 | (version (string-append "0.0-" revision "." (string-take commit 7))) | |
dc03f32d | 1997 | (home-page "https://gitlab.com/guile-git/guile-git.git") |
bd233722 LC |
1998 | (source (origin |
1999 | (method git-fetch) | |
2000 | (uri (git-reference (url home-page) (commit commit))) | |
2001 | (sha256 | |
2002 | (base32 | |
576f245c | 2003 | "0z1dvn0scx59pbgjkpacam7p5n7630z4qm8fazim7ixq9xv3s8wx")) |
bd233722 LC |
2004 | (file-name (git-file-name name version)))) |
2005 | (build-system gnu-build-system) | |
bd233722 LC |
2006 | (native-inputs |
2007 | `(("autoconf" ,autoconf) | |
2008 | ("automake" ,automake) | |
3a537598 | 2009 | ("texinfo" ,texinfo) |
bd233722 LC |
2010 | ("pkg-config" ,pkg-config))) |
2011 | (inputs | |
aabece2e | 2012 | `(("guile" ,guile-2.2) |
bd233722 LC |
2013 | ("libgit2" ,libgit2))) |
2014 | (propagated-inputs | |
2015 | `(("guile-bytestructures" ,guile-bytestructures))) | |
2016 | (synopsis "Guile bindings for libgit2") | |
2017 | (description | |
2018 | "This package provides Guile bindings to libgit2, a library to | |
2019 | manipulate repositories of the Git version control system.") | |
2020 | (license license:gpl3+)))) | |
c5793e7e | 2021 | |
70bc6085 LC |
2022 | (define-public guile2.0-git |
2023 | (package-for-guile-2.0 guile-git)) | |
2024 | ||
f252d6df | 2025 | (define-public guile-syntax-highlight |
3c90c7ae DT |
2026 | (package |
2027 | (name "guile-syntax-highlight") | |
2028 | (version "0.1") | |
2029 | (source (origin | |
2030 | (method url-fetch) | |
2031 | (uri (string-append "https://files.dthompson.us/" | |
2032 | "guile-syntax-highlight/" | |
2033 | "guile-syntax-highlight-" | |
2034 | version ".tar.gz")) | |
2035 | (sha256 | |
2036 | (base32 | |
2037 | "1p771kq15x83483m23bhah1sz6vkalg3drm7x279f4j1cxligkzi")))) | |
2038 | (build-system gnu-build-system) | |
2039 | (native-inputs | |
2040 | `(("pkg-config" ,pkg-config))) | |
2041 | (inputs | |
2042 | `(("guile" ,guile-2.2))) | |
8c72ed92 RW |
2043 | (synopsis "General-purpose syntax highlighter for GNU Guile") |
2044 | (description "Guile-syntax-highlight is a general-purpose syntax | |
f252d6df DT |
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.") | |
3c90c7ae DT |
2048 | (home-page "http://dthompson.us/projects/guile-syntax-highlight.html") |
2049 | (license license:lgpl3+))) | |
f252d6df | 2050 | |
d26ae96c CAW |
2051 | (define-public guile-sjson |
2052 | (package | |
2053 | (name "guile-sjson") | |
a62a16a4 | 2054 | (version "0.2.1") |
d26ae96c CAW |
2055 | (source (origin |
2056 | (method url-fetch) | |
2057 | (uri (string-append "https://dustycloud.org/misc/sjson-" version | |
2058 | ".tar.gz")) | |
2059 | (sha256 | |
2060 | (base32 | |
a62a16a4 | 2061 | "1mzmapln79vv10qxaggz9qwcdbag3jnrj19xx8bgkmxss8h03sv3")))) |
d26ae96c | 2062 | (build-system gnu-build-system) |
d26ae96c CAW |
2063 | (native-inputs |
2064 | `(("autoconf" ,autoconf) | |
2065 | ("automake" ,automake) | |
2066 | ("pkg-config" ,pkg-config))) | |
2067 | (inputs | |
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+))) | |
2074 | ||
e076d56a | 2075 | (define-public guile-colorized |
2076 | (package | |
2077 | (name "guile-colorized") | |
2078 | (version "0.1") | |
2079 | (source (origin | |
2080 | (method url-fetch) | |
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")) | |
2084 | (sha256 | |
2085 | (base32 | |
2086 | "16xhc3an6aglnca8xl3mvgi8hsqzqn68vsl5ga4bz8bvbap5fn4p")))) | |
2087 | (build-system gnu-build-system) | |
2088 | (arguments | |
2089 | `(#:modules ((system base compile) | |
2090 | ,@%gnu-build-system-modules) | |
2091 | #:tests? #f ;No tests included | |
2092 | #:phases | |
2093 | (modify-phases %standard-phases | |
2094 | (delete 'configure) ;No configure script | |
2095 | (replace 'install | |
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") | |
2101 | "/bin/guild"))) | |
2102 | ;; The original 'make install' is too primitive. | |
2103 | ||
2104 | ;; copy the source | |
2105 | (install-file "ice-9/colorized.scm" language-dir) | |
2106 | ||
2107 | ;; compile to the destination | |
2108 | (compile-file "ice-9/colorized.scm" | |
2109 | #:output-file (string-append | |
2110 | language-dir "/colorized.go")) | |
2111 | #t)))))) | |
2112 | (inputs | |
2113 | `(("guile" ,guile-2.2))) | |
2114 | (home-page "https://github.com/NalaGinrut/guile-colorized") | |
2115 | (synopsis "Colorized REPL for Guile") | |
2116 | (description | |
2117 | "Guile-colorized provides you with a colorized REPL for GNU Guile.") | |
2118 | (license license:gpl3+))) | |
2119 | ||
f858e58f | 2120 | (define-public guile-simple-zmq |
e46b84e3 PAR |
2121 | (let ((commit "1f3b7c0b9b249c6fde8e8a632b252d8a1b794424") |
2122 | (revision "1")) | |
f858e58f PAR |
2123 | (package |
2124 | (name "guile-simple-zmq") | |
2125 | (version (git-version "0.0.0" revision commit)) | |
2126 | (source | |
2127 | (origin | |
2128 | (method git-fetch) | |
2129 | (uri (git-reference | |
2130 | (url "https://github.com/jerry40/guile-simple-zmq") | |
2131 | (commit commit))) | |
2132 | (sha256 | |
2133 | (base32 | |
e46b84e3 | 2134 | "0nj2pd5bsmmgd3c54wh4sixfhmsv1arsq7yam2d7487h3n9q57r7")) |
f858e58f PAR |
2135 | (file-name (git-file-name name version)))) |
2136 | (build-system trivial-build-system) | |
2137 | (arguments | |
2138 | `(#:modules ((guix build utils)) | |
2139 | #:builder | |
2140 | (begin | |
2141 | (use-modules (guix build utils) | |
2142 | (srfi srfi-26) | |
2143 | (ice-9 match) | |
2144 | (ice-9 popen) | |
2145 | (ice-9 rdelim)) | |
2146 | ||
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/" | |
2154 | effective)) | |
2155 | (go-dir (string-append out "/lib/guile/" | |
2156 | effective "/site-ccache/")) | |
2157 | (source (string-append (assoc-ref %build-inputs "source") | |
2158 | "/src")) | |
2159 | (scm-file "simple-zmq.scm") | |
2160 | (guild (string-append (assoc-ref %build-inputs "guile") | |
2161 | "/bin/guild")) | |
2162 | (zmq (assoc-ref %build-inputs "zeromq")) | |
2163 | (deps (list zmq)) | |
2164 | (path (string-join | |
2165 | (map (cut string-append <> | |
2166 | "/lib/") | |
2167 | deps) | |
2168 | ":"))) | |
2169 | ;; Make installation directories. | |
2170 | (mkdir-p module-dir) | |
2171 | (mkdir-p go-dir) | |
2172 | ||
2173 | ;; Compile .scm files and install. | |
2174 | (chdir source) | |
2175 | (setenv "GUILE_AUTO_COMPILE" "0") | |
2176 | (for-each (lambda (file) | |
2177 | (let* ((dest-file (string-append module-dir "/" | |
2178 | file)) | |
2179 | (go-file (match (string-split file #\.) | |
2180 | ((base _) | |
2181 | (string-append go-dir "/" | |
2182 | base ".go"))))) | |
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")))) | |
2189 | ||
2190 | ;; Install and compile module. | |
2191 | (unless (zero? (system* guild "compile" | |
2192 | "-L" source | |
2193 | "-o" go-file | |
2194 | dest-file)) | |
2195 | (error (format #f "Failed to compile ~s to ~s!" | |
2196 | file go-file))))) | |
2197 | (list scm-file)) | |
2198 | #t)))) | |
e46b84e3 PAR |
2199 | (inputs |
2200 | `(("guile" ,guile-2.2))) | |
f858e58f | 2201 | (propagated-inputs |
e46b84e3 | 2202 | `(("zeromq" ,zeromq))) |
f858e58f PAR |
2203 | (home-page "https://github.com/jerry40/guile-simple-zmq") |
2204 | (synopsis "Guile wrapper over ZeroMQ library") | |
2205 | (description | |
2206 | "This package provides a Guile programming interface to the ZeroMQ | |
2207 | messaging library.") | |
2208 | (license license:gpl3+)))) | |
2209 | ||
fa6a3bb7 PAR |
2210 | (define-public jupyter-guile-kernel |
2211 | (let ((commit "a5c5f3ea3215b65e770bcb62f71117b0ec4575ed") | |
2212 | (revision "0")) | |
2213 | (package | |
2214 | (name "jupyter-guile-kernel") | |
2215 | (version (git-version "0.0.0" revision commit)) | |
2216 | (source | |
2217 | (origin | |
2218 | (method git-fetch) | |
2219 | (uri (git-reference | |
2220 | (url "https://github.com/jerry40/guile-kernel") | |
2221 | (commit commit))) | |
2222 | (sha256 | |
2223 | (base32 | |
2224 | "0y5jr0f0dyskvsawqbf6n0bpg8jirw4mhqbarf2a6p9lxhqha9s9")))) | |
2225 | (build-system trivial-build-system) | |
2226 | (arguments | |
2227 | `(#:modules ((guix build utils)) | |
2228 | #:builder | |
2229 | (begin | |
2230 | (use-modules (guix build utils) | |
2231 | (srfi srfi-26) | |
2232 | (ice-9 match) | |
2233 | (ice-9 popen) | |
2234 | (ice-9 rdelim)) | |
2235 | ||
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/" | |
2243 | effective)) | |
2244 | (kernel-dir (string-append out "/share/jupyter/kernels/guile")) | |
2245 | (go-dir (string-append out "/lib/guile/" | |
2246 | effective | |
2247 | "/site-ccache")) | |
2248 | (source (string-append (assoc-ref %build-inputs "source") | |
2249 | "/src")) | |
2250 | (scm-files '("hmac.scm" | |
2251 | "tools.scm" | |
2252 | "guile-jupyter-kernel.scm")) | |
2253 | (kernel-file "kernel.json") | |
2254 | (guild (string-append (assoc-ref %build-inputs "guile") | |
2255 | "/bin/guild")) | |
2256 | (g-szmq (assoc-ref %build-inputs "guile-simple-zmq")) | |
2257 | (json (assoc-ref %build-inputs "guile-json")) | |
2258 | (deps (list g-szmq json)) | |
2259 | (path (string-join | |
2260 | (map (cut string-append <> | |
2261 | "/share/guile/site/" | |
2262 | effective) | |
2263 | deps) | |
2264 | ":")) | |
2265 | (gopath (string-join | |
2266 | (map (cut string-append <> | |
2267 | "/lib/guile/" effective | |
2268 | "/site-ccache/") | |
2269 | deps) | |
2270 | ":"))) | |
2271 | ||
2272 | ;; Make installation directories. | |
2273 | (mkdir-p module-dir) | |
2274 | (mkdir-p kernel-dir) | |
2275 | (mkdir-p go-dir) | |
2276 | ||
2277 | ;; Make a writable copy of SOURCE. | |
2278 | (copy-recursively source ".") | |
2279 | ||
2280 | ;; Record the absolute file name of the 'openssl' command. | |
2281 | (substitute* "hmac.scm" | |
2282 | (("openssl") | |
2283 | (string-append (assoc-ref %build-inputs "openssl") | |
2284 | "/bin/openssl"))) | |
2285 | ||
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) | |
2290 | ||
2291 | (for-each (lambda (file) | |
2292 | (let* ((dest-file (string-append module-dir "/" | |
2293 | file)) | |
2294 | (go-file (match (string-split file #\.) | |
2295 | ((base _) | |
2296 | (string-append go-dir "/" | |
2297 | base ".go"))))) | |
2298 | ;; Install source module. | |
2299 | (copy-file file dest-file) | |
2300 | ||
2301 | ;; Install compiled module. | |
2302 | (unless (zero? (system* guild "compile" | |
2303 | "-L" source | |
2304 | "-o" go-file | |
2305 | file)) | |
2306 | (error (format #f "Failed to compile ~s to ~s!" | |
2307 | file go-file))))) | |
2308 | scm-files) | |
2309 | ||
2310 | ;; Install kernel | |
2311 | (copy-file kernel-file (string-append kernel-dir "/" | |
2312 | kernel-file)) | |
2313 | ;; Fix hard-coded file name in the kernel | |
2314 | (substitute* (string-append kernel-dir "/" | |
2315 | kernel-file) | |
2316 | (("/home/jerry/.local/share/jupyter/kernels/guile/guile-jupyter-kernel.scm") | |
2317 | (string-append module-dir "/guile-jupyter-kernel.scm")) | |
2318 | (("\"guile\"") | |
2319 | (string-append "\"" (assoc-ref %build-inputs "guile") | |
2320 | "/bin/guile\"")) | |
2321 | (("-s") | |
2322 | (string-append "--no-auto-compile\", \"-s"))) | |
2323 | ||
2324 | #t)))) | |
2325 | (inputs | |
2326 | `(("openssl" ,openssl) | |
2327 | ("guile" ,guile-2.2))) | |
2328 | (propagated-inputs | |
2329 | `(("guile-json" ,guile-json) | |
2330 | ("guile-simple-zmq" ,guile-simple-zmq))) | |
2331 | (synopsis "Guile kernel for the Jupyter Notebook") | |
2332 | (description | |
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+)))) | |
2337 | ||
89f8c2ac RJ |
2338 | (define-public guile-sparql |
2339 | (package | |
2340 | (name "guile-sparql") | |
2341 | (version "0.0.7") | |
2342 | (source (origin | |
2343 | (method url-fetch) | |
2344 | (uri (string-append | |
2345 | "https://github.com/roelj/guile-sparql/releases/download/" | |
2346 | version "/guile-sparql-" version ".tar.gz")) | |
2347 | (sha256 | |
2348 | (base32 "1drnvhsgl0gc5crmb16yyw1j98nkhwwcgssv9vgm36ng43nnzffd")))) | |
2349 | (build-system gnu-build-system) | |
2350 | (arguments `(#:tests? #f)) ; There are no tests. | |
2351 | (native-inputs | |
2352 | `(("pkg-config" ,pkg-config))) | |
2353 | (inputs | |
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+))) | |
2361 | ||
1722d680 | 2362 | ;;; guile.scm ends here |