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 | |
dfee30c7 AS |
727 | (define-public guile-hall |
728 | (package | |
729 | (name "guile-hall") | |
730 | (version "0.1.1") | |
731 | (source | |
732 | (origin | |
733 | (method git-fetch) | |
734 | (uri (git-reference | |
735 | (url "https://gitlab.com/a-sassmannshausen/guile-hall") | |
736 | (commit "7d1094a12fe917209ce5b76c681cc8c862d4c65b"))) | |
737 | (file-name "guile-hall-0.1.1-checkout") | |
738 | (sha256 | |
739 | (base32 | |
740 | "03kb09cjca98hlbx9mj12mqinzsnnvp6ci6i975n88pjhaxigyp1")))) | |
741 | (build-system gnu-build-system) | |
742 | (arguments | |
743 | `(#:modules | |
744 | ((ice-9 match) | |
745 | (ice-9 ftw) | |
746 | ,@%gnu-build-system-modules) | |
747 | #:phases | |
748 | (modify-phases | |
749 | %standard-phases | |
750 | (add-after | |
751 | 'install | |
752 | 'hall-wrap-binaries | |
753 | (lambda* (#:key outputs #:allow-other-keys) | |
754 | (let* ((out (assoc-ref outputs "out")) | |
755 | (bin (string-append out "/bin/")) | |
756 | (site (string-append out "/share/guile/site"))) | |
757 | (match (scandir site) | |
758 | (("." ".." version) | |
759 | (let ((modules (string-append site "/" version)) | |
760 | (compiled-modules | |
761 | (string-append | |
762 | out | |
763 | "/lib/guile/" | |
764 | version | |
765 | "/site-ccache"))) | |
766 | (for-each | |
767 | (lambda (file) | |
768 | (wrap-program | |
769 | (string-append bin file) | |
770 | `("GUILE_LOAD_PATH" ":" prefix (,modules)) | |
771 | `("GUILE_LOAD_COMPILED_PATH" | |
772 | ":" | |
773 | prefix | |
774 | (,compiled-modules)))) | |
775 | ,(list 'list "hall")) | |
776 | #t))))))))) | |
777 | (native-inputs | |
778 | `(("autoconf" ,autoconf) | |
779 | ("automake" ,automake) | |
780 | ("pkg-config" ,pkg-config) | |
781 | ("texinfo" ,texinfo))) | |
782 | (inputs `(("guile" ,guile-2.2))) | |
783 | (propagated-inputs | |
784 | `(("guile-config" ,guile-config))) | |
785 | (synopsis "Guile project tooling") | |
786 | (description | |
787 | "Hall is a command-line application and a set of Guile libraries that | |
788 | allow you to quickly create and publish Guile projects. It allows you to | |
789 | transparently support the GNU build system, manage a project hierarchy & | |
790 | provides tight coupling to Guix.") | |
791 | (home-page | |
792 | "https://gitlab.com/a-sassmannshausen/guile-hall") | |
793 | (license license:gpl3+))) | |
794 | ||
814b18e5 AS |
795 | (define-public guile-ics |
796 | (package | |
797 | (name "guile-ics") | |
291c2d57 | 798 | (version "0.2.0") |
814b18e5 AS |
799 | (source (origin |
800 | (method git-fetch) | |
801 | (uri (git-reference | |
802 | (url "https://github.com/artyom-poptsov/guile-ics") | |
291c2d57 | 803 | (commit (string-append "v" version)))) |
814b18e5 AS |
804 | (file-name (string-append name "-" version "-checkout")) |
805 | (sha256 | |
806 | (base32 | |
291c2d57 | 807 | "0qjjvadr7gibdq9jvwkmlkb4afsw9n2shfj9phpiadinxk3p4m2g")))) |
814b18e5 AS |
808 | (build-system gnu-build-system) |
809 | (arguments | |
810 | '(#:phases (modify-phases %standard-phases | |
d10092b8 KK |
811 | (add-after 'unpack 'autoreconf |
812 | (lambda _ | |
813 | ;; Repository comes with a broken symlink | |
814 | (delete-file "README") | |
815 | (symlink "README.org" "README") | |
816 | (zero? (system* "autoreconf" "-fi"))))))) | |
814b18e5 | 817 | (native-inputs |
464f5447 | 818 | `(("autoconf" ,autoconf-wrapper) |
814b18e5 AS |
819 | ("automake" ,automake) |
820 | ("texinfo" ,texinfo) | |
821 | ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'. | |
822 | ("gettext" ,gettext-minimal) | |
823 | ("pkg-config" ,pkg-config))) | |
d573d892 LC |
824 | (inputs `(("guile" ,guile-2.2) ("which" ,which))) |
825 | (propagated-inputs `(("guile-lib" ,guile-lib))) | |
814b18e5 AS |
826 | (home-page "https://github.com/artyom-poptsov/guile-ics") |
827 | (synopsis "Guile parser library for the iCalendar format") | |
828 | (description | |
829 | "Guile-ICS is an iCalendar (RFC5545) format parser library written in | |
830 | pure Scheme. The library can be used to read and write iCalendar data. | |
831 | ||
832 | The library is shipped with documentation in Info format and usage examples.") | |
71e0f217 | 833 | (license license:gpl3+))) |
814b18e5 | 834 | |
3e9066fc LC |
835 | (define-public guile-lib |
836 | (package | |
837 | (name "guile-lib") | |
bf5e9bfc | 838 | (version "0.2.6") |
3e9066fc | 839 | (source (origin |
af126875 MC |
840 | (method url-fetch) |
841 | (uri (string-append "mirror://savannah/guile-lib/guile-lib-" | |
842 | version ".tar.gz")) | |
843 | (sha256 | |
844 | (base32 | |
bf5e9bfc LC |
845 | "0n1lf5bsr5s9gqi07sdfkl1hpin6dzvkcj1xa63jd1w8aglwv8r1")) |
846 | (modules '((guix build utils))) | |
847 | (snippet | |
848 | '(begin | |
849 | ;; 'pre-inst-env' sets an incorrect load path, missing the | |
850 | ;; "/src" bit. Add it. | |
851 | (substitute* "pre-inst-env.in" | |
852 | (("abs_top_(builddir|srcdir)=([[:graph:]]+)" _ dir value) | |
853 | (string-append "abs_top_" dir "=" value "/src"))) | |
854 | #t)))) | |
3e9066fc LC |
855 | (build-system gnu-build-system) |
856 | (arguments | |
af126875 MC |
857 | '(#:make-flags |
858 | '("GUILE_AUTO_COMPILE=0") ;to prevent guild errors | |
859 | #:phases | |
860 | (modify-phases %standard-phases | |
861 | (add-before 'configure 'patch-module-dir | |
862 | (lambda _ | |
863 | (substitute* "src/Makefile.in" | |
864 | (("^moddir = ([[:graph:]]+)") | |
865 | "moddir = $(datadir)/guile/site/@GUILE_EFFECTIVE_VERSION@\n") | |
866 | (("^godir = ([[:graph:]]+)") | |
867 | "godir = \ | |
bf62b8ff | 868 | $(libdir)/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n")) |
af126875 | 869 | #t))))) |
bf62b8ff | 870 | (native-inputs `(("pkg-config" ,pkg-config))) |
1b0f266e | 871 | (inputs `(("guile" ,guile-2.2))) |
340978d7 | 872 | (home-page "https://www.nongnu.org/guile-lib/") |
3e9066fc LC |
873 | (synopsis "Collection of useful Guile Scheme modules") |
874 | (description | |
35b9e423 | 875 | "Guile-Lib is intended as an accumulation place for pure-scheme Guile |
3e9066fc LC |
876 | modules, allowing for people to cooperate integrating their generic Guile |
877 | modules into a coherent library. Think \"a down-scaled, limited-scope CPAN | |
878 | for Guile\".") | |
879 | ||
880 | ;; The whole is under GPLv3+, but some modules are under laxer | |
881 | ;; distribution terms such as LGPL and public domain. See `COPYING' for | |
882 | ;; details. | |
71e0f217 | 883 | (license license:gpl3+))) |
3e9066fc | 884 | |
1b0f266e LC |
885 | (define-public guile2.0-lib |
886 | (package-for-guile-2.0 guile-lib)) | |
887 | ||
12773de3 | 888 | (define-public guile2.2-lib |
1b0f266e | 889 | (deprecated-package "guile2.2-lib" guile-lib)) |
12773de3 | 890 | |
6050a1fb CR |
891 | (define-public guile-json |
892 | (package | |
893 | (name "guile-json") | |
f52ef55e LC |
894 | (version "1.0.1") |
895 | (home-page "https://github.com/aconchillo/guile-json") | |
6050a1fb | 896 | (source (origin |
ffc72ec6 | 897 | (method url-fetch) |
f52ef55e | 898 | (uri (string-append home-page "/archive/" |
ffc72ec6 | 899 | version ".tar.gz")) |
f52ef55e | 900 | (file-name (string-append name "-" version ".tar.gz")) |
ffc72ec6 LC |
901 | (sha256 |
902 | (base32 | |
f52ef55e | 903 | "16155dv30rhagz6dwv7xc87l386i8v0f1kgydqa2ajr166fi9qhr")) |
ffc72ec6 LC |
904 | (modules '((guix build utils))) |
905 | (snippet | |
906 | ;; Make sure everything goes under .../site/X.Y, like Guile's | |
907 | ;; search paths expects. | |
908 | '(begin | |
f52ef55e LC |
909 | (substitute* "configure.ac" |
910 | (("GUILE_PROGS") | |
911 | (string-append "GUILE_PROGS\n" | |
912 | "AC_SUBST([GUILE_EFFECTIVE_VERSION])\n"))) | |
913 | (substitute* '("Makefile.am" "json/Makefile.am") | |
914 | (("moddir[[:blank:]]*=.*/share/guile/site" all) | |
9f0afbae MW |
915 | (string-append all "/@GUILE_EFFECTIVE_VERSION@"))) |
916 | #t)))) | |
6050a1fb | 917 | (build-system gnu-build-system) |
f52ef55e LC |
918 | (native-inputs `(("autoconf" ,autoconf) |
919 | ("automake" ,automake) | |
920 | ("guile" ,guile-2.2))) | |
921 | (inputs `(("guile" ,guile-2.2))) | |
6050a1fb CR |
922 | (synopsis "JSON module for Guile") |
923 | (description | |
0f31d4f0 LC |
924 | "Guile-JSON supports parsing and building JSON documents according to the |
925 | specification. These are the main features: | |
926 | ||
927 | @itemize | |
928 | @item Strictly complies to @uref{http://json.org, specification}. | |
929 | @item Build JSON documents programmatically via macros. | |
930 | @item Unicode support for strings. | |
931 | @item Allows JSON pretty printing. | |
932 | @end itemize\n") | |
71e0f217 | 933 | (license license:lgpl3+))) |
6050a1fb | 934 | |
947a5d47 | 935 | (define-public guile2.2-json |
2252f087 LC |
936 | (deprecated-package "guile2.2-json" guile-json)) |
937 | ||
938 | (define-public guile2.0-json | |
939 | (package-for-guile-2.0 guile-json)) | |
947a5d47 | 940 | |
6bc24063 CAW |
941 | (define-public guile-minikanren |
942 | (package | |
943 | (name "guile-minikanren") | |
944 | (version "20150424.e844d85") | |
945 | (source (origin | |
946 | (method git-fetch) | |
947 | (uri (git-reference | |
948 | (url "https://github.com/ijp/minikanren.git") | |
949 | (commit "e844d85512f8c055d3f96143ee506007389a25e3"))) | |
821f4dc2 | 950 | (file-name (string-append name "-" version "-checkout")) |
6bc24063 CAW |
951 | (sha256 |
952 | (base32 | |
953 | "0r50jlpzi940jlmxyy3ddqqwmj5r12gb4bcv0ssini9v8km13xz6")))) | |
954 | (build-system trivial-build-system) | |
955 | (arguments | |
4b74a29d | 956 | `(#:modules ((guix build utils)) |
6bc24063 CAW |
957 | #:builder |
958 | (begin | |
959 | (use-modules (guix build utils) | |
4b74a29d LC |
960 | (ice-9 match) |
961 | (ice-9 popen) | |
962 | (ice-9 rdelim)) | |
963 | ||
6bc24063 | 964 | (let* ((out (assoc-ref %outputs "out")) |
4b74a29d LC |
965 | (guile (assoc-ref %build-inputs "guile")) |
966 | (effective (read-line | |
967 | (open-pipe* OPEN_READ | |
968 | (string-append guile "/bin/guile") | |
969 | "-c" "(display (effective-version))"))) | |
970 | (module-dir (string-append out "/share/guile/site/" | |
971 | effective)) | |
6bc24063 | 972 | (source (assoc-ref %build-inputs "source")) |
f3d8cd79 | 973 | (doc (string-append out "/share/doc/guile-minikanren")) |
6bc24063 CAW |
974 | (scm-files '("minikanren.scm" |
975 | "minikanren/mkextraforms.scm" | |
976 | "minikanren/mkprelude.scm" | |
977 | "minikanren/mk.scm")) | |
978 | (guild (string-append (assoc-ref %build-inputs "guile") | |
979 | "/bin/guild"))) | |
980 | ;; Make installation directories. | |
981 | (mkdir-p (string-append module-dir "/minikanren")) | |
982 | (mkdir-p doc) | |
983 | ||
984 | ;; Compile .scm files and install. | |
985 | (chdir source) | |
986 | (setenv "GUILE_AUTO_COMPILE" "0") | |
987 | (for-each (lambda (file) | |
988 | (let* ((dest-file (string-append module-dir "/" | |
76e6e663 | 989 | file)) |
6bc24063 CAW |
990 | (go-file (match (string-split file #\.) |
991 | ((base _) | |
992 | (string-append module-dir "/" | |
993 | base ".go"))))) | |
994 | ;; Install source module. | |
995 | (copy-file file dest-file) | |
996 | ;; Install compiled module. | |
e3cfef22 MW |
997 | (invoke guild "compile" |
998 | "-L" source | |
999 | "-o" go-file | |
1000 | file))) | |
6bc24063 CAW |
1001 | scm-files) |
1002 | ||
1003 | ;; Also copy over the README. | |
96c46210 | 1004 | (install-file "README.org" doc) |
e3cfef22 | 1005 | |
6bc24063 CAW |
1006 | #t)))) |
1007 | (inputs | |
d58ee08d | 1008 | `(("guile" ,guile-2.2))) |
6bc24063 | 1009 | (home-page "https://github.com/ijp/minikanren") |
e881752c | 1010 | (synopsis "MiniKanren declarative logic system, packaged for Guile") |
6bc24063 CAW |
1011 | (description |
1012 | "MiniKanren is a relational programming extension to the Scheme | |
1013 | programming Language, written as a smaller version of Kanren suitable for | |
1014 | pedagogical purposes. It is featured in the book, The Reasoned Schemer, | |
1015 | written by Dan Friedman, William Byrd, and Oleg Kiselyov. | |
1016 | ||
e881752c | 1017 | This is Ian Price's r6rs packaged version of miniKanren, which deviates |
6bc24063 CAW |
1018 | slightly from miniKanren mainline. |
1019 | ||
1020 | See http://minikanren.org/ for more on miniKanren generally.") | |
71e0f217 | 1021 | (license license:expat))) |
6bc24063 | 1022 | |
d58ee08d LC |
1023 | (define-public guile2.0-minikanren |
1024 | (package-for-guile-2.0 guile-minikanren)) | |
1025 | ||
947a5d47 | 1026 | (define-public guile2.2-minikanren |
d58ee08d | 1027 | (deprecated-package "guile2.2-minikanren" guile-minikanren)) |
947a5d47 | 1028 | |
28a1041f AP |
1029 | (define-public guile-miniadapton |
1030 | (let ((commit "1b5749422304567c96ac5367f2221dda9eff5880") | |
1031 | (revision "1")) | |
1032 | (package | |
1033 | (name "guile-miniadapton") | |
1034 | (version (string-append "0-" revision "." (string-take commit 9))) | |
1035 | (source (origin | |
1036 | (method git-fetch) | |
1037 | (uri (git-reference | |
1038 | (url "https://github.com/fisherdj/miniAdapton.git") | |
1039 | (commit commit))) | |
1040 | (file-name (string-append name "-" version "-checkout")) | |
1041 | (sha256 | |
1042 | (base32 | |
1043 | "09q51zkw2fypad5xixskfzw2cjhjgs5cswdp3i7cpp651rb3zndh")))) | |
1044 | (build-system gnu-build-system) | |
1045 | (arguments | |
1046 | `(#:modules ((guix build utils) | |
1047 | (ice-9 popen) | |
1048 | (ice-9 rdelim) | |
1049 | (srfi srfi-1) | |
1050 | (guix build gnu-build-system)) | |
1051 | #:tests? #f ; there is no test target | |
1052 | #:phases | |
1053 | (modify-phases %standard-phases | |
1054 | (delete 'configure) | |
1055 | (delete 'build) | |
1056 | (replace 'install | |
1057 | (lambda* (#:key outputs #:allow-other-keys) | |
1058 | (let* ((cwd (getcwd)) | |
1059 | (scm-files (find-files "." "\\.scm$")) | |
1060 | (effective (read-line | |
1061 | (open-pipe* OPEN_READ | |
1062 | "guile" "-c" | |
1063 | "(display (effective-version))"))) | |
1064 | (module-dir (string-append (assoc-ref outputs "out") | |
1065 | "/share/guile/site/" | |
1066 | effective))) | |
1067 | ||
1068 | ;; Make installation directories. | |
1069 | (mkdir-p module-dir) | |
1070 | ||
1071 | (setenv "GUILE_AUTO_COMPILE" "0") | |
1072 | ||
1073 | ;; Compile .scm files and install. | |
1074 | (every (lambda (file) | |
1075 | (let ((go-file (string-append module-dir "/" | |
1076 | (basename file ".scm") ".go"))) | |
1077 | ;; Install source module. | |
1078 | (install-file file module-dir) | |
1079 | ;; Compile and install module. | |
1080 | (zero? (system* "guild" "compile" "-L" cwd | |
1081 | "-o" go-file file)))) | |
1082 | scm-files))))))) | |
1083 | (inputs | |
1084 | `(("guile" ,guile-2.2))) | |
1085 | (home-page "https://github.com/fisherdj/miniAdapton") | |
1086 | (synopsis "Minimal implementation of incremental computation in Guile | |
1087 | Scheme") | |
1088 | (description "This package provides a complete Scheme implementation of | |
1089 | miniAdapton, which implements the core functionality of the Adapton system for | |
1090 | incremental computation (also known as self-adjusting computation). Like | |
1091 | Adapton, miniAdapton allows programmers to safely combine mutation and | |
1092 | memoization. miniAdapton is built on top of an even simpler system, | |
1093 | microAdapton. Both miniAdapton and microAdapton are designed to be easy to | |
1094 | understand, extend, and port to host languages other than Scheme.") | |
1095 | (license license:expat)))) | |
1096 | ||
32e14fc1 CAW |
1097 | (define-public guile-irregex |
1098 | (package | |
1099 | (name "guile-irregex") | |
fb73f07a | 1100 | (version "0.9.6") |
32e14fc1 CAW |
1101 | (source (origin |
1102 | (method url-fetch) | |
1103 | (uri (string-append | |
1104 | "http://synthcode.com/scheme/irregex/irregex-" | |
d03f9446 | 1105 | version ".tar.gz")) |
32e14fc1 CAW |
1106 | (sha256 |
1107 | (base32 | |
fb73f07a | 1108 | "1ia3m7dp3lcxa048q0gqbiwwsyvn99baw6xkhb4bhhzn4k7bwyqq")))) |
32e14fc1 CAW |
1109 | (build-system gnu-build-system) |
1110 | (arguments | |
1111 | `(#:modules ((guix build utils) | |
1112 | (ice-9 match) | |
fe447664 LC |
1113 | (ice-9 rdelim) |
1114 | (ice-9 popen) | |
32e14fc1 CAW |
1115 | (guix build gnu-build-system)) |
1116 | #:phases | |
1117 | (modify-phases %standard-phases | |
32e14fc1 CAW |
1118 | (delete 'configure) |
1119 | (delete 'build) | |
1120 | (delete 'check) | |
1121 | (replace 'install | |
1122 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
fe447664 LC |
1123 | (let* ((out (assoc-ref outputs "out")) |
1124 | (effective (read-line | |
1125 | (open-pipe* OPEN_READ | |
1126 | "guile" "-c" | |
1127 | "(display (effective-version))"))) | |
1128 | (module-dir (string-append out "/share/guile/site/" | |
1129 | effective)) | |
1130 | (source (assoc-ref inputs "source")) | |
1131 | (doc (string-append out "/share/doc/guile-irregex/")) | |
1132 | (guild (string-append (assoc-ref %build-inputs "guile") | |
1133 | "/bin/guild"))) | |
1134 | ;; Make installation directories. | |
1135 | (mkdir-p (string-append module-dir "/rx/source")) | |
1136 | (mkdir-p doc) | |
1137 | ||
1138 | ;; Compile .scm files and install. | |
1139 | (setenv "GUILE_AUTO_COMPILE" "0") | |
1140 | ||
1141 | (for-each (lambda (copy-info) | |
1142 | (match copy-info | |
1143 | ((src-file dest-file-basis) | |
1144 | (let* ((dest-file (string-append | |
32e14fc1 | 1145 | module-dir dest-file-basis |
fe447664 LC |
1146 | ".scm")) |
1147 | (go-file (string-append | |
1148 | module-dir dest-file-basis | |
1149 | ".go"))) | |
1150 | ;; Install source module. | |
1151 | (copy-file src-file | |
1152 | dest-file) | |
1153 | ;; Install compiled module. | |
67eb6f50 MW |
1154 | (invoke guild "compile" |
1155 | "-L" (getcwd) | |
1156 | "-o" go-file | |
1157 | src-file))))) | |
fe447664 LC |
1158 | '(("irregex-guile.scm" "/rx/irregex") |
1159 | ("irregex.scm" "/rx/source/irregex") | |
1160 | ;; Not really reachable via guile's packaging system, | |
1161 | ;; but nice to have around | |
1162 | ("irregex-utils.scm" "/rx/source/irregex-utils"))) | |
1163 | ||
1164 | ;; Also copy over the README. | |
1165 | (install-file "irregex.html" doc) | |
1166 | #t)))))) | |
32e14fc1 | 1167 | (inputs |
2863860b | 1168 | `(("guile" ,guile-2.2))) |
32e14fc1 CAW |
1169 | (home-page "http://synthcode.com/scheme/irregex") |
1170 | (synopsis "S-expression based regular expressions") | |
1171 | (description | |
1172 | "Irregex is an s-expression based alternative to your classic | |
1173 | string-based regular expressions. It implements SRFI 115 and is deeply | |
1174 | inspired by the SCSH regular expression system.") | |
71e0f217 | 1175 | (license license:bsd-3))) |
93e7199b | 1176 | |
2863860b LC |
1177 | (define-public guile2.0-irregex |
1178 | (package-for-guile-2.0 guile-irregex)) | |
1179 | ||
947a5d47 | 1180 | (define-public guile2.2-irregex |
2863860b | 1181 | (deprecated-package "guile2.2-irregex" guile-irregex)) |
947a5d47 | 1182 | |
93e7199b CAW |
1183 | ;; There are two guile-gdbm packages, one using the FFI and one with |
1184 | ;; direct C bindings, hence the verbose name. | |
1185 | ||
1186 | (define-public guile-gdbm-ffi | |
1187 | (package | |
1188 | (name "guile-gdbm-ffi") | |
1189 | (version "20120209.fa1d5b6") | |
1190 | (source (origin | |
1191 | (method git-fetch) | |
1192 | (uri (git-reference | |
1193 | (url "https://github.com/ijp/guile-gdbm.git") | |
1194 | (commit "fa1d5b6231d0e4d096687b378c025f2148c5f246"))) | |
821f4dc2 | 1195 | (file-name (string-append name "-" version "-checkout")) |
93e7199b CAW |
1196 | (sha256 |
1197 | (base32 | |
1198 | "1j8wrsw7v9w6qkl47xz0rdikg50v16nn6kbs3lgzcymjzpa7babj")))) | |
1199 | (build-system trivial-build-system) | |
56f31a9f MW |
1200 | (inputs |
1201 | `(("guile" ,guile-2.2) | |
1202 | ;; patch-and-repack doesn't work for git checkouts, | |
1203 | ;; so we must apply the patch manually. | |
1204 | ("patch" ,patch) | |
1205 | ("patch-file" ,(search-patch | |
1206 | "guile-gdbm-ffi-support-gdbm-1.14.patch")))) | |
1207 | (propagated-inputs | |
1208 | `(("gdbm" ,gdbm))) | |
93e7199b CAW |
1209 | (arguments |
1210 | `(#:modules | |
1211 | ((guix build utils)) | |
1212 | #:builder | |
1213 | (begin | |
1214 | (use-modules (guix build utils) | |
a5bd6a5e CAW |
1215 | (ice-9 rdelim) |
1216 | (ice-9 popen)) | |
1217 | ||
1218 | ;; Avoid warnings we can safely ignore | |
1219 | (setenv "GUILE_AUTO_COMPILE" "0") | |
93e7199b CAW |
1220 | |
1221 | (let* ((out (assoc-ref %outputs "out")) | |
a5bd6a5e CAW |
1222 | (effective-version |
1223 | (read-line | |
1224 | (open-pipe* OPEN_READ | |
1225 | (string-append | |
1226 | (assoc-ref %build-inputs "guile") | |
1227 | "/bin/guile") | |
1228 | "-c" "(display (effective-version))"))) | |
1229 | (module-dir (string-append out "/share/guile/site/" | |
1230 | effective-version)) | |
93e7199b CAW |
1231 | (source (assoc-ref %build-inputs "source")) |
1232 | (doc (string-append out "/share/doc")) | |
1233 | (guild (string-append (assoc-ref %build-inputs "guile") | |
1234 | "/bin/guild")) | |
1235 | (gdbm.scm-dest | |
1236 | (string-append module-dir "/gdbm.scm")) | |
1237 | (gdbm.go-dest | |
a5bd6a5e CAW |
1238 | (string-append module-dir "/gdbm.go")) |
1239 | (compile-file | |
1240 | (lambda (in-file out-file) | |
07e36357 | 1241 | (invoke guild "compile" "-o" out-file in-file)))) |
93e7199b CAW |
1242 | ;; Switch directory for compiling and installing |
1243 | (chdir source) | |
1244 | ||
4168ddf6 TGR |
1245 | ;; Install the documentation. |
1246 | (install-file "README.md" doc) | |
1247 | (copy-recursively "examples" (string-append doc "/examples")) | |
1248 | ||
1249 | ;; Make installation directories. | |
1250 | (mkdir-p module-dir) | |
1251 | ||
93e7199b CAW |
1252 | ;; copy the source |
1253 | (copy-file "gdbm.scm" gdbm.scm-dest) | |
1254 | ||
1255 | ;; Patch the FFI | |
1256 | (substitute* gdbm.scm-dest | |
1257 | (("\\(dynamic-link \"libgdbm\"\\)") | |
1258 | (format #f "(dynamic-link \"~a/lib/libgdbm.so\")" | |
1259 | (assoc-ref %build-inputs "gdbm")))) | |
1260 | ||
56f31a9f MW |
1261 | ;; Apply the patch to add support for gdbm-1.14. |
1262 | (let ((patch-command (string-append (assoc-ref %build-inputs "patch") | |
1263 | "/bin/patch")) | |
1264 | (patch-file (assoc-ref %build-inputs "patch-file"))) | |
1265 | (with-directory-excursion (dirname gdbm.scm-dest) | |
1266 | (format #t "applying '~a'...~%" patch-file) | |
1267 | (invoke patch-command "--force" "--input" patch-file))) | |
1268 | ||
93e7199b | 1269 | ;; compile to the destination |
e3cfef22 MW |
1270 | (compile-file gdbm.scm-dest gdbm.go-dest) |
1271 | ||
1272 | #t)))) | |
93e7199b CAW |
1273 | (home-page "https://github.com/ijp/guile-gdbm") |
1274 | (synopsis "Guile bindings to the GDBM library via Guile's FFI") | |
1275 | (description | |
1276 | "Guile bindings to the GDBM key-value storage system, using | |
1277 | Guile's foreign function interface.") | |
71e0f217 | 1278 | (license license:gpl3+))) |
93e7199b | 1279 | |
5bd3a841 LC |
1280 | (define-public guile2.0-gdbm-ffi |
1281 | (package-for-guile-2.0 guile-gdbm-ffi)) | |
1282 | ||
2737bcff | 1283 | (define-public guile2.2-gdbm-ffi |
5bd3a841 | 1284 | (deprecated-package "guile2.2-gdbm-ffi" guile-gdbm-ffi)) |
93e7199b | 1285 | |
e8ac1f8f | 1286 | (define-public guile-sqlite3 |
319e26e4 LC |
1287 | (package |
1288 | (name "guile-sqlite3") | |
1289 | (version "0.1.0") | |
1290 | (home-page "https://notabug.org/civodul/guile-sqlite3.git") | |
1291 | (source (origin | |
1292 | (method git-fetch) | |
1293 | (uri (git-reference | |
1294 | (url home-page) | |
1295 | (commit (string-append "v" version)))) | |
1296 | (sha256 | |
1297 | (base32 | |
1298 | "1nv8j7wk6b5n4p22szyi8lv8fs31rrzxhzz16gyj8r38c1fyp9qp")) | |
1299 | (file-name (string-append name "-" version "-checkout")))) | |
1300 | (build-system gnu-build-system) | |
1301 | (native-inputs | |
1302 | `(("autoconf" ,autoconf) | |
1303 | ("automake" ,automake) | |
1304 | ("pkg-config" ,pkg-config))) | |
1305 | (inputs | |
1306 | `(("guile" ,guile-2.2) | |
1307 | ("sqlite" ,sqlite))) | |
1308 | (synopsis "Access SQLite databases from Guile") | |
1309 | (description | |
1310 | "This package provides Guile bindings to the SQLite database system.") | |
1311 | (license license:gpl3+))) | |
e8ac1f8f | 1312 | |
27f5e13e DT |
1313 | (define-public haunt |
1314 | (package | |
1315 | (name "haunt") | |
907254e5 | 1316 | (version "0.2.2") |
27f5e13e DT |
1317 | (source (origin |
1318 | (method url-fetch) | |
4960beaa | 1319 | (uri (string-append "https://files.dthompson.us/haunt/haunt-" |
27f5e13e DT |
1320 | version ".tar.gz")) |
1321 | (sha256 | |
1322 | (base32 | |
907254e5 | 1323 | "0nm00krmqq4zmqi2irh35dbf2cn6al58s620hijmhfvhgvdqznlp")))) |
27f5e13e | 1324 | (build-system gnu-build-system) |
4ecbf6d2 LC |
1325 | (arguments |
1326 | `(#:modules ((ice-9 match) (ice-9 ftw) | |
1327 | ,@%gnu-build-system-modules) | |
1e406301 | 1328 | #:tests? #f ; test suite is non-deterministic :( |
4ecbf6d2 LC |
1329 | #:phases (modify-phases %standard-phases |
1330 | (add-after 'install 'wrap-haunt | |
1331 | (lambda* (#:key outputs #:allow-other-keys) | |
1332 | ;; Wrap the 'haunt' command to refer to the right | |
1333 | ;; modules. | |
1334 | (let* ((out (assoc-ref outputs "out")) | |
1335 | (bin (string-append out "/bin")) | |
1336 | (site (string-append | |
1337 | out "/share/guile/site"))) | |
1338 | (match (scandir site) | |
1339 | (("." ".." version) | |
907254e5 DT |
1340 | (let ((modules (string-append site "/" version)) |
1341 | (compiled-modules (string-append | |
1342 | out "/lib/guile/" version | |
1343 | "/site-ccache"))) | |
4ecbf6d2 LC |
1344 | (wrap-program (string-append bin "/haunt") |
1345 | `("GUILE_LOAD_PATH" ":" prefix | |
1346 | (,modules)) | |
1347 | `("GUILE_LOAD_COMPILED_PATH" ":" prefix | |
907254e5 | 1348 | (,compiled-modules))) |
4ecbf6d2 | 1349 | #t))))))))) |
4960beaa DT |
1350 | (native-inputs |
1351 | `(("pkg-config" ,pkg-config) | |
1352 | ("texinfo" ,texinfo))) | |
27f5e13e | 1353 | (inputs |
bd19f65a | 1354 | `(("guile" ,guile-2.2))) |
4960beaa | 1355 | (propagated-inputs |
9b1a497e AP |
1356 | `(("guile-reader" ,guile-reader) |
1357 | ("guile-commonmark" ,guile-commonmark))) | |
27f5e13e DT |
1358 | (synopsis "Functional static site generator") |
1359 | (description "Haunt is a static site generator written in Guile | |
1360 | Scheme. Haunt features a functional build system and an extensible | |
1361 | interface for reading articles in any format.") | |
1362 | (home-page "http://haunt.dthompson.us") | |
71e0f217 | 1363 | (license license:gpl3+))) |
27f5e13e | 1364 | |
bd19f65a LC |
1365 | (define-public guile2.0-haunt |
1366 | (package-for-guile-2.0 | |
1367 | (package (inherit haunt) (name "guile2.0-haunt")))) | |
64f34aef | 1368 | (define-public guile2.2-haunt |
bd19f65a | 1369 | (deprecated-package "guile2.2-haunt" haunt)) |
64f34aef | 1370 | |
44a2bdf8 AS |
1371 | (define-public guile-config |
1372 | (package | |
1373 | (name "guile-config") | |
7c6468c9 AS |
1374 | (version "0.3") |
1375 | (source | |
1376 | (origin | |
1377 | (method git-fetch) | |
1378 | (uri (git-reference | |
1379 | (url "https://gitlab.com/a-sassmannshausen/guile-config") | |
1380 | (commit "ce12de3f438c6b2b59c43ee21bcd58251835fdf3"))) | |
1381 | (file-name "guile-config-0.3-checkout") | |
1382 | (sha256 (base32 "02zbpin0r9m2vxmr7mv68v3xdn247dcck56kbzjn0gj4c2rhih85")))) | |
44a2bdf8 | 1383 | (build-system gnu-build-system) |
43d5df98 AS |
1384 | (native-inputs |
1385 | `(("autoconf" ,autoconf) | |
1386 | ("automake" ,automake) | |
1387 | ("pkg-config" ,pkg-config) | |
1388 | ("texinfo" ,texinfo))) | |
7c6468c9 AS |
1389 | (inputs `(("guile" ,guile-2.2))) |
1390 | (synopsis | |
1391 | "Guile application configuration parsing library.") | |
44a2bdf8 AS |
1392 | (description |
1393 | "Guile Config is a library providing a declarative approach to | |
1394 | application configuration specification. The library provides clean | |
1395 | configuration declaration forms, and processors that take care of: | |
1396 | configuration file creation; configuration file parsing; command-line | |
1397 | parameter parsing using getopt-long; basic GNU command-line parameter | |
1398 | generation (--help, --usage, --version); automatic output generation for the | |
1399 | above command-line parameters.") | |
7c6468c9 AS |
1400 | (home-page |
1401 | "https://gitlab.com/a-sassmannshausen/guile-config") | |
43d5df98 | 1402 | (license license:gpl3+))) |
44a2bdf8 | 1403 | |
36548111 DT |
1404 | (define-public guile-redis |
1405 | (package | |
1406 | (name "guile-redis") | |
1407 | (version "0.1.0") | |
1408 | (source (origin | |
1409 | (method url-fetch) | |
1410 | (uri (string-append "mirror://savannah/guile-redis/guile-redis-" | |
1411 | version ".tar.gz")) | |
1412 | (sha256 | |
1413 | (base32 | |
1414 | "0vx6if6b4r3kwx64vzbs6vpc0cpcr85x11w9vkzq27gw8n7isv56")) | |
1415 | (modules '((guix build utils))) | |
1416 | (snippet | |
ea833d30 | 1417 | ;; Make sure everything goes under .../site/X.Y, like Guile's |
36548111 | 1418 | ;; search paths expects. |
ea833d30 RW |
1419 | '(begin |
1420 | (substitute* "configure" | |
1421 | (("ac_subst_vars='") | |
1422 | "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n")) | |
1423 | (substitute* '("Makefile.in" | |
1424 | "redis/Makefile.in" | |
1425 | "redis/commands/Makefile.in") | |
1426 | (("moddir =.*/share/guile/site" all) | |
6cbee49d MW |
1427 | (string-append all "/@GUILE_EFFECTIVE_VERSION@"))) |
1428 | #t)))) | |
36548111 DT |
1429 | (build-system gnu-build-system) |
1430 | (native-inputs | |
d5eacecc | 1431 | `(("guile" ,guile-2.2))) |
340978d7 | 1432 | (home-page "https://savannah.nongnu.org/projects/guile-redis/") |
36548111 DT |
1433 | (synopsis "Redis client library for Guile") |
1434 | (description "Guile-redis provides a Scheme interface to the Redis | |
1435 | key-value cache and store.") | |
71e0f217 | 1436 | (license license:lgpl3+))) |
36548111 | 1437 | |
d5eacecc LC |
1438 | (define-public guile2.0-redis |
1439 | (package-for-guile-2.0 guile-redis)) | |
1440 | ||
85313be8 | 1441 | (define-public guile2.2-redis |
d5eacecc | 1442 | (deprecated-package "guile2.2-redis" guile-redis)) |
85313be8 | 1443 | |
9d373377 CAW |
1444 | (define-public guile-wisp |
1445 | (package | |
1446 | (name "guile-wisp") | |
e0840905 | 1447 | (version "0.9.8") |
9d373377 CAW |
1448 | (source (origin |
1449 | (method url-fetch) | |
1450 | (uri (string-append "https://bitbucket.org/ArneBab/" | |
1451 | "wisp/downloads/wisp-" | |
1452 | version ".tar.gz")) | |
1453 | (sha256 | |
1454 | (base32 | |
e0840905 | 1455 | "1f2bbicq1rxnwmiplrm4r75wj06w385mjkyvi7g4k740bgwcrzxr")))) |
9d373377 CAW |
1456 | (build-system gnu-build-system) |
1457 | (arguments | |
e8374e69 LC |
1458 | `(#:modules ((guix build gnu-build-system) |
1459 | (guix build utils) | |
1460 | (ice-9 rdelim) | |
1461 | (ice-9 popen)) | |
1462 | ||
9d373377 CAW |
1463 | #:phases |
1464 | (modify-phases %standard-phases | |
e0840905 | 1465 | (add-before 'configure 'substitute-before-config |
9d373377 CAW |
1466 | |
1467 | (lambda* (#:key inputs #:allow-other-keys) | |
1468 | (let ((bash (assoc-ref inputs "bash"))) | |
9d373377 CAW |
1469 | ;; Puts together some test files with /bin/bash hardcoded |
1470 | (substitute* "Makefile.in" | |
e0840905 LC |
1471 | (("/usr/bin/env bash") |
1472 | (string-append bash "/bin/bash")) | |
1473 | (("\\$\\(GUILE_EFFECTIVE_VERSION\\)/site") | |
1474 | "site/$(GUILE_EFFECTIVE_VERSION)")) ;use the right order | |
9d373377 CAW |
1475 | #t))) |
1476 | ||
1477 | ;; auto compilation breaks, but if we set HOME to /tmp, | |
1478 | ;; that works ok | |
1479 | (add-before | |
1480 | 'check 'auto-compile-hacky-workaround | |
1481 | (lambda _ | |
1482 | (setenv "HOME" "/tmp") | |
1483 | #t)) | |
e0840905 | 1484 | (add-after 'install 'install-go-files |
9d373377 CAW |
1485 | (lambda* (#:key outputs inputs #:allow-other-keys) |
1486 | (let* ((out (assoc-ref outputs "out")) | |
e8374e69 LC |
1487 | (effective (read-line |
1488 | (open-pipe* OPEN_READ | |
1489 | "guile" "-c" | |
1490 | "(display (effective-version))"))) | |
1491 | (module-dir (string-append out "/share/guile/site/" | |
1492 | effective)) | |
1493 | (object-dir (string-append out "/lib/guile/" effective | |
1494 | "/site-ccache")) | |
1495 | (prefix (string-length module-dir))) | |
9d373377 | 1496 | ;; compile to the destination |
e0840905 | 1497 | (for-each (lambda (file) |
e8374e69 LC |
1498 | (let* ((base (string-drop (string-drop-right file 4) |
1499 | prefix)) | |
1500 | (go (string-append object-dir base ".go"))) | |
1501 | (invoke "guild" "compile" "-L" module-dir | |
1502 | file "-o" go))) | |
e0840905 | 1503 | (find-files module-dir "\\.scm$")) |
9d373377 CAW |
1504 | #t)))))) |
1505 | (home-page "http://draketo.de/english/wisp") | |
1506 | (inputs | |
89c4bfe7 | 1507 | `(("guile" ,guile-2.2))) |
e0840905 LC |
1508 | (native-inputs |
1509 | `(("python" ,python) | |
1510 | ("pkg-config" ,pkg-config))) | |
a124bbd2 SB |
1511 | (synopsis "Whitespace to lisp syntax for Guile") |
1512 | (description "Wisp is a syntax for Guile which provides a Python-like | |
9d373377 CAW |
1513 | whitespace-significant language. It may be easier on the eyes for some |
1514 | users and in some situations.") | |
71e0f217 | 1515 | (license license:gpl3+))) |
9d373377 | 1516 | |
5649c8cd DT |
1517 | (define-public guile-sly |
1518 | (package | |
1519 | (name "guile-sly") | |
1520 | (version "0.1") | |
1521 | (source (origin | |
1522 | (method url-fetch) | |
8d5e7ad2 | 1523 | (uri (string-append "https://files.dthompson.us/sly/sly-" |
5649c8cd DT |
1524 | version ".tar.gz")) |
1525 | (sha256 | |
1526 | (base32 | |
44394ef9 LC |
1527 | "1svzlbz2vripmyq2kjh0rig16bsrnbkwbsm558pjln9l65mcl4qq")) |
1528 | (modules '((guix build utils))) | |
1529 | (snippet | |
1530 | '(begin | |
1531 | (substitute* "configure" | |
1532 | (("_guile_required_version=\"2.0.11\"") | |
1533 | "_guile_required_version=\"2\"") | |
1534 | (("ac_subst_vars='") | |
1535 | "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n")) | |
1536 | (substitute* (find-files "." "Makefile.in") | |
1537 | (("moddir = .*$") | |
1538 | (string-append | |
1539 | "moddir = " | |
1540 | "$(prefix)/share/guile/site/@GUILE_EFFECTIVE_VERSION@\n")) | |
1541 | (("godir = .*$") | |
1542 | (string-append | |
1543 | "godir = " | |
6cbee49d MW |
1544 | "$(prefix)/lib/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n"))) |
1545 | #t)))) | |
5649c8cd DT |
1546 | (build-system gnu-build-system) |
1547 | (arguments | |
1548 | '(#:configure-flags | |
1549 | (list (string-append "--with-libfreeimage-prefix=" | |
1550 | (assoc-ref %build-inputs "freeimage")) | |
1551 | (string-append "--with-libgslcblas-prefix=" | |
1552 | (assoc-ref %build-inputs "gsl"))))) | |
1553 | (native-inputs | |
1554 | `(("pkg-config" ,pkg-config))) | |
1555 | (propagated-inputs | |
2e7825bc | 1556 | `(("guile-sdl" ,guile-sdl) |
5649c8cd DT |
1557 | ("guile-opengl" ,guile-opengl))) |
1558 | (inputs | |
2e7825bc LC |
1559 | `(("guile" ,guile-2.2) |
1560 | ("gsl" ,gsl) | |
5649c8cd DT |
1561 | ("freeimage" ,freeimage) |
1562 | ("mesa" ,mesa))) | |
1563 | (synopsis "2D/3D game engine for GNU Guile") | |
1564 | (description "Sly is a 2D/3D game engine written in Guile Scheme. Sly | |
1565 | features a functional reactive programming interface and live coding | |
1566 | capabilities.") | |
0eb3b8c0 | 1567 | (home-page "https://dthompson.us/projects/sly.html") |
71e0f217 | 1568 | (license license:gpl3+))) |
5649c8cd | 1569 | |
dec1e2b3 AB |
1570 | (define-public g-wrap |
1571 | (package | |
1572 | (name "g-wrap") | |
1573 | (version "1.9.15") | |
1574 | (source (origin | |
1575 | (method url-fetch) | |
1576 | (uri (string-append "mirror://savannah/g-wrap/g-wrap-" | |
1577 | version ".tar.gz")) | |
1578 | (sha256 | |
1579 | (base32 | |
1580 | "0ak0bha37dfpj9kmyw1r8fj8nva639aw5xr66wr5gd3l1rqf5xhg")))) | |
1581 | (build-system gnu-build-system) | |
1582 | (native-inputs | |
1583 | `(("pkg-config" ,pkg-config))) | |
1584 | (propagated-inputs | |
61583094 | 1585 | `(("guile" ,guile-2.2) |
dec1e2b3 AB |
1586 | ("guile-lib" ,guile-lib))) |
1587 | (inputs | |
1588 | `(("libffi" ,libffi))) | |
9e8599a3 | 1589 | (arguments |
61583094 TF |
1590 | `(#:configure-flags '("--disable-Werror") |
1591 | #:phases | |
1592 | (modify-phases %standard-phases | |
1593 | (add-before 'configure 'pre-configure | |
1594 | (lambda* (#:key outputs #:allow-other-keys) | |
1595 | (let ((out (assoc-ref outputs "out"))) | |
1596 | (substitute* (find-files "." "^Makefile.in$") | |
1597 | (("guilemoduledir =.*guile/site" all) | |
1598 | (string-append all "/@GUILE_EFFECTIVE_VERSION@"))) | |
1599 | #t)))))) | |
dec1e2b3 AB |
1600 | (synopsis "Generate C bindings for Guile") |
1601 | (description "G-Wrap is a tool and Guile library for generating function | |
1602 | wrappers for inter-language calls. It currently only supports generating Guile | |
1603 | wrappers for C functions. Given a definition of the types and prototypes for | |
1604 | a given C interface, G-Wrap will automatically generate the C code that | |
1605 | provides access to that interface and its types from the Scheme level.") | |
340978d7 | 1606 | (home-page "https://www.nongnu.org/g-wrap/index.html") |
71e0f217 | 1607 | (license license:lgpl2.1+))) |
dec1e2b3 | 1608 | |
01497dfe LC |
1609 | (define-public guile-dbi |
1610 | (package | |
1611 | (name "guile-dbi") | |
1612 | (version "2.1.6") | |
1613 | (source (origin | |
1614 | (method url-fetch) | |
1615 | (uri (string-append | |
1616 | "http://download.gna.org/guile-dbi/guile-dbi-" | |
1617 | version ".tar.gz")) | |
1618 | (sha256 | |
1619 | (base32 | |
1620 | "116njrprhgrsv1qm904sp3b02rq01fx639r433d657gyhw3x159n")))) | |
1621 | (build-system gnu-build-system) | |
1622 | (arguments | |
1623 | '(#:configure-flags | |
1624 | (list (string-append | |
b989c3e3 | 1625 | "--with-guile-site-dir=" %output "/share/guile/site/2.2")) |
34e00c7b AI |
1626 | #:make-flags |
1627 | (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib:" | |
1628 | (assoc-ref %build-inputs "guile-dbd-sqlite3") "/lib")) | |
01497dfe LC |
1629 | #:phases |
1630 | (modify-phases %standard-phases | |
1631 | (add-after 'install 'patch-extension-path | |
1632 | (lambda* (#:key outputs #:allow-other-keys) | |
1633 | (let* ((out (assoc-ref outputs "out")) | |
1634 | (dbi.scm (string-append | |
b989c3e3 | 1635 | out "/share/guile/site/2.2/dbi/dbi.scm")) |
01497dfe LC |
1636 | (ext (string-append out "/lib/libguile-dbi"))) |
1637 | (substitute* dbi.scm (("libguile-dbi") ext)) | |
1638 | #t)))))) | |
34e00c7b AI |
1639 | (inputs |
1640 | `(("guile-dbd-sqlite3" ,guile-dbd-sqlite3))) ; only shared library, no scheme files | |
01497dfe | 1641 | (propagated-inputs |
b989c3e3 | 1642 | `(("guile" ,guile-2.2))) |
01497dfe LC |
1643 | (synopsis "Guile database abstraction layer") |
1644 | (home-page "http://home.gna.org/guile-dbi/guile-dbi.html") | |
1645 | (description | |
1646 | "guile-dbi is a library for Guile that provides a convenient interface to | |
1647 | SQL databases. Database programming with guile-dbi is generic in that the same | |
1648 | programming interface is presented regardless of which database system is used. | |
1649 | It currently supports MySQL, Postgres and SQLite3.") | |
71e0f217 | 1650 | (license license:gpl2+))) |
01497dfe | 1651 | |
34e00c7b AI |
1652 | (define guile-dbi-bootstrap |
1653 | (package | |
1654 | (inherit guile-dbi) | |
1655 | (name "guile-dbi-bootstrap") | |
1656 | (inputs '()) | |
1657 | (arguments | |
1658 | (substitute-keyword-arguments (package-arguments guile-dbi) | |
1659 | ((#:make-flags _) '(list)))))) | |
1660 | ||
01497dfe LC |
1661 | (define-public guile-dbd-sqlite3 |
1662 | (package | |
1663 | (name "guile-dbd-sqlite3") | |
1664 | (version "2.1.6") | |
1665 | (source (origin | |
1666 | (method url-fetch) | |
1667 | (uri (string-append | |
1668 | "http://download.gna.org/guile-dbi/guile-dbd-sqlite3-" | |
1669 | version ".tar.gz")) | |
1670 | (sha256 | |
1671 | (base32 | |
1672 | "0rg71jchxd2y8x496s8zmfmikr5g8zxi8zv2ar3f7a23pph92iw2")))) | |
1673 | (build-system gnu-build-system) | |
1674 | (native-inputs | |
34e00c7b AI |
1675 | `(("pkg-config" ,pkg-config) |
1676 | ("guile-dbi-bootstrap" ,guile-dbi-bootstrap))) ; only required for headers | |
01497dfe LC |
1677 | (inputs |
1678 | `(("sqlite" ,sqlite) | |
1679 | ("zlib" ,(@ (gnu packages compression) zlib)))) | |
01497dfe LC |
1680 | (synopsis "Guile DBI driver for SQLite") |
1681 | (home-page "https://github.com/jkalbhenn/guile-dbd-sqlite3") | |
1682 | (description | |
1683 | "guile-dbi is a library for Guile that provides a convenient interface to | |
1684 | SQL databases. This package implements the interface for SQLite.") | |
71e0f217 | 1685 | (license license:gpl2+))) |
01497dfe | 1686 | |
e9291eaa AS |
1687 | (define-public guile-dsv |
1688 | (package | |
1689 | (name "guile-dsv") | |
8c80f8ef | 1690 | (version "0.2.1") |
e9291eaa AS |
1691 | (source (origin |
1692 | (method git-fetch) | |
1693 | (uri (git-reference | |
1694 | (url "https://github.com/artyom-poptsov/guile-dsv") | |
8c80f8ef | 1695 | (commit "bdc5267d007478abc20ea96d7c459b7dd9560b3d"))) |
e9291eaa AS |
1696 | (file-name (string-append name "-" version "-checkout")) |
1697 | (sha256 | |
1698 | (base32 | |
8c80f8ef | 1699 | "1irw6mz8998nwyhzrw9g94jcz60b9zljgqfmipaz1ybn8579qjx0")))) |
e9291eaa AS |
1700 | (build-system gnu-build-system) |
1701 | (native-inputs | |
1702 | `(("autoconf" ,autoconf) | |
1703 | ("automake" ,automake) | |
1704 | ("pkg-config" ,pkg-config) | |
1705 | ("texinfo" ,texinfo))) | |
1706 | (inputs `(("guile" ,guile-2.2))) | |
1707 | (propagated-inputs `(("guile-lib" ,guile-lib))) | |
1708 | (arguments | |
1709 | '(#:phases (modify-phases %standard-phases | |
1710 | (add-before 'configure 'set-guilesitedir | |
1711 | (lambda _ | |
1712 | (substitute* "Makefile.in" | |
1713 | (("^guilesitedir =.*$") | |
1714 | "guilesitedir = \ | |
1715 | $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n")) | |
1716 | (substitute* "modules/Makefile.in" | |
1717 | (("^guilesitedir =.*$") | |
1718 | "guilesitedir = \ | |
1719 | $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n")) | |
1720 | (substitute* "modules/dsv/Makefile.in" | |
1721 | (("^guilesitedir =.*$") | |
1722 | "guilesitedir = \ | |
1723 | $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n")) | |
1724 | #t)) | |
1725 | (add-after 'unpack 'autoreconf | |
1726 | (lambda _ | |
1727 | (zero? (system* "autoreconf" "-vfi"))))))) | |
1728 | (home-page "https://github.com/artyom-poptsov/guile-dsv") | |
1729 | (synopsis "DSV module for Guile") | |
1730 | (description | |
1731 | "Guile-DSV is a GNU Guile module for working with the | |
1732 | delimiter-separated values (DSV) data format. Guile-DSV supports the | |
1733 | Unix-style DSV format and RFC 4180 format.") | |
1734 | (license license:gpl3+))) | |
1735 | ||
bd9af610 AK |
1736 | (define-public guile-xosd |
1737 | (package | |
1738 | (name "guile-xosd") | |
4b2b7135 | 1739 | (version "0.2.1") |
bd9af610 AK |
1740 | (source (origin |
1741 | (method url-fetch) | |
1742 | (uri (string-append "https://github.com/alezost/" name | |
1743 | "/releases/download/v" version | |
1744 | "/" name "-" version ".tar.gz")) | |
1745 | (sha256 | |
1746 | (base32 | |
4b2b7135 | 1747 | "1ri5065c16kmgrf2pysn2ymxjqi5302lhpb07wkl1jr75ym8fn8p")))) |
bd9af610 AK |
1748 | (build-system gnu-build-system) |
1749 | (native-inputs | |
1750 | `(("pkg-config" ,pkg-config))) | |
1751 | (inputs | |
c6726a5f | 1752 | `(("guile" ,guile-2.2) |
bd9af610 AK |
1753 | ("libx11" ,libx11) |
1754 | ("libxext" ,libxext) | |
1755 | ("libxinerama" ,libxinerama) | |
1756 | ("xosd" ,xosd))) | |
1757 | (home-page "https://github.com/alezost/guile-xosd") | |
1758 | (synopsis "XOSD bindings for Guile") | |
1759 | (description | |
1760 | "Guile-XOSD provides Guile bindings for @code{libxosd}, | |
1761 | @uref{http://sourceforge.net/projects/libxosd/, the X On Screen Display | |
1762 | library}.") | |
71e0f217 | 1763 | (license license:gpl3+))) |
bd9af610 | 1764 | |
07f7cc03 AK |
1765 | (define-public guile-daemon |
1766 | (package | |
1767 | (name "guile-daemon") | |
5245399f | 1768 | (version "0.1.2") |
07f7cc03 AK |
1769 | (source (origin |
1770 | (method url-fetch) | |
1771 | (uri (string-append "https://github.com/alezost/" name | |
1772 | "/releases/download/v" version | |
1773 | "/" name "-" version ".tar.gz")) | |
1774 | (sha256 | |
1775 | (base32 | |
5245399f | 1776 | "0hh6gq6b6phpxm0b1dkxyzj3f4sxdf7dji63609lzypa5v1ad2gv")))) |
07f7cc03 AK |
1777 | (build-system gnu-build-system) |
1778 | (native-inputs | |
1779 | `(("pkg-config" ,pkg-config))) | |
1780 | (inputs | |
c6726a5f | 1781 | `(("guile" ,guile-2.2))) |
07f7cc03 AK |
1782 | (home-page "https://github.com/alezost/guile-daemon") |
1783 | (synopsis "Evaluate code in a running Guile process") | |
1784 | (description | |
1785 | "Guile-Daemon is a small Guile program that loads your initial | |
1786 | configuration file, and then reads and evaluates Guile expressions that | |
1787 | you send to a FIFO file.") | |
71e0f217 | 1788 | (license license:gpl3+))) |
07f7cc03 | 1789 | |
e28e74a5 EE |
1790 | (define-public guile-commonmark |
1791 | (package | |
1792 | (name "guile-commonmark") | |
1793 | (version "0.1") | |
1794 | (source (origin | |
1795 | (method url-fetch) | |
1796 | (uri (string-append "https://github.com/OrangeShark/" name | |
1797 | "/releases/download/v" version | |
1798 | "/" name "-" version ".tar.gz")) | |
1799 | (sha256 | |
1800 | (base32 | |
757ce0f9 LC |
1801 | "12cb5fqvvgc87f5xp0ih5az305wnjia89l5jba83d0r2p8bfy0b0")) |
1802 | (modules '((guix build utils))) | |
1803 | (snippet | |
1804 | ;; Use the real effective version of Guile in directory names | |
1805 | ;; instead of a hard-coded "/2.0". | |
1806 | '(begin | |
1807 | (substitute* "configure" | |
1808 | (("ac_subst_vars='") | |
1809 | "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n")) | |
1810 | (substitute* "Makefile.in" | |
1811 | (("/site/2.0") | |
6cbee49d MW |
1812 | "/site/@GUILE_EFFECTIVE_VERSION@")) |
1813 | #t)))) | |
e28e74a5 EE |
1814 | (build-system gnu-build-system) |
1815 | (inputs | |
7c86c031 | 1816 | `(("guile" ,guile-2.2))) |
e28e74a5 EE |
1817 | (synopsis "CommonMark parser for Guile") |
1818 | (description | |
1819 | "guile-commonmark is a library for parsing CommonMark, a fully specified | |
1820 | variant of Markdown. The library is written in Guile Scheme and is designed | |
1821 | to transform a CommonMark document to SXML. guile-commonmark tries to closely | |
1822 | follow the @uref{http://commonmark.org/, CommonMark spec}, the main difference | |
1823 | is no support for parsing block and inline level HTML.") | |
1824 | (home-page "https://github.com/OrangeShark/guile-commonmark") | |
71e0f217 | 1825 | (license license:lgpl3+))) |
e28e74a5 | 1826 | |
7c86c031 LC |
1827 | (define-public guile2.0-commonmark |
1828 | (package-for-guile-2.0 guile-commonmark)) | |
947a5d47 | 1829 | (define-public guile2.2-commonmark |
7c86c031 | 1830 | (deprecated-package "guile2.2-commonmark" guile-commonmark)) |
947a5d47 | 1831 | |
3b5783fc AB |
1832 | (define-public guile-bytestructures |
1833 | (package | |
1834 | (name "guile-bytestructures") | |
90977eb5 | 1835 | (version "1.0.3") |
3b5783fc | 1836 | (source (origin |
4f85f7f7 | 1837 | (method url-fetch) |
1838 | (uri (string-append "https://github.com/TaylanUB/scheme-bytestructures" | |
1839 | "/releases/download/v" version | |
1840 | "/bytestructures-" version ".tar.gz")) | |
3b5783fc AB |
1841 | (sha256 |
1842 | (base32 | |
90977eb5 | 1843 | "0xf6s8gd3656j8k2ar6y7i62r68azawyzxhsagsk8nvldnrs1r18")))) |
4f85f7f7 | 1844 | (build-system gnu-build-system) |
726ecfeb | 1845 | (native-inputs |
4f85f7f7 | 1846 | `(("pkg-config" ,pkg-config))) |
3b5783fc | 1847 | (inputs |
aabece2e | 1848 | `(("guile" ,guile-2.2))) |
3b5783fc AB |
1849 | (home-page "https://github.com/TaylanUB/scheme-bytestructures") |
1850 | (synopsis "Structured access to bytevector contents for Guile") | |
1851 | (description | |
1852 | "Guile bytestructures offers a system imitating the type system | |
1853 | of the C programming language, to be used on bytevectors. C's type | |
1854 | system works on raw memory, and Guile works on bytevectors which are | |
1855 | an abstraction over raw memory. It's also more powerful than the C | |
1856 | type system, elevating types to first-class status.") | |
71e0f217 | 1857 | (license license:gpl3+))) |
3b5783fc | 1858 | |
726ecfeb LC |
1859 | (define-public guile2.0-bytestructures |
1860 | (package-for-guile-2.0 guile-bytestructures)) | |
1861 | ||
472fc855 LC |
1862 | (define-public guile-aspell |
1863 | (package | |
1864 | (name "guile-aspell") | |
234ea3d6 | 1865 | (version "0.4") |
472fc855 LC |
1866 | (source (origin |
1867 | (method url-fetch) | |
1868 | (uri (string-append | |
1869 | "http://lonelycactus.com/tarball/guile_aspell-" | |
1870 | version ".tar.gz")) | |
1871 | (sha256 | |
1872 | (base32 | |
234ea3d6 | 1873 | "0vpk5xj9m9qc702z3khmkwhgpb949qbsyz8kw2qycda6qnxk0077")))) |
472fc855 LC |
1874 | (build-system gnu-build-system) |
1875 | (arguments | |
7295087e LC |
1876 | '(#:phases (modify-phases %standard-phases |
1877 | (add-before 'configure 'set-guilesitedir | |
1878 | (lambda _ | |
1879 | (substitute* "Makefile.in" | |
1880 | (("^guilesitedir =.*$") | |
1881 | "guilesitedir = \ | |
1882 | $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n")) | |
1883 | #t)) | |
472fc855 LC |
1884 | (add-before 'build 'set-libaspell-file-name |
1885 | (lambda* (#:key inputs #:allow-other-keys) | |
1886 | (let ((aspell (assoc-ref inputs "aspell"))) | |
234ea3d6 | 1887 | (substitute* "aspell.scm" |
472fc855 LC |
1888 | (("\"libaspell\\.so\"") |
1889 | (string-append "\"" aspell | |
1890 | "/lib/libaspell\""))) | |
1891 | #t)))))) | |
1892 | (native-inputs `(("pkg-config" ,pkg-config))) | |
cb5be6df | 1893 | (inputs `(("guile" ,guile-2.2) |
472fc855 LC |
1894 | ("aspell" ,aspell))) |
1895 | (home-page "https://github.com/spk121/guile-aspell") | |
1896 | (synopsis "Spell-checking from Guile") | |
1897 | (description | |
1898 | "guile-aspell is a Guile Scheme library for comparing a string against a | |
1899 | dictionary and suggesting spelling corrections.") | |
71e0f217 | 1900 | (license license:gpl3+))) |
472fc855 | 1901 | |
a614ce38 LC |
1902 | (define-public guile-bash |
1903 | ;; This project is currently retired. It was initially announced here: | |
1904 | ;; <https://lists.gnu.org/archive/html/guile-user/2015-02/msg00003.html>. | |
1905 | (let ((commit "1eabc563ca5692b3e08d84f1f0e6fd2283284469") | |
1906 | (revision "0")) | |
1907 | (package | |
1908 | (name "guile-bash") | |
1909 | (version (string-append "0.1.6-" revision "." (string-take commit 7))) | |
1910 | (home-page | |
1911 | "https://anonscm.debian.org/cgit/users/kaction-guest/retired/dev.guile-bash.git") | |
1912 | (source (origin | |
1913 | (method git-fetch) | |
1914 | (uri (git-reference | |
1915 | (commit commit) | |
1916 | (url home-page))) | |
1917 | (sha256 | |
1918 | (base32 | |
1919 | "097vny990wp2qpjij6a5a5gwc6fxzg5wk56inhy18iki5v6pif1p")) | |
1920 | (file-name (string-append name "-" version "-checkout")))) | |
1921 | (build-system gnu-build-system) | |
1922 | (arguments | |
189be331 | 1923 | '(#:configure-flags |
a614ce38 LC |
1924 | ;; Add -I to match 'bash.pc' of Bash 4.4. |
1925 | (list (string-append "CPPFLAGS=-I" | |
1926 | (assoc-ref %build-inputs "bash:include") | |
1927 | "/include/bash/include") | |
1928 | ||
1929 | ;; The '.a' file is useless. | |
1930 | "--disable-static" | |
1931 | ||
1932 | ;; Install 'lib/bash' as Bash 4.4 expects. | |
1933 | (string-append "--libdir=" (assoc-ref %outputs "out") | |
1934 | "/lib/bash")))) | |
1935 | (native-inputs `(("pkg-config" ,pkg-config) | |
464f5447 | 1936 | ("autoconf" ,autoconf-wrapper) |
a614ce38 LC |
1937 | ("automake" ,automake) |
1938 | ("libtool" ,libtool) | |
1939 | ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'. | |
b7158b76 LC |
1940 | ("gettext" ,gettext-minimal) |
1941 | ||
1942 | ;; Bash with loadable module support, for the test | |
1943 | ;; suite. | |
1944 | ("bash-full" ,bash))) | |
a614ce38 LC |
1945 | (inputs `(("guile" ,guile-2.0) |
1946 | ("bash:include" ,bash "include"))) | |
1947 | (synopsis "Extend Bash using Guile") | |
1948 | (description | |
1949 | "Guile-Bash provides a shared library and set of Guile modules, | |
1950 | allowing you to extend Bash in Scheme. Scheme interfaces allow you to access | |
1951 | the following aspects of Bash: | |
1952 | ||
1953 | @itemize | |
1954 | @item aliases; | |
1955 | @item setting and getting Bash variables; | |
1956 | @item creating dynamic variables; | |
1957 | @item creating Bash functions with a Scheme implementation; | |
1958 | @item reader macro for output capturing; | |
1959 | @item reader macro for evaluating raw Bash commands. | |
1960 | @end itemize | |
1961 | ||
1962 | To enable it, run: | |
1963 | ||
1964 | @example | |
1965 | enable -f ~/.guix-profile/lib/bash/libguile-bash.so scm | |
1966 | @end example | |
1967 | ||
1968 | and then run @command{scm example.scm}.") | |
71e0f217 | 1969 | (license license:gpl3+)))) |
a614ce38 | 1970 | |
c5793e7e CAW |
1971 | (define-public guile-8sync |
1972 | (package | |
1973 | (name "guile-8sync") | |
525acb6e | 1974 | (version "0.4.2") |
c5793e7e CAW |
1975 | (source (origin |
1976 | (method url-fetch) | |
1977 | (uri (string-append "mirror://gnu/8sync/8sync-" version | |
1978 | ".tar.gz")) | |
1979 | (sha256 | |
1980 | (base32 | |
525acb6e | 1981 | "031wm13srak3wsnll7j2mbbi29g1pcm4swdb71ds9yn567pn20qw")))) |
c5793e7e CAW |
1982 | (build-system gnu-build-system) |
1983 | (native-inputs `(("autoconf" ,autoconf) | |
1984 | ("automake" ,automake) | |
f6396d86 | 1985 | ("guile" ,guile-2.2) |
c5793e7e CAW |
1986 | ("pkg-config" ,pkg-config) |
1987 | ("texinfo" ,texinfo))) | |
1988 | (arguments | |
1989 | `(#:phases (modify-phases %standard-phases | |
1990 | (add-before 'configure 'setenv | |
1991 | (lambda _ | |
1992 | ;; quiet warnings | |
ab4a1731 CAW |
1993 | (setenv "GUILE_AUTO_COMPILE" "0") |
1994 | #t))))) | |
c5793e7e CAW |
1995 | (home-page "https://gnu.org/s/8sync/") |
1996 | (synopsis "Asynchronous actor model library for Guile") | |
1997 | (description | |
1998 | "GNU 8sync (pronounced \"eight-sync\") is an asynchronous programming | |
1999 | library for GNU Guile based on the actor model. | |
2000 | ||
f6396d86 | 2001 | Note that 8sync is only available for Guile 2.2.") |
71e0f217 | 2002 | (license license:lgpl3+))) |
c5793e7e | 2003 | |
aaf1bdc3 CAW |
2004 | (define-public guile-fibers |
2005 | (package | |
2006 | (name "guile-fibers") | |
2007 | (version "1.0.0") | |
2008 | (source (origin | |
2009 | (method url-fetch) | |
2010 | (uri (string-append "https://wingolog.org/pub/fibers/fibers-" | |
2011 | version ".tar.gz")) | |
2012 | (sha256 | |
2013 | (base32 | |
2014 | "0vjkg72ghgdgphzbjz9ig8al8271rq8974viknb2r1rg4lz92ld0")))) | |
2015 | (build-system gnu-build-system) | |
2016 | (native-inputs | |
2017 | `(("texinfo" ,texinfo) | |
2018 | ("pkg-config" ,pkg-config))) | |
2019 | (inputs | |
f6396d86 | 2020 | `(("guile" ,guile-2.2))) |
aaf1bdc3 CAW |
2021 | (synopsis "Lightweight concurrency facility for Guile") |
2022 | (description | |
2023 | "Fibers is a Guile library that implements a a lightweight concurrency | |
2024 | facility, inspired by systems like Concurrent ML, Go, and Erlang. A fiber is | |
2025 | like a \"goroutine\" from the Go language: a lightweight thread-like | |
2026 | abstraction. Systems built with Fibers can scale up to millions of concurrent | |
2027 | fibers, tens of thousands of concurrent socket connections, and many parallel | |
2028 | cores. The Fibers library also provides Concurrent ML-like channels for | |
2029 | communication between fibers. | |
2030 | ||
2031 | Note that Fibers makes use of some Guile 2.1/2.2-specific features and | |
2032 | is not available for Guile 2.0.") | |
2033 | (home-page "https://github.com/wingo/fibers") | |
2034 | (license license:lgpl3+))) | |
2035 | ||
bd233722 | 2036 | (define-public guile-git |
576f245c LC |
2037 | (let ((revision "6") |
2038 | (commit "36f93c174adc396c90ec3a6923487f0444fe5d69")) | |
bd233722 LC |
2039 | (package |
2040 | (name "guile-git") | |
2041 | (version (string-append "0.0-" revision "." (string-take commit 7))) | |
dc03f32d | 2042 | (home-page "https://gitlab.com/guile-git/guile-git.git") |
bd233722 LC |
2043 | (source (origin |
2044 | (method git-fetch) | |
2045 | (uri (git-reference (url home-page) (commit commit))) | |
2046 | (sha256 | |
2047 | (base32 | |
576f245c | 2048 | "0z1dvn0scx59pbgjkpacam7p5n7630z4qm8fazim7ixq9xv3s8wx")) |
bd233722 LC |
2049 | (file-name (git-file-name name version)))) |
2050 | (build-system gnu-build-system) | |
bd233722 LC |
2051 | (native-inputs |
2052 | `(("autoconf" ,autoconf) | |
2053 | ("automake" ,automake) | |
3a537598 | 2054 | ("texinfo" ,texinfo) |
bd233722 LC |
2055 | ("pkg-config" ,pkg-config))) |
2056 | (inputs | |
aabece2e | 2057 | `(("guile" ,guile-2.2) |
bd233722 LC |
2058 | ("libgit2" ,libgit2))) |
2059 | (propagated-inputs | |
2060 | `(("guile-bytestructures" ,guile-bytestructures))) | |
2061 | (synopsis "Guile bindings for libgit2") | |
2062 | (description | |
2063 | "This package provides Guile bindings to libgit2, a library to | |
2064 | manipulate repositories of the Git version control system.") | |
2065 | (license license:gpl3+)))) | |
c5793e7e | 2066 | |
70bc6085 LC |
2067 | (define-public guile2.0-git |
2068 | (package-for-guile-2.0 guile-git)) | |
2069 | ||
f252d6df | 2070 | (define-public guile-syntax-highlight |
3c90c7ae DT |
2071 | (package |
2072 | (name "guile-syntax-highlight") | |
2073 | (version "0.1") | |
2074 | (source (origin | |
2075 | (method url-fetch) | |
2076 | (uri (string-append "https://files.dthompson.us/" | |
2077 | "guile-syntax-highlight/" | |
2078 | "guile-syntax-highlight-" | |
2079 | version ".tar.gz")) | |
2080 | (sha256 | |
2081 | (base32 | |
2082 | "1p771kq15x83483m23bhah1sz6vkalg3drm7x279f4j1cxligkzi")))) | |
2083 | (build-system gnu-build-system) | |
2084 | (native-inputs | |
2085 | `(("pkg-config" ,pkg-config))) | |
2086 | (inputs | |
2087 | `(("guile" ,guile-2.2))) | |
8c72ed92 RW |
2088 | (synopsis "General-purpose syntax highlighter for GNU Guile") |
2089 | (description "Guile-syntax-highlight is a general-purpose syntax | |
f252d6df DT |
2090 | highlighting library for GNU Guile. It can parse code written in various |
2091 | programming languages into a simple s-expression that can be converted to | |
2092 | HTML (via SXML) or any other format for rendering.") | |
3c90c7ae DT |
2093 | (home-page "http://dthompson.us/projects/guile-syntax-highlight.html") |
2094 | (license license:lgpl3+))) | |
f252d6df | 2095 | |
d26ae96c CAW |
2096 | (define-public guile-sjson |
2097 | (package | |
2098 | (name "guile-sjson") | |
a62a16a4 | 2099 | (version "0.2.1") |
d26ae96c CAW |
2100 | (source (origin |
2101 | (method url-fetch) | |
2102 | (uri (string-append "https://dustycloud.org/misc/sjson-" version | |
2103 | ".tar.gz")) | |
2104 | (sha256 | |
2105 | (base32 | |
a62a16a4 | 2106 | "1mzmapln79vv10qxaggz9qwcdbag3jnrj19xx8bgkmxss8h03sv3")))) |
d26ae96c | 2107 | (build-system gnu-build-system) |
d26ae96c CAW |
2108 | (native-inputs |
2109 | `(("autoconf" ,autoconf) | |
2110 | ("automake" ,automake) | |
2111 | ("pkg-config" ,pkg-config))) | |
2112 | (inputs | |
2113 | `(("guile" ,guile-2.2))) | |
2114 | (home-page "https://gitlab.com/dustyweb/guile-sjson") | |
2115 | (synopsis "S-expression based json reader/writer for Guile") | |
2116 | (description "guile-sjson is a json reader/writer for Guile. | |
2117 | It has a nice, simple s-expression based syntax.") | |
2118 | (license license:lgpl3+))) | |
2119 | ||
e076d56a | 2120 | (define-public guile-colorized |
2121 | (package | |
2122 | (name "guile-colorized") | |
2123 | (version "0.1") | |
2124 | (source (origin | |
2125 | (method url-fetch) | |
2126 | (uri (string-append "https://github.com/NalaGinrut/guile-colorized/" | |
2127 | "archive/v" version ".tar.gz")) | |
2128 | (file-name (string-append name "-" version ".tar.gz")) | |
2129 | (sha256 | |
2130 | (base32 | |
2131 | "16xhc3an6aglnca8xl3mvgi8hsqzqn68vsl5ga4bz8bvbap5fn4p")))) | |
2132 | (build-system gnu-build-system) | |
2133 | (arguments | |
2134 | `(#:modules ((system base compile) | |
2135 | ,@%gnu-build-system-modules) | |
2136 | #:tests? #f ;No tests included | |
2137 | #:phases | |
2138 | (modify-phases %standard-phases | |
2139 | (delete 'configure) ;No configure script | |
2140 | (replace 'install | |
2141 | (lambda* (#:key outputs inputs #:allow-other-keys) | |
2142 | (let* ((out (assoc-ref outputs "out")) | |
2143 | (module-dir (string-append out "/share/guile/site/2.2")) | |
2144 | (language-dir (string-append module-dir "/ice-9")) | |
2145 | (guild (string-append (assoc-ref inputs "guile") | |
2146 | "/bin/guild"))) | |
2147 | ;; The original 'make install' is too primitive. | |
2148 | ||
2149 | ;; copy the source | |
2150 | (install-file "ice-9/colorized.scm" language-dir) | |
2151 | ||
2152 | ;; compile to the destination | |
2153 | (compile-file "ice-9/colorized.scm" | |
2154 | #:output-file (string-append | |
2155 | language-dir "/colorized.go")) | |
2156 | #t)))))) | |
2157 | (inputs | |
2158 | `(("guile" ,guile-2.2))) | |
2159 | (home-page "https://github.com/NalaGinrut/guile-colorized") | |
2160 | (synopsis "Colorized REPL for Guile") | |
2161 | (description | |
2162 | "Guile-colorized provides you with a colorized REPL for GNU Guile.") | |
2163 | (license license:gpl3+))) | |
2164 | ||
f858e58f | 2165 | (define-public guile-simple-zmq |
e46b84e3 PAR |
2166 | (let ((commit "1f3b7c0b9b249c6fde8e8a632b252d8a1b794424") |
2167 | (revision "1")) | |
f858e58f PAR |
2168 | (package |
2169 | (name "guile-simple-zmq") | |
2170 | (version (git-version "0.0.0" revision commit)) | |
2171 | (source | |
2172 | (origin | |
2173 | (method git-fetch) | |
2174 | (uri (git-reference | |
2175 | (url "https://github.com/jerry40/guile-simple-zmq") | |
2176 | (commit commit))) | |
2177 | (sha256 | |
2178 | (base32 | |
e46b84e3 | 2179 | "0nj2pd5bsmmgd3c54wh4sixfhmsv1arsq7yam2d7487h3n9q57r7")) |
f858e58f PAR |
2180 | (file-name (git-file-name name version)))) |
2181 | (build-system trivial-build-system) | |
2182 | (arguments | |
2183 | `(#:modules ((guix build utils)) | |
2184 | #:builder | |
2185 | (begin | |
2186 | (use-modules (guix build utils) | |
2187 | (srfi srfi-26) | |
2188 | (ice-9 match) | |
2189 | (ice-9 popen) | |
2190 | (ice-9 rdelim)) | |
2191 | ||
2192 | (let* ((out (assoc-ref %outputs "out")) | |
2193 | (guile (assoc-ref %build-inputs "guile")) | |
2194 | (effective (read-line | |
2195 | (open-pipe* OPEN_READ | |
2196 | (string-append guile "/bin/guile") | |
2197 | "-c" "(display (effective-version))"))) | |
2198 | (module-dir (string-append out "/share/guile/site/" | |
2199 | effective)) | |
2200 | (go-dir (string-append out "/lib/guile/" | |
2201 | effective "/site-ccache/")) | |
2202 | (source (string-append (assoc-ref %build-inputs "source") | |
2203 | "/src")) | |
2204 | (scm-file "simple-zmq.scm") | |
2205 | (guild (string-append (assoc-ref %build-inputs "guile") | |
2206 | "/bin/guild")) | |
2207 | (zmq (assoc-ref %build-inputs "zeromq")) | |
2208 | (deps (list zmq)) | |
2209 | (path (string-join | |
2210 | (map (cut string-append <> | |
2211 | "/lib/") | |
2212 | deps) | |
2213 | ":"))) | |
2214 | ;; Make installation directories. | |
2215 | (mkdir-p module-dir) | |
2216 | (mkdir-p go-dir) | |
2217 | ||
2218 | ;; Compile .scm files and install. | |
2219 | (chdir source) | |
2220 | (setenv "GUILE_AUTO_COMPILE" "0") | |
2221 | (for-each (lambda (file) | |
2222 | (let* ((dest-file (string-append module-dir "/" | |
2223 | file)) | |
2224 | (go-file (match (string-split file #\.) | |
2225 | ((base _) | |
2226 | (string-append go-dir "/" | |
2227 | base ".go"))))) | |
2228 | ;; Install source module. | |
2229 | (copy-file file dest-file) | |
2230 | (substitute* dest-file | |
2231 | (("\\(dynamic-link \"libzmq\"\\)") | |
2232 | (format #f "(dynamic-link \"~a/lib/libzmq.so\")" | |
2233 | (assoc-ref %build-inputs "zeromq")))) | |
2234 | ||
2235 | ;; Install and compile module. | |
2236 | (unless (zero? (system* guild "compile" | |
2237 | "-L" source | |
2238 | "-o" go-file | |
2239 | dest-file)) | |
2240 | (error (format #f "Failed to compile ~s to ~s!" | |
2241 | file go-file))))) | |
2242 | (list scm-file)) | |
2243 | #t)))) | |
e46b84e3 PAR |
2244 | (inputs |
2245 | `(("guile" ,guile-2.2))) | |
f858e58f | 2246 | (propagated-inputs |
e46b84e3 | 2247 | `(("zeromq" ,zeromq))) |
f858e58f PAR |
2248 | (home-page "https://github.com/jerry40/guile-simple-zmq") |
2249 | (synopsis "Guile wrapper over ZeroMQ library") | |
2250 | (description | |
2251 | "This package provides a Guile programming interface to the ZeroMQ | |
2252 | messaging library.") | |
2253 | (license license:gpl3+)))) | |
2254 | ||
fa6a3bb7 PAR |
2255 | (define-public jupyter-guile-kernel |
2256 | (let ((commit "a5c5f3ea3215b65e770bcb62f71117b0ec4575ed") | |
2257 | (revision "0")) | |
2258 | (package | |
2259 | (name "jupyter-guile-kernel") | |
2260 | (version (git-version "0.0.0" revision commit)) | |
2261 | (source | |
2262 | (origin | |
2263 | (method git-fetch) | |
2264 | (uri (git-reference | |
2265 | (url "https://github.com/jerry40/guile-kernel") | |
2266 | (commit commit))) | |
2267 | (sha256 | |
2268 | (base32 | |
2269 | "0y5jr0f0dyskvsawqbf6n0bpg8jirw4mhqbarf2a6p9lxhqha9s9")))) | |
2270 | (build-system trivial-build-system) | |
2271 | (arguments | |
2272 | `(#:modules ((guix build utils)) | |
2273 | #:builder | |
2274 | (begin | |
2275 | (use-modules (guix build utils) | |
2276 | (srfi srfi-26) | |
2277 | (ice-9 match) | |
2278 | (ice-9 popen) | |
2279 | (ice-9 rdelim)) | |
2280 | ||
2281 | (let* ((out (assoc-ref %outputs "out")) | |
2282 | (guile (assoc-ref %build-inputs "guile")) | |
2283 | (effective (read-line | |
2284 | (open-pipe* OPEN_READ | |
2285 | (string-append guile "/bin/guile") | |
2286 | "-c" "(display (effective-version))"))) | |
2287 | (module-dir (string-append out "/share/guile/site/" | |
2288 | effective)) | |
2289 | (kernel-dir (string-append out "/share/jupyter/kernels/guile")) | |
2290 | (go-dir (string-append out "/lib/guile/" | |
2291 | effective | |
2292 | "/site-ccache")) | |
2293 | (source (string-append (assoc-ref %build-inputs "source") | |
2294 | "/src")) | |
2295 | (scm-files '("hmac.scm" | |
2296 | "tools.scm" | |
2297 | "guile-jupyter-kernel.scm")) | |
2298 | (kernel-file "kernel.json") | |
2299 | (guild (string-append (assoc-ref %build-inputs "guile") | |
2300 | "/bin/guild")) | |
2301 | (g-szmq (assoc-ref %build-inputs "guile-simple-zmq")) | |
2302 | (json (assoc-ref %build-inputs "guile-json")) | |
2303 | (deps (list g-szmq json)) | |
2304 | (path (string-join | |
2305 | (map (cut string-append <> | |
2306 | "/share/guile/site/" | |
2307 | effective) | |
2308 | deps) | |
2309 | ":")) | |
2310 | (gopath (string-join | |
2311 | (map (cut string-append <> | |
2312 | "/lib/guile/" effective | |
2313 | "/site-ccache/") | |
2314 | deps) | |
2315 | ":"))) | |
2316 | ||
2317 | ;; Make installation directories. | |
2318 | (mkdir-p module-dir) | |
2319 | (mkdir-p kernel-dir) | |
2320 | (mkdir-p go-dir) | |
2321 | ||
2322 | ;; Make a writable copy of SOURCE. | |
2323 | (copy-recursively source ".") | |
2324 | ||
2325 | ;; Record the absolute file name of the 'openssl' command. | |
2326 | (substitute* "hmac.scm" | |
2327 | (("openssl") | |
2328 | (string-append (assoc-ref %build-inputs "openssl") | |
2329 | "/bin/openssl"))) | |
2330 | ||
2331 | ;; Compile .scm files and install. | |
2332 | (setenv "GUILE_AUTO_COMPILE" "0") | |
2333 | (setenv "GUILE_LOAD_PATH" path) | |
2334 | (setenv "GUILE_LOAD_COMPILED_PATH" gopath) | |
2335 | ||
2336 | (for-each (lambda (file) | |
2337 | (let* ((dest-file (string-append module-dir "/" | |
2338 | file)) | |
2339 | (go-file (match (string-split file #\.) | |
2340 | ((base _) | |
2341 | (string-append go-dir "/" | |
2342 | base ".go"))))) | |
2343 | ;; Install source module. | |
2344 | (copy-file file dest-file) | |
2345 | ||
2346 | ;; Install compiled module. | |
2347 | (unless (zero? (system* guild "compile" | |
2348 | "-L" source | |
2349 | "-o" go-file | |
2350 | file)) | |
2351 | (error (format #f "Failed to compile ~s to ~s!" | |
2352 | file go-file))))) | |
2353 | scm-files) | |
2354 | ||
2355 | ;; Install kernel | |
2356 | (copy-file kernel-file (string-append kernel-dir "/" | |
2357 | kernel-file)) | |
2358 | ;; Fix hard-coded file name in the kernel | |
2359 | (substitute* (string-append kernel-dir "/" | |
2360 | kernel-file) | |
2361 | (("/home/jerry/.local/share/jupyter/kernels/guile/guile-jupyter-kernel.scm") | |
2362 | (string-append module-dir "/guile-jupyter-kernel.scm")) | |
2363 | (("\"guile\"") | |
2364 | (string-append "\"" (assoc-ref %build-inputs "guile") | |
2365 | "/bin/guile\"")) | |
2366 | (("-s") | |
2367 | (string-append "--no-auto-compile\", \"-s"))) | |
2368 | ||
2369 | #t)))) | |
2370 | (inputs | |
2371 | `(("openssl" ,openssl) | |
2372 | ("guile" ,guile-2.2))) | |
2373 | (propagated-inputs | |
2374 | `(("guile-json" ,guile-json) | |
2375 | ("guile-simple-zmq" ,guile-simple-zmq))) | |
2376 | (synopsis "Guile kernel for the Jupyter Notebook") | |
2377 | (description | |
2378 | "This package provides a Guile 2.x kernel for the Jupyter Notebook. It | |
2379 | allows users to interact with the Guile REPL through Jupyter.") | |
2380 | (home-page "https://github.com/jerry40/guile-kernel") | |
2381 | (license license:gpl3+)))) | |
2382 | ||
89f8c2ac RJ |
2383 | (define-public guile-sparql |
2384 | (package | |
2385 | (name "guile-sparql") | |
2386 | (version "0.0.7") | |
2387 | (source (origin | |
2388 | (method url-fetch) | |
2389 | (uri (string-append | |
2390 | "https://github.com/roelj/guile-sparql/releases/download/" | |
2391 | version "/guile-sparql-" version ".tar.gz")) | |
2392 | (sha256 | |
2393 | (base32 "1drnvhsgl0gc5crmb16yyw1j98nkhwwcgssv9vgm36ng43nnzffd")))) | |
2394 | (build-system gnu-build-system) | |
2395 | (arguments `(#:tests? #f)) ; There are no tests. | |
2396 | (native-inputs | |
2397 | `(("pkg-config" ,pkg-config))) | |
2398 | (inputs | |
2399 | `(("guile" ,guile-2.2))) | |
2400 | (home-page "https://github.com/roelj/guile-sparql") | |
2401 | (synopsis "SPARQL module for Guile") | |
2402 | (description "This package provides the functionality to query a SPARQL | |
2403 | endpoint. Additionally, it provides an interface to write SPARQL queries | |
2404 | using S-expressions.") | |
2405 | (license license:gpl3+))) | |
2406 | ||
1722d680 | 2407 | ;;; guile.scm ends here |