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 | ||
96b2b0dd LC |
304 | (define-public guile-2.2.4 |
305 | ;; This version contains important bug fixes, in particular wrt. to crashes | |
306 | ;; of multi-threaded code as used by 'guix pull' and grafting. | |
307 | (package | |
308 | (inherit guile-2.2) | |
309 | (version "2.2.4") | |
310 | (source (origin | |
311 | (inherit (package-source guile-2.2)) | |
312 | (uri (string-append "mirror://gnu/guile/guile-" version | |
313 | ".tar.xz")) | |
314 | (sha256 | |
315 | (base32 | |
316 | "07p3g0v2ba2vlfbfidqzlgbhnzdx46wh2rgc5gszq1mjyx5bks6r")))))) | |
317 | ||
5cd074ea LC |
318 | (define-public guile-next |
319 | (deprecated-package "guile-next" guile-2.2)) | |
320 | ||
2ba2c98d LC |
321 | (define (make-guile-readline guile) |
322 | (package | |
323 | (name "guile-readline") | |
324 | (version (package-version guile)) | |
325 | (source (package-source guile)) | |
326 | (build-system gnu-build-system) | |
327 | (arguments | |
328 | '(#:configure-flags '("--disable-silent-rules") | |
329 | #:phases (modify-phases %standard-phases | |
330 | (add-before 'build 'chdir | |
331 | (lambda* (#:key outputs #:allow-other-keys) | |
332 | (invoke "make" "-C" "libguile" "scmconfig.h") | |
333 | (invoke "make" "-C" "lib") | |
334 | (chdir "guile-readline") | |
335 | ||
336 | (substitute* "Makefile" | |
337 | (("../libguile/libguile-[[:graph:]]+\\.la") | |
338 | ;; Remove dependency on libguile-X.Y.la. | |
339 | "") | |
340 | (("^READLINE_LIBS = (.*)$" _ libs) | |
341 | ;; Link against the provided libguile. | |
342 | (string-append "READLINE_LIBS = " | |
343 | "-lguile-$(GUILE_EFFECTIVE_VERSION) " | |
344 | libs "\n")) | |
345 | (("\\$\\(top_builddir\\)/meta/build-env") | |
346 | ;; Use the provided Guile, not the one from | |
347 | ;; $(builddir). | |
348 | "") | |
349 | ||
350 | ;; Install modules to the 'site' directories. | |
351 | (("^moddir = .*$") | |
352 | "moddir = $(pkgdatadir)/site/$(GUILE_EFFECTIVE_VERSION)\n") | |
353 | (("^ccachedir = .*$") | |
354 | "ccachedir = $(pkglibdir)/$(GUILE_EFFECTIVE_VERSION)/site-ccache\n")) | |
355 | ||
356 | ;; Load 'guile-readline.so' from the right place. | |
357 | (substitute* "ice-9/readline.scm" | |
358 | (("load-extension \"guile-readline\"") | |
359 | (format #f "load-extension \ | |
360 | (string-append ~s \"/lib/guile/\" (effective-version) \"/extensions/guile-readline\")" | |
361 | (assoc-ref outputs "out")))) | |
362 | #t))))) | |
363 | (home-page (package-home-page guile)) | |
364 | (native-inputs (package-native-inputs guile)) | |
365 | (inputs | |
366 | `(,@(package-inputs guile) ;to placate 'configure' | |
367 | ,@(package-propagated-inputs guile) | |
368 | ("guile" ,guile) | |
369 | ("readline" ,readline))) | |
370 | (synopsis "Line editing support for GNU Guile") | |
371 | (description | |
372 | "This module provides line editing support via the Readline library for | |
373 | GNU@tie{}Guile. Use the @code{(ice-9 readline)} module and call its | |
374 | @code{activate-readline} procedure to enable it.") | |
375 | (license license:gpl3+))) | |
376 | ||
377 | (define-public guile-readline | |
378 | (make-guile-readline guile-2.2)) | |
379 | ||
8f4acad7 LC |
380 | (define (guile-variant-package-name prefix) |
381 | (lambda (name) | |
382 | "Return NAME with PREFIX instead of \"guile-\", when applicable." | |
383 | (if (string-prefix? "guile-" name) | |
384 | (string-append prefix "-" | |
385 | (string-drop name | |
386 | (string-length "guile-"))) | |
387 | name))) | |
947a5d47 LC |
388 | |
389 | (define package-for-guile-2.2 | |
390 | ;; A procedure that rewrites the dependency tree of the given package to use | |
f6396d86 LC |
391 | ;; GUILE-2.2 instead of GUILE-2.0. |
392 | (package-input-rewriting `((,guile-2.0 . ,guile-2.2)) | |
8f4acad7 LC |
393 | (guile-variant-package-name "guile2.2"))) |
394 | ||
395 | (define package-for-guile-2.0 | |
396 | ;; Likewise, but the other way around. :-) | |
397 | (package-input-rewriting `((,guile-2.2 . ,guile-2.0)) | |
398 | (guile-variant-package-name "guile2.0"))) | |
947a5d47 | 399 | |
4eae7980 | 400 | (define-public guile-for-guile-emacs |
f6396d86 | 401 | (package (inherit guile-2.2) |
4eae7980 LC |
402 | (name "guile-for-guile-emacs") |
403 | (version "20150510.d8d9a8d") | |
f906d30c CAW |
404 | (source (origin |
405 | (method git-fetch) | |
406 | (uri (git-reference | |
4eae7980 LC |
407 | (url "git://git.hcoop.net/git/bpt/guile.git") |
408 | (commit "d8d9a8da05ec876acba81a559798eb5eeceb5a17"))) | |
51988e3a | 409 | (file-name (string-append name "-" version "-checkout")) |
f906d30c CAW |
410 | (sha256 |
411 | (base32 | |
4eae7980 | 412 | "00sprsshy16y8pxjy126hr2adqcvvzzz96hjyjwgg8swva1qh6b0")))) |
f906d30c CAW |
413 | (arguments |
414 | (substitute-keyword-arguments `(;; Tests aren't passing for now. | |
415 | ;; Obviously we should re-enable this! | |
416 | #:tests? #f | |
f6396d86 | 417 | ,@(package-arguments guile-2.2)) |
f906d30c CAW |
418 | ((#:phases phases) |
419 | `(modify-phases ,phases | |
420 | (add-after 'unpack 'autogen | |
421 | (lambda _ | |
422 | (zero? (system* "sh" "autogen.sh")))) | |
423 | (add-before 'autogen 'patch-/bin/sh | |
424 | (lambda _ | |
425 | (substitute* "build-aux/git-version-gen" | |
426 | (("#!/bin/sh") (string-append "#!" (which "sh")))) | |
427 | #t)))))) | |
428 | (native-inputs | |
429 | `(("autoconf" ,autoconf) | |
430 | ("automake" ,automake) | |
431 | ("libtool" ,libtool) | |
432 | ("flex" ,flex) | |
433 | ("texinfo" ,texinfo) | |
b94a6ca0 | 434 | ("gettext" ,gettext-minimal) |
f6396d86 | 435 | ,@(package-native-inputs guile-2.2))) |
daeb61f7 RW |
436 | ;; Same as in guile-2.0 |
437 | (native-search-paths | |
438 | (list (search-path-specification | |
439 | (variable "GUILE_LOAD_PATH") | |
440 | (files '("share/guile/site/2.0"))) | |
441 | (search-path-specification | |
442 | (variable "GUILE_LOAD_COMPILED_PATH") | |
31769b9f | 443 | (files '("lib/guile/2.0/site-ccache" |
daeb61f7 | 444 | "share/guile/site/2.0"))))))) |
be3feafe | 445 | |
71311e4e RW |
446 | ;; There has not been any release yet. |
447 | (define-public guildhall | |
448 | (let ((commit "2fe2cc539f4b811bbcd69e58738db03eb5a2b778") | |
449 | (revision "1")) | |
450 | (package | |
451 | (name "guildhall") | |
452 | (version (string-append "0-" revision "." (string-take commit 9))) | |
453 | (source (origin | |
454 | (method git-fetch) | |
455 | (uri (git-reference | |
456 | (url "https://github.com/ijp/guildhall.git") | |
457 | (commit commit))) | |
458 | (file-name (string-append name "-" version "-checkout")) | |
459 | (sha256 | |
460 | (base32 | |
461 | "115bym7bg66h3gs399yb2vkzc2ygriaqsn4zbrg8f054mgy8wzn1")))) | |
462 | (build-system gnu-build-system) | |
463 | (arguments | |
464 | `(#:phases | |
465 | (modify-phases %standard-phases | |
466 | ;; Tests fail without this fix because they try to load the bash | |
467 | ;; executable as a Scheme file. See bug report at | |
468 | ;; https://github.com/ijp/guildhall/issues/22 | |
469 | (add-after 'unpack 'fix-bug-22 | |
470 | (lambda _ | |
471 | (substitute* "Makefile.am" | |
472 | (("TESTS_ENVIRONMENT=.*") | |
473 | "AM_TESTS_ENVIRONMENT=srcdir=$(abs_top_srcdir)/tests/ | |
474 | TEST_EXTENSIONS = .scm | |
475 | SCM_LOG_COMPILER= $(top_builddir)/env $(GUILE) | |
476 | AM_SCM_LOG_FLAGS = --no-auto-compile -s") | |
477 | ;; FIXME: one of the database tests fails for unknown | |
478 | ;; reasons. It does not fail when run outside of Guix. | |
479 | (("tests/database.scm") "")) | |
480 | #t)) | |
d10092b8 | 481 | (add-after 'fix-bug-22 'autogen |
71311e4e RW |
482 | (lambda _ |
483 | (zero? (system* "sh" "autogen.sh"))))))) | |
484 | (inputs | |
485 | `(("guile" ,guile-2.0))) | |
486 | (native-inputs | |
487 | `(("zip" ,zip) ; for tests | |
488 | ("autoconf" ,autoconf) | |
489 | ("automake" ,automake) | |
490 | ("texinfo" ,texinfo))) | |
491 | (synopsis "Package manager for Guile") | |
492 | (description | |
493 | "Guildhall is a package manager written for Guile Scheme. A guild is | |
494 | an association of independent craftspeople. A guildhall is where they meet. | |
495 | This Guildhall aims to make a virtual space for Guile wizards and journeyfolk | |
496 | to share code. | |
497 | ||
498 | On a practical level, Guildhall lets you share Scheme modules and programs | |
499 | over the internet, and install code that has been shared by others. Guildhall | |
500 | can handle dependencies, so when a program requires several libraries, and | |
501 | each of those has further dependencies, all of the prerequisites for the | |
502 | program can be installed in one go.") | |
503 | (home-page "https://github.com/ijp/guildhall") | |
504 | (license license:gpl3+)))) | |
505 | ||
c44899a2 LC |
506 | \f |
507 | ;;; | |
508 | ;;; Extensions. | |
509 | ;;; | |
510 | ||
7119cca8 | 511 | (define-public artanis |
12235a12 AFN |
512 | (let ((release "0.2.1") |
513 | (revision 3)) | |
514 | (package | |
515 | (name "artanis") | |
516 | (version (if (zero? revision) | |
517 | release | |
518 | (string-append release "-" | |
519 | (number->string revision)))) | |
520 | (source (origin | |
521 | (method url-fetch) | |
522 | (uri (string-append "mirror://gnu/artanis/artanis-" | |
523 | release ".tar.gz")) | |
524 | (file-name (string-append name "-" version ".tar.gz")) | |
525 | (sha256 | |
526 | (base32 | |
527 | "041ajcg2pz918kd9iqcj4inpzddc3impvz3r2nhlpbv8zrz011hn")) | |
528 | (modules '((guix build utils))) | |
529 | (snippet | |
530 | '(begin | |
531 | (delete-file-recursively "artanis/third-party/json.scm") | |
532 | (delete-file-recursively "artanis/third-party/json") | |
533 | (substitute* '("artanis/artanis.scm" | |
534 | "artanis/oht.scm") | |
535 | (("(#:use-module \\()artanis third-party (json\\))" _ | |
536 | use-module json) | |
537 | (string-append use-module json))) | |
538 | (substitute* "artanis/oht.scm" | |
539 | (("([[:punct:][:space:]]+)(->json-string)([[:punct:][:space:]]+)" | |
540 | _ pre json-string post) | |
541 | (string-append pre | |
542 | "scm" json-string | |
543 | post))) | |
544 | (substitute* "artanis/artanis.scm" | |
545 | (("[[:punct:][:space:]]+->json-string[[:punct:][:space:]]+") | |
6cbee49d MW |
546 | "")) |
547 | #t)))) | |
12235a12 AFN |
548 | (build-system gnu-build-system) |
549 | ;; TODO: Add guile-dbi and guile-dbd optional dependencies. | |
550 | (inputs `(("guile" ,guile-2.2) | |
551 | ("guile-json" ,guile-json))) | |
552 | (native-inputs `(("bash" ,bash) ;for the `source' builtin | |
553 | ("pkgconfig" ,pkg-config) | |
554 | ("util-linux" ,util-linux))) ;for the `script' command | |
555 | (arguments | |
556 | '(#:make-flags | |
557 | ;; TODO: The documentation must be built with the `docs' target. | |
558 | (let* ((out (assoc-ref %outputs "out")) | |
559 | (scm (string-append out "/share/guile/site/2.2")) | |
560 | (go (string-append out "/lib/guile/2.2/site-ccache"))) | |
561 | ;; Don't use (%site-dir) for site paths. | |
562 | (list (string-append "MOD_PATH=" scm) | |
563 | (string-append "MOD_COMPILED_PATH=" go))) | |
564 | #:test-target "test" | |
565 | #:phases | |
566 | (modify-phases %standard-phases | |
567 | (add-before 'install 'substitute-root-dir | |
568 | (lambda* (#:key outputs #:allow-other-keys) | |
569 | (let ((out (assoc-ref outputs "out"))) | |
570 | (substitute* "Makefile" ;ignore the execution of bash.bashrc | |
571 | ((" /etc/bash.bashrc") " /dev/null")) | |
572 | (substitute* "Makefile" ;set the root of config files to OUT | |
573 | ((" /etc") (string-append " " out "/etc"))) | |
574 | (mkdir-p (string-append out "/bin")) ;for the `art' executable | |
575 | #t))) | |
576 | (add-after 'install 'wrap-art | |
577 | (lambda* (#:key outputs #:allow-other-keys) | |
578 | (let* ((out (assoc-ref outputs "out")) | |
579 | (bin (string-append out "/bin")) | |
580 | (scm (string-append out "/share/guile/site/2.2")) | |
581 | (go (string-append out "/lib/guile/2.2/site-ccache"))) | |
582 | (wrap-program (string-append bin "/art") | |
583 | `("GUILE_LOAD_PATH" ":" prefix (,scm)) | |
584 | `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,go))) | |
585 | #t)))))) | |
586 | (synopsis "Web application framework written in Guile") | |
587 | (description "GNU Artanis is a web application framework written in Guile | |
7119cca8 ML |
588 | Scheme. A web application framework (WAF) is a software framework that is |
589 | designed to support the development of dynamic websites, web applications, web | |
590 | services and web resources. The framework aims to alleviate the overhead | |
591 | associated with common activities performed in web development. Artanis | |
592 | provides several tools for web development: database access, templating | |
593 | frameworks, session management, URL-remapping for RESTful, page caching, and | |
594 | more.") | |
12235a12 AFN |
595 | (home-page "https://www.gnu.org/software/artanis/") |
596 | (license (list license:gpl3+ license:lgpl3+))))) ;dual license | |
7119cca8 | 597 | |
d6d9f1f7 | 598 | (define-public guile-reader |
1722d680 | 599 | (package |
d6d9f1f7 | 600 | (name "guile-reader") |
77aa0887 | 601 | (version "0.6.2") |
d6d9f1f7 LC |
602 | (source (origin |
603 | (method url-fetch) | |
604 | (uri (string-append "mirror://savannah/guile-reader/guile-reader-" | |
605 | version ".tar.gz")) | |
606 | (sha256 | |
607 | (base32 | |
77aa0887 | 608 | "0592s2s8ampqmqwilc4fvcild6rb9gy79di6vxv5kcdmv23abkgx")))) |
d6d9f1f7 LC |
609 | (build-system gnu-build-system) |
610 | (native-inputs `(("pkgconfig" ,pkg-config) | |
2fa077f3 | 611 | ("gperf" ,gperf-3.0))) |
bdf1022d | 612 | (inputs `(("guile" ,guile-2.2))) |
d6d9f1f7 LC |
613 | (synopsis "Framework for building readers for GNU Guile") |
614 | (description | |
615 | "Guile-Reader is a simple framework for building readers for GNU Guile. | |
1722d680 LC |
616 | |
617 | The idea is to make it easy to build procedures that extend Guile’s read | |
35b9e423 | 618 | procedure. Readers supporting various syntax variants can easily be written, |
1722d680 | 619 | possibly by re-using existing “token readers” of a standard Scheme |
35b9e423 | 620 | readers. For example, it is used to implement Skribilo’s R5RS-derived |
1722d680 LC |
621 | document syntax. |
622 | ||
623 | Guile-Reader’s approach is similar to Common Lisp’s “read table”, but | |
624 | hopefully more powerful and flexible (for instance, one may instantiate as | |
625 | many readers as needed).") | |
340978d7 | 626 | (home-page "https://www.nongnu.org/guile-reader/") |
71e0f217 | 627 | (license license:gpl3+))) |
1722d680 | 628 | |
bdf1022d LC |
629 | (define-public guile2.0-reader |
630 | (package-for-guile-2.0 guile-reader)) | |
517fce63 | 631 | (define-public guile2.2-reader |
bdf1022d | 632 | (deprecated-package "guile2.2-reader" guile-reader)) |
517fce63 | 633 | |
ef02e1e9 LC |
634 | (define-public guile-ncurses |
635 | (package | |
636 | (name "guile-ncurses") | |
958d357a | 637 | (version "2.2") |
ef02e1e9 LC |
638 | (source (origin |
639 | (method url-fetch) | |
640 | (uri (string-append "mirror://gnu/guile-ncurses/guile-ncurses-" | |
641 | version ".tar.gz")) | |
642 | (sha256 | |
643 | (base32 | |
958d357a | 644 | "1wvggbr4xv8idh1hzd8caj4xfp4pln78a7w1wqzd4zgzwmnzxr2f")))) |
ef02e1e9 LC |
645 | (build-system gnu-build-system) |
646 | (inputs `(("ncurses" ,ncurses) | |
81eaa3f8 | 647 | ("guile" ,guile-2.2))) |
0881b616 | 648 | (native-inputs `(("pkg-config" ,pkg-config))) |
ef02e1e9 | 649 | (arguments |
2c6b7c7d | 650 | '(#:configure-flags (list "--with-ncursesw" ; Unicode support |
0881b616 | 651 | "--with-gnu-filesystem-hierarchy") |
fa37f21b EF |
652 | #:phases |
653 | (modify-phases %standard-phases | |
8c4e99cc | 654 | (add-before 'build 'fix-libguile-ncurses-file-name |
fa37f21b | 655 | (lambda* (#:key outputs #:allow-other-keys) |
8c4e99cc JD |
656 | (and (zero? (system* "make" "install" |
657 | "-C" "src/ncurses" | |
658 | "-j" (number->string | |
659 | (parallel-job-count)))) | |
660 | (let* ((out (assoc-ref outputs "out")) | |
661 | (dir "src/ncurses") | |
662 | (files (find-files dir ".scm"))) | |
663 | (substitute* files | |
664 | (("\"libguile-ncurses\"") | |
81eaa3f8 | 665 | (format #f "\"~a/lib/guile/2.2/libguile-ncurses\"" |
8c4e99cc JD |
666 | out))) |
667 | #t))))))) | |
d81850d4 | 668 | (home-page "https://www.gnu.org/software/guile-ncurses/") |
f50d2669 | 669 | (synopsis "Guile bindings to ncurses") |
ef02e1e9 | 670 | (description |
12bcf94a | 671 | "guile-ncurses provides Guile language bindings for the ncurses |
79c311b8 | 672 | library.") |
71e0f217 | 673 | (license license:lgpl3+))) |
ef02e1e9 | 674 | |
4d02e9ff DM |
675 | (define-public guile-ncurses/gpm |
676 | (package | |
677 | (inherit guile-ncurses) | |
678 | (name "guile-ncurses-with-gpm") | |
679 | (inputs `(("ncurses" ,ncurses/gpm) | |
680 | ("guile" ,guile-2.2))))) | |
681 | ||
87d836b2 LC |
682 | (define-public mcron |
683 | (package | |
684 | (name "mcron") | |
67a51b67 | 685 | (version "1.1.1") |
87d836b2 | 686 | (source (origin |
cfbf6de1 LC |
687 | (method url-fetch) |
688 | (uri (string-append "mirror://gnu/mcron/mcron-" | |
689 | version ".tar.gz")) | |
690 | (sha256 | |
691 | (base32 | |
67a51b67 | 692 | "1i9mcp6r6my61zfiydsm3n6my41mwvl7dfala4q29qx0zn1ynlm4")))) |
87d836b2 | 693 | (build-system gnu-build-system) |
cfbf6de1 LC |
694 | (arguments |
695 | '(#:phases (modify-phases %standard-phases | |
696 | (add-before 'check 'set-timezone | |
697 | (lambda* (#:key inputs #:allow-other-keys) | |
67a51b67 LC |
698 | ;; 'tests/job-specifier.scm' expects to be running in |
699 | ;; UTC-2 or something. | |
700 | ;; FIXME: This issue is being investigated upstream, for | |
701 | ;; now we'll just skip the tests (see below): | |
702 | ;; <https://lists.gnu.org/archive/html/bug-mcron/2018-04/msg00005.html>. | |
cfbf6de1 LC |
703 | (let ((tzdata (assoc-ref inputs "tzdata"))) |
704 | (setenv "TZDIR" | |
705 | (string-append tzdata | |
706 | "/share/zoneinfo")) | |
67a51b67 | 707 | (setenv "TZ" "UTC-2") |
cfbf6de1 | 708 | #t))) |
67a51b67 | 709 | (add-before 'check 'adjust-tests |
cfbf6de1 | 710 | (lambda _ |
67a51b67 LC |
711 | (substitute* "tests/job-specifier.scm" |
712 | ;; (getpw) fails with "entry not found" in the build | |
713 | ;; environment, so pass an argument. | |
714 | (("\\(getpw\\)") | |
715 | "(getpwnam (getuid))") | |
716 | ;; The build environment lacks an entry for root in | |
717 | ;; /etc/passwd. | |
718 | (("\\(getpw 0\\)") | |
719 | "(getpwnam \"nobody\")") | |
720 | ||
721 | ;; FIXME: Skip the 4 faulty tests (see above). | |
722 | (("\\(test-equal \"next-year\"" all) | |
723 | (string-append "(test-skip 4)\n" all))) | |
724 | #t))))) | |
cfbf6de1 LC |
725 | (native-inputs `(("pkg-config" ,pkg-config) |
726 | ("tzdata" ,tzdata-for-tests))) | |
727 | (inputs `(("ed" ,ed) ("which" ,which) ("guile" ,guile-2.2))) | |
6fd52309 | 728 | (home-page "https://www.gnu.org/software/mcron/") |
f50d2669 | 729 | (synopsis "Run jobs at scheduled times") |
87d836b2 | 730 | (description |
79c311b8 | 731 | "GNU Mcron is a complete replacement for Vixie cron. It is used to run |
a22dc0c4 | 732 | tasks on a schedule, such as every hour or every Monday. Mcron is written in |
79c311b8 LC |
733 | Guile, so its configuration can be written in Scheme; the original cron |
734 | format is also supported.") | |
71e0f217 | 735 | (license license:gpl3+))) |
87d836b2 | 736 | |
01497dfe | 737 | (define-public mcron2 |
cfbf6de1 LC |
738 | ;; This was mthl's mcron development branch, and it became mcron 1.1. |
739 | (deprecated-package "mcron2" mcron)) | |
01497dfe | 740 | |
dfee30c7 AS |
741 | (define-public guile-hall |
742 | (package | |
743 | (name "guile-hall") | |
744 | (version "0.1.1") | |
745 | (source | |
746 | (origin | |
747 | (method git-fetch) | |
748 | (uri (git-reference | |
749 | (url "https://gitlab.com/a-sassmannshausen/guile-hall") | |
750 | (commit "7d1094a12fe917209ce5b76c681cc8c862d4c65b"))) | |
751 | (file-name "guile-hall-0.1.1-checkout") | |
752 | (sha256 | |
753 | (base32 | |
754 | "03kb09cjca98hlbx9mj12mqinzsnnvp6ci6i975n88pjhaxigyp1")))) | |
755 | (build-system gnu-build-system) | |
756 | (arguments | |
757 | `(#:modules | |
758 | ((ice-9 match) | |
759 | (ice-9 ftw) | |
760 | ,@%gnu-build-system-modules) | |
761 | #:phases | |
762 | (modify-phases | |
763 | %standard-phases | |
764 | (add-after | |
765 | 'install | |
766 | 'hall-wrap-binaries | |
767 | (lambda* (#:key outputs #:allow-other-keys) | |
768 | (let* ((out (assoc-ref outputs "out")) | |
769 | (bin (string-append out "/bin/")) | |
770 | (site (string-append out "/share/guile/site"))) | |
771 | (match (scandir site) | |
772 | (("." ".." version) | |
773 | (let ((modules (string-append site "/" version)) | |
774 | (compiled-modules | |
775 | (string-append | |
776 | out | |
777 | "/lib/guile/" | |
778 | version | |
779 | "/site-ccache"))) | |
780 | (for-each | |
781 | (lambda (file) | |
782 | (wrap-program | |
783 | (string-append bin file) | |
784 | `("GUILE_LOAD_PATH" ":" prefix (,modules)) | |
785 | `("GUILE_LOAD_COMPILED_PATH" | |
786 | ":" | |
787 | prefix | |
788 | (,compiled-modules)))) | |
789 | ,(list 'list "hall")) | |
790 | #t))))))))) | |
791 | (native-inputs | |
792 | `(("autoconf" ,autoconf) | |
793 | ("automake" ,automake) | |
794 | ("pkg-config" ,pkg-config) | |
795 | ("texinfo" ,texinfo))) | |
796 | (inputs `(("guile" ,guile-2.2))) | |
797 | (propagated-inputs | |
798 | `(("guile-config" ,guile-config))) | |
799 | (synopsis "Guile project tooling") | |
800 | (description | |
801 | "Hall is a command-line application and a set of Guile libraries that | |
802 | allow you to quickly create and publish Guile projects. It allows you to | |
803 | transparently support the GNU build system, manage a project hierarchy & | |
804 | provides tight coupling to Guix.") | |
805 | (home-page | |
806 | "https://gitlab.com/a-sassmannshausen/guile-hall") | |
807 | (license license:gpl3+))) | |
808 | ||
814b18e5 AS |
809 | (define-public guile-ics |
810 | (package | |
811 | (name "guile-ics") | |
291c2d57 | 812 | (version "0.2.0") |
814b18e5 AS |
813 | (source (origin |
814 | (method git-fetch) | |
815 | (uri (git-reference | |
816 | (url "https://github.com/artyom-poptsov/guile-ics") | |
291c2d57 | 817 | (commit (string-append "v" version)))) |
814b18e5 AS |
818 | (file-name (string-append name "-" version "-checkout")) |
819 | (sha256 | |
820 | (base32 | |
291c2d57 | 821 | "0qjjvadr7gibdq9jvwkmlkb4afsw9n2shfj9phpiadinxk3p4m2g")))) |
814b18e5 AS |
822 | (build-system gnu-build-system) |
823 | (arguments | |
824 | '(#:phases (modify-phases %standard-phases | |
d10092b8 KK |
825 | (add-after 'unpack 'autoreconf |
826 | (lambda _ | |
827 | ;; Repository comes with a broken symlink | |
828 | (delete-file "README") | |
829 | (symlink "README.org" "README") | |
830 | (zero? (system* "autoreconf" "-fi"))))))) | |
814b18e5 | 831 | (native-inputs |
464f5447 | 832 | `(("autoconf" ,autoconf-wrapper) |
814b18e5 AS |
833 | ("automake" ,automake) |
834 | ("texinfo" ,texinfo) | |
835 | ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'. | |
836 | ("gettext" ,gettext-minimal) | |
837 | ("pkg-config" ,pkg-config))) | |
d573d892 LC |
838 | (inputs `(("guile" ,guile-2.2) ("which" ,which))) |
839 | (propagated-inputs `(("guile-lib" ,guile-lib))) | |
814b18e5 AS |
840 | (home-page "https://github.com/artyom-poptsov/guile-ics") |
841 | (synopsis "Guile parser library for the iCalendar format") | |
842 | (description | |
843 | "Guile-ICS is an iCalendar (RFC5545) format parser library written in | |
844 | pure Scheme. The library can be used to read and write iCalendar data. | |
845 | ||
846 | The library is shipped with documentation in Info format and usage examples.") | |
71e0f217 | 847 | (license license:gpl3+))) |
814b18e5 | 848 | |
3e9066fc LC |
849 | (define-public guile-lib |
850 | (package | |
851 | (name "guile-lib") | |
bf5e9bfc | 852 | (version "0.2.6") |
3e9066fc | 853 | (source (origin |
af126875 MC |
854 | (method url-fetch) |
855 | (uri (string-append "mirror://savannah/guile-lib/guile-lib-" | |
856 | version ".tar.gz")) | |
857 | (sha256 | |
858 | (base32 | |
bf5e9bfc LC |
859 | "0n1lf5bsr5s9gqi07sdfkl1hpin6dzvkcj1xa63jd1w8aglwv8r1")) |
860 | (modules '((guix build utils))) | |
861 | (snippet | |
862 | '(begin | |
863 | ;; 'pre-inst-env' sets an incorrect load path, missing the | |
864 | ;; "/src" bit. Add it. | |
865 | (substitute* "pre-inst-env.in" | |
866 | (("abs_top_(builddir|srcdir)=([[:graph:]]+)" _ dir value) | |
867 | (string-append "abs_top_" dir "=" value "/src"))) | |
868 | #t)))) | |
3e9066fc LC |
869 | (build-system gnu-build-system) |
870 | (arguments | |
af126875 MC |
871 | '(#:make-flags |
872 | '("GUILE_AUTO_COMPILE=0") ;to prevent guild errors | |
873 | #:phases | |
874 | (modify-phases %standard-phases | |
875 | (add-before 'configure 'patch-module-dir | |
876 | (lambda _ | |
877 | (substitute* "src/Makefile.in" | |
878 | (("^moddir = ([[:graph:]]+)") | |
879 | "moddir = $(datadir)/guile/site/@GUILE_EFFECTIVE_VERSION@\n") | |
880 | (("^godir = ([[:graph:]]+)") | |
881 | "godir = \ | |
bf62b8ff | 882 | $(libdir)/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n")) |
af126875 | 883 | #t))))) |
bf62b8ff | 884 | (native-inputs `(("pkg-config" ,pkg-config))) |
1b0f266e | 885 | (inputs `(("guile" ,guile-2.2))) |
340978d7 | 886 | (home-page "https://www.nongnu.org/guile-lib/") |
3e9066fc LC |
887 | (synopsis "Collection of useful Guile Scheme modules") |
888 | (description | |
35b9e423 | 889 | "Guile-Lib is intended as an accumulation place for pure-scheme Guile |
3e9066fc LC |
890 | modules, allowing for people to cooperate integrating their generic Guile |
891 | modules into a coherent library. Think \"a down-scaled, limited-scope CPAN | |
892 | for Guile\".") | |
893 | ||
894 | ;; The whole is under GPLv3+, but some modules are under laxer | |
895 | ;; distribution terms such as LGPL and public domain. See `COPYING' for | |
896 | ;; details. | |
71e0f217 | 897 | (license license:gpl3+))) |
3e9066fc | 898 | |
1b0f266e LC |
899 | (define-public guile2.0-lib |
900 | (package-for-guile-2.0 guile-lib)) | |
901 | ||
12773de3 | 902 | (define-public guile2.2-lib |
1b0f266e | 903 | (deprecated-package "guile2.2-lib" guile-lib)) |
12773de3 | 904 | |
6050a1fb CR |
905 | (define-public guile-json |
906 | (package | |
907 | (name "guile-json") | |
f52ef55e LC |
908 | (version "1.0.1") |
909 | (home-page "https://github.com/aconchillo/guile-json") | |
6050a1fb | 910 | (source (origin |
ffc72ec6 | 911 | (method url-fetch) |
f52ef55e | 912 | (uri (string-append home-page "/archive/" |
ffc72ec6 | 913 | version ".tar.gz")) |
f52ef55e | 914 | (file-name (string-append name "-" version ".tar.gz")) |
ffc72ec6 LC |
915 | (sha256 |
916 | (base32 | |
f52ef55e | 917 | "16155dv30rhagz6dwv7xc87l386i8v0f1kgydqa2ajr166fi9qhr")) |
ffc72ec6 LC |
918 | (modules '((guix build utils))) |
919 | (snippet | |
920 | ;; Make sure everything goes under .../site/X.Y, like Guile's | |
921 | ;; search paths expects. | |
922 | '(begin | |
f52ef55e LC |
923 | (substitute* "configure.ac" |
924 | (("GUILE_PROGS") | |
925 | (string-append "GUILE_PROGS\n" | |
926 | "AC_SUBST([GUILE_EFFECTIVE_VERSION])\n"))) | |
927 | (substitute* '("Makefile.am" "json/Makefile.am") | |
928 | (("moddir[[:blank:]]*=.*/share/guile/site" all) | |
9f0afbae MW |
929 | (string-append all "/@GUILE_EFFECTIVE_VERSION@"))) |
930 | #t)))) | |
6050a1fb | 931 | (build-system gnu-build-system) |
f52ef55e LC |
932 | (native-inputs `(("autoconf" ,autoconf) |
933 | ("automake" ,automake) | |
934 | ("guile" ,guile-2.2))) | |
935 | (inputs `(("guile" ,guile-2.2))) | |
6050a1fb CR |
936 | (synopsis "JSON module for Guile") |
937 | (description | |
0f31d4f0 LC |
938 | "Guile-JSON supports parsing and building JSON documents according to the |
939 | specification. These are the main features: | |
940 | ||
941 | @itemize | |
942 | @item Strictly complies to @uref{http://json.org, specification}. | |
943 | @item Build JSON documents programmatically via macros. | |
944 | @item Unicode support for strings. | |
945 | @item Allows JSON pretty printing. | |
946 | @end itemize\n") | |
71e0f217 | 947 | (license license:lgpl3+))) |
6050a1fb | 948 | |
947a5d47 | 949 | (define-public guile2.2-json |
2252f087 LC |
950 | (deprecated-package "guile2.2-json" guile-json)) |
951 | ||
952 | (define-public guile2.0-json | |
953 | (package-for-guile-2.0 guile-json)) | |
947a5d47 | 954 | |
6bc24063 CAW |
955 | (define-public guile-minikanren |
956 | (package | |
957 | (name "guile-minikanren") | |
958 | (version "20150424.e844d85") | |
959 | (source (origin | |
960 | (method git-fetch) | |
961 | (uri (git-reference | |
962 | (url "https://github.com/ijp/minikanren.git") | |
963 | (commit "e844d85512f8c055d3f96143ee506007389a25e3"))) | |
821f4dc2 | 964 | (file-name (string-append name "-" version "-checkout")) |
6bc24063 CAW |
965 | (sha256 |
966 | (base32 | |
967 | "0r50jlpzi940jlmxyy3ddqqwmj5r12gb4bcv0ssini9v8km13xz6")))) | |
968 | (build-system trivial-build-system) | |
969 | (arguments | |
4b74a29d | 970 | `(#:modules ((guix build utils)) |
6bc24063 CAW |
971 | #:builder |
972 | (begin | |
973 | (use-modules (guix build utils) | |
4b74a29d LC |
974 | (ice-9 match) |
975 | (ice-9 popen) | |
976 | (ice-9 rdelim)) | |
977 | ||
6bc24063 | 978 | (let* ((out (assoc-ref %outputs "out")) |
4b74a29d LC |
979 | (guile (assoc-ref %build-inputs "guile")) |
980 | (effective (read-line | |
981 | (open-pipe* OPEN_READ | |
982 | (string-append guile "/bin/guile") | |
983 | "-c" "(display (effective-version))"))) | |
984 | (module-dir (string-append out "/share/guile/site/" | |
985 | effective)) | |
6bc24063 | 986 | (source (assoc-ref %build-inputs "source")) |
f3d8cd79 | 987 | (doc (string-append out "/share/doc/guile-minikanren")) |
6bc24063 CAW |
988 | (scm-files '("minikanren.scm" |
989 | "minikanren/mkextraforms.scm" | |
990 | "minikanren/mkprelude.scm" | |
991 | "minikanren/mk.scm")) | |
992 | (guild (string-append (assoc-ref %build-inputs "guile") | |
993 | "/bin/guild"))) | |
994 | ;; Make installation directories. | |
995 | (mkdir-p (string-append module-dir "/minikanren")) | |
996 | (mkdir-p doc) | |
997 | ||
998 | ;; Compile .scm files and install. | |
999 | (chdir source) | |
1000 | (setenv "GUILE_AUTO_COMPILE" "0") | |
1001 | (for-each (lambda (file) | |
1002 | (let* ((dest-file (string-append module-dir "/" | |
76e6e663 | 1003 | file)) |
6bc24063 CAW |
1004 | (go-file (match (string-split file #\.) |
1005 | ((base _) | |
1006 | (string-append module-dir "/" | |
1007 | base ".go"))))) | |
1008 | ;; Install source module. | |
1009 | (copy-file file dest-file) | |
1010 | ;; Install compiled module. | |
e3cfef22 MW |
1011 | (invoke guild "compile" |
1012 | "-L" source | |
1013 | "-o" go-file | |
1014 | file))) | |
6bc24063 CAW |
1015 | scm-files) |
1016 | ||
1017 | ;; Also copy over the README. | |
96c46210 | 1018 | (install-file "README.org" doc) |
e3cfef22 | 1019 | |
6bc24063 CAW |
1020 | #t)))) |
1021 | (inputs | |
d58ee08d | 1022 | `(("guile" ,guile-2.2))) |
6bc24063 | 1023 | (home-page "https://github.com/ijp/minikanren") |
e881752c | 1024 | (synopsis "MiniKanren declarative logic system, packaged for Guile") |
6bc24063 CAW |
1025 | (description |
1026 | "MiniKanren is a relational programming extension to the Scheme | |
1027 | programming Language, written as a smaller version of Kanren suitable for | |
1028 | pedagogical purposes. It is featured in the book, The Reasoned Schemer, | |
1029 | written by Dan Friedman, William Byrd, and Oleg Kiselyov. | |
1030 | ||
e881752c | 1031 | This is Ian Price's r6rs packaged version of miniKanren, which deviates |
6bc24063 CAW |
1032 | slightly from miniKanren mainline. |
1033 | ||
1034 | See http://minikanren.org/ for more on miniKanren generally.") | |
71e0f217 | 1035 | (license license:expat))) |
6bc24063 | 1036 | |
d58ee08d LC |
1037 | (define-public guile2.0-minikanren |
1038 | (package-for-guile-2.0 guile-minikanren)) | |
1039 | ||
947a5d47 | 1040 | (define-public guile2.2-minikanren |
d58ee08d | 1041 | (deprecated-package "guile2.2-minikanren" guile-minikanren)) |
947a5d47 | 1042 | |
28a1041f AP |
1043 | (define-public guile-miniadapton |
1044 | (let ((commit "1b5749422304567c96ac5367f2221dda9eff5880") | |
1045 | (revision "1")) | |
1046 | (package | |
1047 | (name "guile-miniadapton") | |
1048 | (version (string-append "0-" revision "." (string-take commit 9))) | |
1049 | (source (origin | |
1050 | (method git-fetch) | |
1051 | (uri (git-reference | |
1052 | (url "https://github.com/fisherdj/miniAdapton.git") | |
1053 | (commit commit))) | |
1054 | (file-name (string-append name "-" version "-checkout")) | |
1055 | (sha256 | |
1056 | (base32 | |
1057 | "09q51zkw2fypad5xixskfzw2cjhjgs5cswdp3i7cpp651rb3zndh")))) | |
1058 | (build-system gnu-build-system) | |
1059 | (arguments | |
1060 | `(#:modules ((guix build utils) | |
1061 | (ice-9 popen) | |
1062 | (ice-9 rdelim) | |
1063 | (srfi srfi-1) | |
1064 | (guix build gnu-build-system)) | |
1065 | #:tests? #f ; there is no test target | |
1066 | #:phases | |
1067 | (modify-phases %standard-phases | |
1068 | (delete 'configure) | |
1069 | (delete 'build) | |
1070 | (replace 'install | |
1071 | (lambda* (#:key outputs #:allow-other-keys) | |
1072 | (let* ((cwd (getcwd)) | |
1073 | (scm-files (find-files "." "\\.scm$")) | |
1074 | (effective (read-line | |
1075 | (open-pipe* OPEN_READ | |
1076 | "guile" "-c" | |
1077 | "(display (effective-version))"))) | |
1078 | (module-dir (string-append (assoc-ref outputs "out") | |
1079 | "/share/guile/site/" | |
1080 | effective))) | |
1081 | ||
1082 | ;; Make installation directories. | |
1083 | (mkdir-p module-dir) | |
1084 | ||
1085 | (setenv "GUILE_AUTO_COMPILE" "0") | |
1086 | ||
1087 | ;; Compile .scm files and install. | |
1088 | (every (lambda (file) | |
1089 | (let ((go-file (string-append module-dir "/" | |
1090 | (basename file ".scm") ".go"))) | |
1091 | ;; Install source module. | |
1092 | (install-file file module-dir) | |
1093 | ;; Compile and install module. | |
1094 | (zero? (system* "guild" "compile" "-L" cwd | |
1095 | "-o" go-file file)))) | |
1096 | scm-files))))))) | |
1097 | (inputs | |
1098 | `(("guile" ,guile-2.2))) | |
1099 | (home-page "https://github.com/fisherdj/miniAdapton") | |
1100 | (synopsis "Minimal implementation of incremental computation in Guile | |
1101 | Scheme") | |
1102 | (description "This package provides a complete Scheme implementation of | |
1103 | miniAdapton, which implements the core functionality of the Adapton system for | |
1104 | incremental computation (also known as self-adjusting computation). Like | |
1105 | Adapton, miniAdapton allows programmers to safely combine mutation and | |
1106 | memoization. miniAdapton is built on top of an even simpler system, | |
1107 | microAdapton. Both miniAdapton and microAdapton are designed to be easy to | |
1108 | understand, extend, and port to host languages other than Scheme.") | |
1109 | (license license:expat)))) | |
1110 | ||
32e14fc1 CAW |
1111 | (define-public guile-irregex |
1112 | (package | |
1113 | (name "guile-irregex") | |
fb73f07a | 1114 | (version "0.9.6") |
32e14fc1 CAW |
1115 | (source (origin |
1116 | (method url-fetch) | |
1117 | (uri (string-append | |
1118 | "http://synthcode.com/scheme/irregex/irregex-" | |
d03f9446 | 1119 | version ".tar.gz")) |
32e14fc1 CAW |
1120 | (sha256 |
1121 | (base32 | |
fb73f07a | 1122 | "1ia3m7dp3lcxa048q0gqbiwwsyvn99baw6xkhb4bhhzn4k7bwyqq")))) |
32e14fc1 CAW |
1123 | (build-system gnu-build-system) |
1124 | (arguments | |
1125 | `(#:modules ((guix build utils) | |
1126 | (ice-9 match) | |
fe447664 LC |
1127 | (ice-9 rdelim) |
1128 | (ice-9 popen) | |
32e14fc1 CAW |
1129 | (guix build gnu-build-system)) |
1130 | #:phases | |
1131 | (modify-phases %standard-phases | |
32e14fc1 CAW |
1132 | (delete 'configure) |
1133 | (delete 'build) | |
1134 | (delete 'check) | |
1135 | (replace 'install | |
1136 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
fe447664 LC |
1137 | (let* ((out (assoc-ref outputs "out")) |
1138 | (effective (read-line | |
1139 | (open-pipe* OPEN_READ | |
1140 | "guile" "-c" | |
1141 | "(display (effective-version))"))) | |
1142 | (module-dir (string-append out "/share/guile/site/" | |
1143 | effective)) | |
1144 | (source (assoc-ref inputs "source")) | |
1145 | (doc (string-append out "/share/doc/guile-irregex/")) | |
1146 | (guild (string-append (assoc-ref %build-inputs "guile") | |
1147 | "/bin/guild"))) | |
1148 | ;; Make installation directories. | |
1149 | (mkdir-p (string-append module-dir "/rx/source")) | |
1150 | (mkdir-p doc) | |
1151 | ||
1152 | ;; Compile .scm files and install. | |
1153 | (setenv "GUILE_AUTO_COMPILE" "0") | |
1154 | ||
1155 | (for-each (lambda (copy-info) | |
1156 | (match copy-info | |
1157 | ((src-file dest-file-basis) | |
1158 | (let* ((dest-file (string-append | |
32e14fc1 | 1159 | module-dir dest-file-basis |
fe447664 LC |
1160 | ".scm")) |
1161 | (go-file (string-append | |
1162 | module-dir dest-file-basis | |
1163 | ".go"))) | |
1164 | ;; Install source module. | |
1165 | (copy-file src-file | |
1166 | dest-file) | |
1167 | ;; Install compiled module. | |
67eb6f50 MW |
1168 | (invoke guild "compile" |
1169 | "-L" (getcwd) | |
1170 | "-o" go-file | |
1171 | src-file))))) | |
fe447664 LC |
1172 | '(("irregex-guile.scm" "/rx/irregex") |
1173 | ("irregex.scm" "/rx/source/irregex") | |
1174 | ;; Not really reachable via guile's packaging system, | |
1175 | ;; but nice to have around | |
1176 | ("irregex-utils.scm" "/rx/source/irregex-utils"))) | |
1177 | ||
1178 | ;; Also copy over the README. | |
1179 | (install-file "irregex.html" doc) | |
1180 | #t)))))) | |
32e14fc1 | 1181 | (inputs |
2863860b | 1182 | `(("guile" ,guile-2.2))) |
32e14fc1 CAW |
1183 | (home-page "http://synthcode.com/scheme/irregex") |
1184 | (synopsis "S-expression based regular expressions") | |
1185 | (description | |
1186 | "Irregex is an s-expression based alternative to your classic | |
1187 | string-based regular expressions. It implements SRFI 115 and is deeply | |
1188 | inspired by the SCSH regular expression system.") | |
71e0f217 | 1189 | (license license:bsd-3))) |
93e7199b | 1190 | |
2863860b LC |
1191 | (define-public guile2.0-irregex |
1192 | (package-for-guile-2.0 guile-irregex)) | |
1193 | ||
947a5d47 | 1194 | (define-public guile2.2-irregex |
2863860b | 1195 | (deprecated-package "guile2.2-irregex" guile-irregex)) |
947a5d47 | 1196 | |
93e7199b CAW |
1197 | ;; There are two guile-gdbm packages, one using the FFI and one with |
1198 | ;; direct C bindings, hence the verbose name. | |
1199 | ||
1200 | (define-public guile-gdbm-ffi | |
1201 | (package | |
1202 | (name "guile-gdbm-ffi") | |
1203 | (version "20120209.fa1d5b6") | |
1204 | (source (origin | |
1205 | (method git-fetch) | |
1206 | (uri (git-reference | |
1207 | (url "https://github.com/ijp/guile-gdbm.git") | |
1208 | (commit "fa1d5b6231d0e4d096687b378c025f2148c5f246"))) | |
821f4dc2 | 1209 | (file-name (string-append name "-" version "-checkout")) |
93e7199b CAW |
1210 | (sha256 |
1211 | (base32 | |
1212 | "1j8wrsw7v9w6qkl47xz0rdikg50v16nn6kbs3lgzcymjzpa7babj")))) | |
1213 | (build-system trivial-build-system) | |
56f31a9f MW |
1214 | (inputs |
1215 | `(("guile" ,guile-2.2) | |
1216 | ;; patch-and-repack doesn't work for git checkouts, | |
1217 | ;; so we must apply the patch manually. | |
1218 | ("patch" ,patch) | |
1219 | ("patch-file" ,(search-patch | |
1220 | "guile-gdbm-ffi-support-gdbm-1.14.patch")))) | |
1221 | (propagated-inputs | |
1222 | `(("gdbm" ,gdbm))) | |
93e7199b CAW |
1223 | (arguments |
1224 | `(#:modules | |
1225 | ((guix build utils)) | |
1226 | #:builder | |
1227 | (begin | |
1228 | (use-modules (guix build utils) | |
a5bd6a5e CAW |
1229 | (ice-9 rdelim) |
1230 | (ice-9 popen)) | |
1231 | ||
1232 | ;; Avoid warnings we can safely ignore | |
1233 | (setenv "GUILE_AUTO_COMPILE" "0") | |
93e7199b CAW |
1234 | |
1235 | (let* ((out (assoc-ref %outputs "out")) | |
a5bd6a5e CAW |
1236 | (effective-version |
1237 | (read-line | |
1238 | (open-pipe* OPEN_READ | |
1239 | (string-append | |
1240 | (assoc-ref %build-inputs "guile") | |
1241 | "/bin/guile") | |
1242 | "-c" "(display (effective-version))"))) | |
1243 | (module-dir (string-append out "/share/guile/site/" | |
1244 | effective-version)) | |
93e7199b CAW |
1245 | (source (assoc-ref %build-inputs "source")) |
1246 | (doc (string-append out "/share/doc")) | |
1247 | (guild (string-append (assoc-ref %build-inputs "guile") | |
1248 | "/bin/guild")) | |
1249 | (gdbm.scm-dest | |
1250 | (string-append module-dir "/gdbm.scm")) | |
1251 | (gdbm.go-dest | |
a5bd6a5e CAW |
1252 | (string-append module-dir "/gdbm.go")) |
1253 | (compile-file | |
1254 | (lambda (in-file out-file) | |
07e36357 | 1255 | (invoke guild "compile" "-o" out-file in-file)))) |
93e7199b CAW |
1256 | ;; Switch directory for compiling and installing |
1257 | (chdir source) | |
1258 | ||
4168ddf6 TGR |
1259 | ;; Install the documentation. |
1260 | (install-file "README.md" doc) | |
1261 | (copy-recursively "examples" (string-append doc "/examples")) | |
1262 | ||
1263 | ;; Make installation directories. | |
1264 | (mkdir-p module-dir) | |
1265 | ||
93e7199b CAW |
1266 | ;; copy the source |
1267 | (copy-file "gdbm.scm" gdbm.scm-dest) | |
1268 | ||
1269 | ;; Patch the FFI | |
1270 | (substitute* gdbm.scm-dest | |
1271 | (("\\(dynamic-link \"libgdbm\"\\)") | |
1272 | (format #f "(dynamic-link \"~a/lib/libgdbm.so\")" | |
1273 | (assoc-ref %build-inputs "gdbm")))) | |
1274 | ||
56f31a9f MW |
1275 | ;; Apply the patch to add support for gdbm-1.14. |
1276 | (let ((patch-command (string-append (assoc-ref %build-inputs "patch") | |
1277 | "/bin/patch")) | |
1278 | (patch-file (assoc-ref %build-inputs "patch-file"))) | |
1279 | (with-directory-excursion (dirname gdbm.scm-dest) | |
1280 | (format #t "applying '~a'...~%" patch-file) | |
1281 | (invoke patch-command "--force" "--input" patch-file))) | |
1282 | ||
93e7199b | 1283 | ;; compile to the destination |
e3cfef22 MW |
1284 | (compile-file gdbm.scm-dest gdbm.go-dest) |
1285 | ||
1286 | #t)))) | |
93e7199b CAW |
1287 | (home-page "https://github.com/ijp/guile-gdbm") |
1288 | (synopsis "Guile bindings to the GDBM library via Guile's FFI") | |
1289 | (description | |
1290 | "Guile bindings to the GDBM key-value storage system, using | |
1291 | Guile's foreign function interface.") | |
71e0f217 | 1292 | (license license:gpl3+))) |
93e7199b | 1293 | |
5bd3a841 LC |
1294 | (define-public guile2.0-gdbm-ffi |
1295 | (package-for-guile-2.0 guile-gdbm-ffi)) | |
1296 | ||
2737bcff | 1297 | (define-public guile2.2-gdbm-ffi |
5bd3a841 | 1298 | (deprecated-package "guile2.2-gdbm-ffi" guile-gdbm-ffi)) |
93e7199b | 1299 | |
e8ac1f8f | 1300 | (define-public guile-sqlite3 |
319e26e4 LC |
1301 | (package |
1302 | (name "guile-sqlite3") | |
1303 | (version "0.1.0") | |
1304 | (home-page "https://notabug.org/civodul/guile-sqlite3.git") | |
1305 | (source (origin | |
1306 | (method git-fetch) | |
1307 | (uri (git-reference | |
1308 | (url home-page) | |
1309 | (commit (string-append "v" version)))) | |
1310 | (sha256 | |
1311 | (base32 | |
1312 | "1nv8j7wk6b5n4p22szyi8lv8fs31rrzxhzz16gyj8r38c1fyp9qp")) | |
1313 | (file-name (string-append name "-" version "-checkout")))) | |
1314 | (build-system gnu-build-system) | |
1315 | (native-inputs | |
1316 | `(("autoconf" ,autoconf) | |
1317 | ("automake" ,automake) | |
1318 | ("pkg-config" ,pkg-config))) | |
1319 | (inputs | |
1320 | `(("guile" ,guile-2.2) | |
1321 | ("sqlite" ,sqlite))) | |
1322 | (synopsis "Access SQLite databases from Guile") | |
1323 | (description | |
1324 | "This package provides Guile bindings to the SQLite database system.") | |
1325 | (license license:gpl3+))) | |
e8ac1f8f | 1326 | |
27f5e13e DT |
1327 | (define-public haunt |
1328 | (package | |
1329 | (name "haunt") | |
907254e5 | 1330 | (version "0.2.2") |
27f5e13e DT |
1331 | (source (origin |
1332 | (method url-fetch) | |
4960beaa | 1333 | (uri (string-append "https://files.dthompson.us/haunt/haunt-" |
27f5e13e DT |
1334 | version ".tar.gz")) |
1335 | (sha256 | |
1336 | (base32 | |
907254e5 | 1337 | "0nm00krmqq4zmqi2irh35dbf2cn6al58s620hijmhfvhgvdqznlp")))) |
27f5e13e | 1338 | (build-system gnu-build-system) |
4ecbf6d2 LC |
1339 | (arguments |
1340 | `(#:modules ((ice-9 match) (ice-9 ftw) | |
1341 | ,@%gnu-build-system-modules) | |
1e406301 | 1342 | #:tests? #f ; test suite is non-deterministic :( |
4ecbf6d2 LC |
1343 | #:phases (modify-phases %standard-phases |
1344 | (add-after 'install 'wrap-haunt | |
1345 | (lambda* (#:key outputs #:allow-other-keys) | |
1346 | ;; Wrap the 'haunt' command to refer to the right | |
1347 | ;; modules. | |
1348 | (let* ((out (assoc-ref outputs "out")) | |
1349 | (bin (string-append out "/bin")) | |
1350 | (site (string-append | |
1351 | out "/share/guile/site"))) | |
1352 | (match (scandir site) | |
1353 | (("." ".." version) | |
907254e5 DT |
1354 | (let ((modules (string-append site "/" version)) |
1355 | (compiled-modules (string-append | |
1356 | out "/lib/guile/" version | |
1357 | "/site-ccache"))) | |
4ecbf6d2 LC |
1358 | (wrap-program (string-append bin "/haunt") |
1359 | `("GUILE_LOAD_PATH" ":" prefix | |
1360 | (,modules)) | |
1361 | `("GUILE_LOAD_COMPILED_PATH" ":" prefix | |
907254e5 | 1362 | (,compiled-modules))) |
4ecbf6d2 | 1363 | #t))))))))) |
4960beaa DT |
1364 | (native-inputs |
1365 | `(("pkg-config" ,pkg-config) | |
1366 | ("texinfo" ,texinfo))) | |
27f5e13e | 1367 | (inputs |
bd19f65a | 1368 | `(("guile" ,guile-2.2))) |
4960beaa | 1369 | (propagated-inputs |
9b1a497e AP |
1370 | `(("guile-reader" ,guile-reader) |
1371 | ("guile-commonmark" ,guile-commonmark))) | |
27f5e13e DT |
1372 | (synopsis "Functional static site generator") |
1373 | (description "Haunt is a static site generator written in Guile | |
1374 | Scheme. Haunt features a functional build system and an extensible | |
1375 | interface for reading articles in any format.") | |
1376 | (home-page "http://haunt.dthompson.us") | |
71e0f217 | 1377 | (license license:gpl3+))) |
27f5e13e | 1378 | |
bd19f65a LC |
1379 | (define-public guile2.0-haunt |
1380 | (package-for-guile-2.0 | |
1381 | (package (inherit haunt) (name "guile2.0-haunt")))) | |
64f34aef | 1382 | (define-public guile2.2-haunt |
bd19f65a | 1383 | (deprecated-package "guile2.2-haunt" haunt)) |
64f34aef | 1384 | |
44a2bdf8 AS |
1385 | (define-public guile-config |
1386 | (package | |
1387 | (name "guile-config") | |
7c6468c9 AS |
1388 | (version "0.3") |
1389 | (source | |
1390 | (origin | |
1391 | (method git-fetch) | |
1392 | (uri (git-reference | |
1393 | (url "https://gitlab.com/a-sassmannshausen/guile-config") | |
1394 | (commit "ce12de3f438c6b2b59c43ee21bcd58251835fdf3"))) | |
1395 | (file-name "guile-config-0.3-checkout") | |
1396 | (sha256 (base32 "02zbpin0r9m2vxmr7mv68v3xdn247dcck56kbzjn0gj4c2rhih85")))) | |
44a2bdf8 | 1397 | (build-system gnu-build-system) |
43d5df98 AS |
1398 | (native-inputs |
1399 | `(("autoconf" ,autoconf) | |
1400 | ("automake" ,automake) | |
1401 | ("pkg-config" ,pkg-config) | |
1402 | ("texinfo" ,texinfo))) | |
7c6468c9 AS |
1403 | (inputs `(("guile" ,guile-2.2))) |
1404 | (synopsis | |
1405 | "Guile application configuration parsing library.") | |
44a2bdf8 AS |
1406 | (description |
1407 | "Guile Config is a library providing a declarative approach to | |
1408 | application configuration specification. The library provides clean | |
1409 | configuration declaration forms, and processors that take care of: | |
1410 | configuration file creation; configuration file parsing; command-line | |
1411 | parameter parsing using getopt-long; basic GNU command-line parameter | |
1412 | generation (--help, --usage, --version); automatic output generation for the | |
1413 | above command-line parameters.") | |
7c6468c9 AS |
1414 | (home-page |
1415 | "https://gitlab.com/a-sassmannshausen/guile-config") | |
43d5df98 | 1416 | (license license:gpl3+))) |
44a2bdf8 | 1417 | |
36548111 DT |
1418 | (define-public guile-redis |
1419 | (package | |
1420 | (name "guile-redis") | |
1421 | (version "0.1.0") | |
1422 | (source (origin | |
1423 | (method url-fetch) | |
1424 | (uri (string-append "mirror://savannah/guile-redis/guile-redis-" | |
1425 | version ".tar.gz")) | |
1426 | (sha256 | |
1427 | (base32 | |
1428 | "0vx6if6b4r3kwx64vzbs6vpc0cpcr85x11w9vkzq27gw8n7isv56")) | |
1429 | (modules '((guix build utils))) | |
1430 | (snippet | |
ea833d30 | 1431 | ;; Make sure everything goes under .../site/X.Y, like Guile's |
36548111 | 1432 | ;; search paths expects. |
ea833d30 RW |
1433 | '(begin |
1434 | (substitute* "configure" | |
1435 | (("ac_subst_vars='") | |
1436 | "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n")) | |
1437 | (substitute* '("Makefile.in" | |
1438 | "redis/Makefile.in" | |
1439 | "redis/commands/Makefile.in") | |
1440 | (("moddir =.*/share/guile/site" all) | |
6cbee49d MW |
1441 | (string-append all "/@GUILE_EFFECTIVE_VERSION@"))) |
1442 | #t)))) | |
36548111 DT |
1443 | (build-system gnu-build-system) |
1444 | (native-inputs | |
d5eacecc | 1445 | `(("guile" ,guile-2.2))) |
340978d7 | 1446 | (home-page "https://savannah.nongnu.org/projects/guile-redis/") |
36548111 DT |
1447 | (synopsis "Redis client library for Guile") |
1448 | (description "Guile-redis provides a Scheme interface to the Redis | |
1449 | key-value cache and store.") | |
71e0f217 | 1450 | (license license:lgpl3+))) |
36548111 | 1451 | |
d5eacecc LC |
1452 | (define-public guile2.0-redis |
1453 | (package-for-guile-2.0 guile-redis)) | |
1454 | ||
85313be8 | 1455 | (define-public guile2.2-redis |
d5eacecc | 1456 | (deprecated-package "guile2.2-redis" guile-redis)) |
85313be8 | 1457 | |
9d373377 CAW |
1458 | (define-public guile-wisp |
1459 | (package | |
1460 | (name "guile-wisp") | |
e0840905 | 1461 | (version "0.9.8") |
9d373377 CAW |
1462 | (source (origin |
1463 | (method url-fetch) | |
1464 | (uri (string-append "https://bitbucket.org/ArneBab/" | |
1465 | "wisp/downloads/wisp-" | |
1466 | version ".tar.gz")) | |
1467 | (sha256 | |
1468 | (base32 | |
e0840905 | 1469 | "1f2bbicq1rxnwmiplrm4r75wj06w385mjkyvi7g4k740bgwcrzxr")))) |
9d373377 CAW |
1470 | (build-system gnu-build-system) |
1471 | (arguments | |
e8374e69 LC |
1472 | `(#:modules ((guix build gnu-build-system) |
1473 | (guix build utils) | |
1474 | (ice-9 rdelim) | |
1475 | (ice-9 popen)) | |
1476 | ||
9d373377 CAW |
1477 | #:phases |
1478 | (modify-phases %standard-phases | |
e0840905 | 1479 | (add-before 'configure 'substitute-before-config |
9d373377 CAW |
1480 | |
1481 | (lambda* (#:key inputs #:allow-other-keys) | |
1482 | (let ((bash (assoc-ref inputs "bash"))) | |
9d373377 CAW |
1483 | ;; Puts together some test files with /bin/bash hardcoded |
1484 | (substitute* "Makefile.in" | |
e0840905 LC |
1485 | (("/usr/bin/env bash") |
1486 | (string-append bash "/bin/bash")) | |
1487 | (("\\$\\(GUILE_EFFECTIVE_VERSION\\)/site") | |
1488 | "site/$(GUILE_EFFECTIVE_VERSION)")) ;use the right order | |
9d373377 CAW |
1489 | #t))) |
1490 | ||
1491 | ;; auto compilation breaks, but if we set HOME to /tmp, | |
1492 | ;; that works ok | |
1493 | (add-before | |
1494 | 'check 'auto-compile-hacky-workaround | |
1495 | (lambda _ | |
1496 | (setenv "HOME" "/tmp") | |
1497 | #t)) | |
e0840905 | 1498 | (add-after 'install 'install-go-files |
9d373377 CAW |
1499 | (lambda* (#:key outputs inputs #:allow-other-keys) |
1500 | (let* ((out (assoc-ref outputs "out")) | |
e8374e69 LC |
1501 | (effective (read-line |
1502 | (open-pipe* OPEN_READ | |
1503 | "guile" "-c" | |
1504 | "(display (effective-version))"))) | |
1505 | (module-dir (string-append out "/share/guile/site/" | |
1506 | effective)) | |
1507 | (object-dir (string-append out "/lib/guile/" effective | |
1508 | "/site-ccache")) | |
1509 | (prefix (string-length module-dir))) | |
9d373377 | 1510 | ;; compile to the destination |
e0840905 | 1511 | (for-each (lambda (file) |
e8374e69 LC |
1512 | (let* ((base (string-drop (string-drop-right file 4) |
1513 | prefix)) | |
1514 | (go (string-append object-dir base ".go"))) | |
1515 | (invoke "guild" "compile" "-L" module-dir | |
1516 | file "-o" go))) | |
e0840905 | 1517 | (find-files module-dir "\\.scm$")) |
9d373377 CAW |
1518 | #t)))))) |
1519 | (home-page "http://draketo.de/english/wisp") | |
1520 | (inputs | |
89c4bfe7 | 1521 | `(("guile" ,guile-2.2))) |
e0840905 LC |
1522 | (native-inputs |
1523 | `(("python" ,python) | |
1524 | ("pkg-config" ,pkg-config))) | |
a124bbd2 SB |
1525 | (synopsis "Whitespace to lisp syntax for Guile") |
1526 | (description "Wisp is a syntax for Guile which provides a Python-like | |
9d373377 CAW |
1527 | whitespace-significant language. It may be easier on the eyes for some |
1528 | users and in some situations.") | |
71e0f217 | 1529 | (license license:gpl3+))) |
9d373377 | 1530 | |
5649c8cd DT |
1531 | (define-public guile-sly |
1532 | (package | |
1533 | (name "guile-sly") | |
1534 | (version "0.1") | |
1535 | (source (origin | |
1536 | (method url-fetch) | |
8d5e7ad2 | 1537 | (uri (string-append "https://files.dthompson.us/sly/sly-" |
5649c8cd DT |
1538 | version ".tar.gz")) |
1539 | (sha256 | |
1540 | (base32 | |
44394ef9 LC |
1541 | "1svzlbz2vripmyq2kjh0rig16bsrnbkwbsm558pjln9l65mcl4qq")) |
1542 | (modules '((guix build utils))) | |
1543 | (snippet | |
1544 | '(begin | |
1545 | (substitute* "configure" | |
1546 | (("_guile_required_version=\"2.0.11\"") | |
1547 | "_guile_required_version=\"2\"") | |
1548 | (("ac_subst_vars='") | |
1549 | "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n")) | |
1550 | (substitute* (find-files "." "Makefile.in") | |
1551 | (("moddir = .*$") | |
1552 | (string-append | |
1553 | "moddir = " | |
1554 | "$(prefix)/share/guile/site/@GUILE_EFFECTIVE_VERSION@\n")) | |
1555 | (("godir = .*$") | |
1556 | (string-append | |
1557 | "godir = " | |
6cbee49d MW |
1558 | "$(prefix)/lib/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n"))) |
1559 | #t)))) | |
5649c8cd DT |
1560 | (build-system gnu-build-system) |
1561 | (arguments | |
1562 | '(#:configure-flags | |
1563 | (list (string-append "--with-libfreeimage-prefix=" | |
1564 | (assoc-ref %build-inputs "freeimage")) | |
1565 | (string-append "--with-libgslcblas-prefix=" | |
1566 | (assoc-ref %build-inputs "gsl"))))) | |
1567 | (native-inputs | |
1568 | `(("pkg-config" ,pkg-config))) | |
1569 | (propagated-inputs | |
2e7825bc | 1570 | `(("guile-sdl" ,guile-sdl) |
5649c8cd DT |
1571 | ("guile-opengl" ,guile-opengl))) |
1572 | (inputs | |
2e7825bc LC |
1573 | `(("guile" ,guile-2.2) |
1574 | ("gsl" ,gsl) | |
5649c8cd DT |
1575 | ("freeimage" ,freeimage) |
1576 | ("mesa" ,mesa))) | |
1577 | (synopsis "2D/3D game engine for GNU Guile") | |
1578 | (description "Sly is a 2D/3D game engine written in Guile Scheme. Sly | |
1579 | features a functional reactive programming interface and live coding | |
1580 | capabilities.") | |
0eb3b8c0 | 1581 | (home-page "https://dthompson.us/projects/sly.html") |
71e0f217 | 1582 | (license license:gpl3+))) |
5649c8cd | 1583 | |
dec1e2b3 AB |
1584 | (define-public g-wrap |
1585 | (package | |
1586 | (name "g-wrap") | |
1587 | (version "1.9.15") | |
1588 | (source (origin | |
1589 | (method url-fetch) | |
1590 | (uri (string-append "mirror://savannah/g-wrap/g-wrap-" | |
1591 | version ".tar.gz")) | |
1592 | (sha256 | |
1593 | (base32 | |
1594 | "0ak0bha37dfpj9kmyw1r8fj8nva639aw5xr66wr5gd3l1rqf5xhg")))) | |
1595 | (build-system gnu-build-system) | |
1596 | (native-inputs | |
1597 | `(("pkg-config" ,pkg-config))) | |
1598 | (propagated-inputs | |
61583094 | 1599 | `(("guile" ,guile-2.2) |
dec1e2b3 AB |
1600 | ("guile-lib" ,guile-lib))) |
1601 | (inputs | |
1602 | `(("libffi" ,libffi))) | |
9e8599a3 | 1603 | (arguments |
61583094 TF |
1604 | `(#:configure-flags '("--disable-Werror") |
1605 | #:phases | |
1606 | (modify-phases %standard-phases | |
1607 | (add-before 'configure 'pre-configure | |
1608 | (lambda* (#:key outputs #:allow-other-keys) | |
1609 | (let ((out (assoc-ref outputs "out"))) | |
1610 | (substitute* (find-files "." "^Makefile.in$") | |
1611 | (("guilemoduledir =.*guile/site" all) | |
1612 | (string-append all "/@GUILE_EFFECTIVE_VERSION@"))) | |
1613 | #t)))))) | |
dec1e2b3 AB |
1614 | (synopsis "Generate C bindings for Guile") |
1615 | (description "G-Wrap is a tool and Guile library for generating function | |
1616 | wrappers for inter-language calls. It currently only supports generating Guile | |
1617 | wrappers for C functions. Given a definition of the types and prototypes for | |
1618 | a given C interface, G-Wrap will automatically generate the C code that | |
1619 | provides access to that interface and its types from the Scheme level.") | |
340978d7 | 1620 | (home-page "https://www.nongnu.org/g-wrap/index.html") |
71e0f217 | 1621 | (license license:lgpl2.1+))) |
dec1e2b3 | 1622 | |
01497dfe LC |
1623 | (define-public guile-dbi |
1624 | (package | |
1625 | (name "guile-dbi") | |
1626 | (version "2.1.6") | |
1627 | (source (origin | |
1628 | (method url-fetch) | |
1629 | (uri (string-append | |
1630 | "http://download.gna.org/guile-dbi/guile-dbi-" | |
1631 | version ".tar.gz")) | |
1632 | (sha256 | |
1633 | (base32 | |
1634 | "116njrprhgrsv1qm904sp3b02rq01fx639r433d657gyhw3x159n")))) | |
1635 | (build-system gnu-build-system) | |
1636 | (arguments | |
1637 | '(#:configure-flags | |
1638 | (list (string-append | |
b989c3e3 | 1639 | "--with-guile-site-dir=" %output "/share/guile/site/2.2")) |
34e00c7b AI |
1640 | #:make-flags |
1641 | (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib:" | |
1642 | (assoc-ref %build-inputs "guile-dbd-sqlite3") "/lib")) | |
01497dfe LC |
1643 | #:phases |
1644 | (modify-phases %standard-phases | |
1645 | (add-after 'install 'patch-extension-path | |
1646 | (lambda* (#:key outputs #:allow-other-keys) | |
1647 | (let* ((out (assoc-ref outputs "out")) | |
1648 | (dbi.scm (string-append | |
b989c3e3 | 1649 | out "/share/guile/site/2.2/dbi/dbi.scm")) |
01497dfe LC |
1650 | (ext (string-append out "/lib/libguile-dbi"))) |
1651 | (substitute* dbi.scm (("libguile-dbi") ext)) | |
1652 | #t)))))) | |
34e00c7b AI |
1653 | (inputs |
1654 | `(("guile-dbd-sqlite3" ,guile-dbd-sqlite3))) ; only shared library, no scheme files | |
01497dfe | 1655 | (propagated-inputs |
b989c3e3 | 1656 | `(("guile" ,guile-2.2))) |
01497dfe LC |
1657 | (synopsis "Guile database abstraction layer") |
1658 | (home-page "http://home.gna.org/guile-dbi/guile-dbi.html") | |
1659 | (description | |
1660 | "guile-dbi is a library for Guile that provides a convenient interface to | |
1661 | SQL databases. Database programming with guile-dbi is generic in that the same | |
1662 | programming interface is presented regardless of which database system is used. | |
1663 | It currently supports MySQL, Postgres and SQLite3.") | |
71e0f217 | 1664 | (license license:gpl2+))) |
01497dfe | 1665 | |
34e00c7b AI |
1666 | (define guile-dbi-bootstrap |
1667 | (package | |
1668 | (inherit guile-dbi) | |
1669 | (name "guile-dbi-bootstrap") | |
1670 | (inputs '()) | |
1671 | (arguments | |
1672 | (substitute-keyword-arguments (package-arguments guile-dbi) | |
1673 | ((#:make-flags _) '(list)))))) | |
1674 | ||
01497dfe LC |
1675 | (define-public guile-dbd-sqlite3 |
1676 | (package | |
1677 | (name "guile-dbd-sqlite3") | |
1678 | (version "2.1.6") | |
1679 | (source (origin | |
1680 | (method url-fetch) | |
1681 | (uri (string-append | |
1682 | "http://download.gna.org/guile-dbi/guile-dbd-sqlite3-" | |
1683 | version ".tar.gz")) | |
1684 | (sha256 | |
1685 | (base32 | |
1686 | "0rg71jchxd2y8x496s8zmfmikr5g8zxi8zv2ar3f7a23pph92iw2")))) | |
1687 | (build-system gnu-build-system) | |
1688 | (native-inputs | |
34e00c7b AI |
1689 | `(("pkg-config" ,pkg-config) |
1690 | ("guile-dbi-bootstrap" ,guile-dbi-bootstrap))) ; only required for headers | |
01497dfe LC |
1691 | (inputs |
1692 | `(("sqlite" ,sqlite) | |
1693 | ("zlib" ,(@ (gnu packages compression) zlib)))) | |
01497dfe LC |
1694 | (synopsis "Guile DBI driver for SQLite") |
1695 | (home-page "https://github.com/jkalbhenn/guile-dbd-sqlite3") | |
1696 | (description | |
1697 | "guile-dbi is a library for Guile that provides a convenient interface to | |
1698 | SQL databases. This package implements the interface for SQLite.") | |
71e0f217 | 1699 | (license license:gpl2+))) |
01497dfe | 1700 | |
e9291eaa AS |
1701 | (define-public guile-dsv |
1702 | (package | |
1703 | (name "guile-dsv") | |
8c80f8ef | 1704 | (version "0.2.1") |
e9291eaa AS |
1705 | (source (origin |
1706 | (method git-fetch) | |
1707 | (uri (git-reference | |
1708 | (url "https://github.com/artyom-poptsov/guile-dsv") | |
8c80f8ef | 1709 | (commit "bdc5267d007478abc20ea96d7c459b7dd9560b3d"))) |
e9291eaa AS |
1710 | (file-name (string-append name "-" version "-checkout")) |
1711 | (sha256 | |
1712 | (base32 | |
8c80f8ef | 1713 | "1irw6mz8998nwyhzrw9g94jcz60b9zljgqfmipaz1ybn8579qjx0")))) |
e9291eaa AS |
1714 | (build-system gnu-build-system) |
1715 | (native-inputs | |
1716 | `(("autoconf" ,autoconf) | |
1717 | ("automake" ,automake) | |
1718 | ("pkg-config" ,pkg-config) | |
1719 | ("texinfo" ,texinfo))) | |
1720 | (inputs `(("guile" ,guile-2.2))) | |
1721 | (propagated-inputs `(("guile-lib" ,guile-lib))) | |
1722 | (arguments | |
1723 | '(#:phases (modify-phases %standard-phases | |
1724 | (add-before 'configure 'set-guilesitedir | |
1725 | (lambda _ | |
1726 | (substitute* "Makefile.in" | |
1727 | (("^guilesitedir =.*$") | |
1728 | "guilesitedir = \ | |
1729 | $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n")) | |
1730 | (substitute* "modules/Makefile.in" | |
1731 | (("^guilesitedir =.*$") | |
1732 | "guilesitedir = \ | |
1733 | $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n")) | |
1734 | (substitute* "modules/dsv/Makefile.in" | |
1735 | (("^guilesitedir =.*$") | |
1736 | "guilesitedir = \ | |
1737 | $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n")) | |
1738 | #t)) | |
1739 | (add-after 'unpack 'autoreconf | |
1740 | (lambda _ | |
1741 | (zero? (system* "autoreconf" "-vfi"))))))) | |
1742 | (home-page "https://github.com/artyom-poptsov/guile-dsv") | |
1743 | (synopsis "DSV module for Guile") | |
1744 | (description | |
1745 | "Guile-DSV is a GNU Guile module for working with the | |
1746 | delimiter-separated values (DSV) data format. Guile-DSV supports the | |
1747 | Unix-style DSV format and RFC 4180 format.") | |
1748 | (license license:gpl3+))) | |
1749 | ||
bd9af610 AK |
1750 | (define-public guile-xosd |
1751 | (package | |
1752 | (name "guile-xosd") | |
4b2b7135 | 1753 | (version "0.2.1") |
bd9af610 AK |
1754 | (source (origin |
1755 | (method url-fetch) | |
1756 | (uri (string-append "https://github.com/alezost/" name | |
1757 | "/releases/download/v" version | |
1758 | "/" name "-" version ".tar.gz")) | |
1759 | (sha256 | |
1760 | (base32 | |
4b2b7135 | 1761 | "1ri5065c16kmgrf2pysn2ymxjqi5302lhpb07wkl1jr75ym8fn8p")))) |
bd9af610 AK |
1762 | (build-system gnu-build-system) |
1763 | (native-inputs | |
1764 | `(("pkg-config" ,pkg-config))) | |
1765 | (inputs | |
c6726a5f | 1766 | `(("guile" ,guile-2.2) |
bd9af610 AK |
1767 | ("libx11" ,libx11) |
1768 | ("libxext" ,libxext) | |
1769 | ("libxinerama" ,libxinerama) | |
1770 | ("xosd" ,xosd))) | |
1771 | (home-page "https://github.com/alezost/guile-xosd") | |
1772 | (synopsis "XOSD bindings for Guile") | |
1773 | (description | |
1774 | "Guile-XOSD provides Guile bindings for @code{libxosd}, | |
1775 | @uref{http://sourceforge.net/projects/libxosd/, the X On Screen Display | |
1776 | library}.") | |
71e0f217 | 1777 | (license license:gpl3+))) |
bd9af610 | 1778 | |
07f7cc03 AK |
1779 | (define-public guile-daemon |
1780 | (package | |
1781 | (name "guile-daemon") | |
5245399f | 1782 | (version "0.1.2") |
07f7cc03 AK |
1783 | (source (origin |
1784 | (method url-fetch) | |
1785 | (uri (string-append "https://github.com/alezost/" name | |
1786 | "/releases/download/v" version | |
1787 | "/" name "-" version ".tar.gz")) | |
1788 | (sha256 | |
1789 | (base32 | |
5245399f | 1790 | "0hh6gq6b6phpxm0b1dkxyzj3f4sxdf7dji63609lzypa5v1ad2gv")))) |
07f7cc03 AK |
1791 | (build-system gnu-build-system) |
1792 | (native-inputs | |
1793 | `(("pkg-config" ,pkg-config))) | |
1794 | (inputs | |
c6726a5f | 1795 | `(("guile" ,guile-2.2))) |
07f7cc03 AK |
1796 | (home-page "https://github.com/alezost/guile-daemon") |
1797 | (synopsis "Evaluate code in a running Guile process") | |
1798 | (description | |
1799 | "Guile-Daemon is a small Guile program that loads your initial | |
1800 | configuration file, and then reads and evaluates Guile expressions that | |
1801 | you send to a FIFO file.") | |
71e0f217 | 1802 | (license license:gpl3+))) |
07f7cc03 | 1803 | |
e28e74a5 EE |
1804 | (define-public guile-commonmark |
1805 | (package | |
1806 | (name "guile-commonmark") | |
1807 | (version "0.1") | |
1808 | (source (origin | |
1809 | (method url-fetch) | |
1810 | (uri (string-append "https://github.com/OrangeShark/" name | |
1811 | "/releases/download/v" version | |
1812 | "/" name "-" version ".tar.gz")) | |
1813 | (sha256 | |
1814 | (base32 | |
757ce0f9 LC |
1815 | "12cb5fqvvgc87f5xp0ih5az305wnjia89l5jba83d0r2p8bfy0b0")) |
1816 | (modules '((guix build utils))) | |
1817 | (snippet | |
1818 | ;; Use the real effective version of Guile in directory names | |
1819 | ;; instead of a hard-coded "/2.0". | |
1820 | '(begin | |
1821 | (substitute* "configure" | |
1822 | (("ac_subst_vars='") | |
1823 | "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n")) | |
1824 | (substitute* "Makefile.in" | |
1825 | (("/site/2.0") | |
6cbee49d MW |
1826 | "/site/@GUILE_EFFECTIVE_VERSION@")) |
1827 | #t)))) | |
e28e74a5 EE |
1828 | (build-system gnu-build-system) |
1829 | (inputs | |
7c86c031 | 1830 | `(("guile" ,guile-2.2))) |
e28e74a5 EE |
1831 | (synopsis "CommonMark parser for Guile") |
1832 | (description | |
1833 | "guile-commonmark is a library for parsing CommonMark, a fully specified | |
1834 | variant of Markdown. The library is written in Guile Scheme and is designed | |
1835 | to transform a CommonMark document to SXML. guile-commonmark tries to closely | |
1836 | follow the @uref{http://commonmark.org/, CommonMark spec}, the main difference | |
1837 | is no support for parsing block and inline level HTML.") | |
1838 | (home-page "https://github.com/OrangeShark/guile-commonmark") | |
71e0f217 | 1839 | (license license:lgpl3+))) |
e28e74a5 | 1840 | |
7c86c031 LC |
1841 | (define-public guile2.0-commonmark |
1842 | (package-for-guile-2.0 guile-commonmark)) | |
947a5d47 | 1843 | (define-public guile2.2-commonmark |
7c86c031 | 1844 | (deprecated-package "guile2.2-commonmark" guile-commonmark)) |
947a5d47 | 1845 | |
3b5783fc AB |
1846 | (define-public guile-bytestructures |
1847 | (package | |
1848 | (name "guile-bytestructures") | |
90977eb5 | 1849 | (version "1.0.3") |
3b5783fc | 1850 | (source (origin |
4f85f7f7 | 1851 | (method url-fetch) |
1852 | (uri (string-append "https://github.com/TaylanUB/scheme-bytestructures" | |
1853 | "/releases/download/v" version | |
1854 | "/bytestructures-" version ".tar.gz")) | |
3b5783fc AB |
1855 | (sha256 |
1856 | (base32 | |
90977eb5 | 1857 | "0xf6s8gd3656j8k2ar6y7i62r68azawyzxhsagsk8nvldnrs1r18")))) |
4f85f7f7 | 1858 | (build-system gnu-build-system) |
726ecfeb | 1859 | (native-inputs |
4f85f7f7 | 1860 | `(("pkg-config" ,pkg-config))) |
3b5783fc | 1861 | (inputs |
aabece2e | 1862 | `(("guile" ,guile-2.2))) |
3b5783fc AB |
1863 | (home-page "https://github.com/TaylanUB/scheme-bytestructures") |
1864 | (synopsis "Structured access to bytevector contents for Guile") | |
1865 | (description | |
1866 | "Guile bytestructures offers a system imitating the type system | |
1867 | of the C programming language, to be used on bytevectors. C's type | |
1868 | system works on raw memory, and Guile works on bytevectors which are | |
1869 | an abstraction over raw memory. It's also more powerful than the C | |
1870 | type system, elevating types to first-class status.") | |
71e0f217 | 1871 | (license license:gpl3+))) |
3b5783fc | 1872 | |
726ecfeb LC |
1873 | (define-public guile2.0-bytestructures |
1874 | (package-for-guile-2.0 guile-bytestructures)) | |
1875 | ||
472fc855 LC |
1876 | (define-public guile-aspell |
1877 | (package | |
1878 | (name "guile-aspell") | |
234ea3d6 | 1879 | (version "0.4") |
472fc855 LC |
1880 | (source (origin |
1881 | (method url-fetch) | |
1882 | (uri (string-append | |
1883 | "http://lonelycactus.com/tarball/guile_aspell-" | |
1884 | version ".tar.gz")) | |
1885 | (sha256 | |
1886 | (base32 | |
234ea3d6 | 1887 | "0vpk5xj9m9qc702z3khmkwhgpb949qbsyz8kw2qycda6qnxk0077")))) |
472fc855 LC |
1888 | (build-system gnu-build-system) |
1889 | (arguments | |
7295087e LC |
1890 | '(#:phases (modify-phases %standard-phases |
1891 | (add-before 'configure 'set-guilesitedir | |
1892 | (lambda _ | |
1893 | (substitute* "Makefile.in" | |
1894 | (("^guilesitedir =.*$") | |
1895 | "guilesitedir = \ | |
1896 | $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n")) | |
1897 | #t)) | |
472fc855 LC |
1898 | (add-before 'build 'set-libaspell-file-name |
1899 | (lambda* (#:key inputs #:allow-other-keys) | |
1900 | (let ((aspell (assoc-ref inputs "aspell"))) | |
234ea3d6 | 1901 | (substitute* "aspell.scm" |
472fc855 LC |
1902 | (("\"libaspell\\.so\"") |
1903 | (string-append "\"" aspell | |
1904 | "/lib/libaspell\""))) | |
1905 | #t)))))) | |
1906 | (native-inputs `(("pkg-config" ,pkg-config))) | |
cb5be6df | 1907 | (inputs `(("guile" ,guile-2.2) |
472fc855 LC |
1908 | ("aspell" ,aspell))) |
1909 | (home-page "https://github.com/spk121/guile-aspell") | |
1910 | (synopsis "Spell-checking from Guile") | |
1911 | (description | |
1912 | "guile-aspell is a Guile Scheme library for comparing a string against a | |
1913 | dictionary and suggesting spelling corrections.") | |
71e0f217 | 1914 | (license license:gpl3+))) |
472fc855 | 1915 | |
a614ce38 LC |
1916 | (define-public guile-bash |
1917 | ;; This project is currently retired. It was initially announced here: | |
1918 | ;; <https://lists.gnu.org/archive/html/guile-user/2015-02/msg00003.html>. | |
1919 | (let ((commit "1eabc563ca5692b3e08d84f1f0e6fd2283284469") | |
1920 | (revision "0")) | |
1921 | (package | |
1922 | (name "guile-bash") | |
1923 | (version (string-append "0.1.6-" revision "." (string-take commit 7))) | |
1924 | (home-page | |
1925 | "https://anonscm.debian.org/cgit/users/kaction-guest/retired/dev.guile-bash.git") | |
1926 | (source (origin | |
1927 | (method git-fetch) | |
1928 | (uri (git-reference | |
1929 | (commit commit) | |
1930 | (url home-page))) | |
1931 | (sha256 | |
1932 | (base32 | |
1933 | "097vny990wp2qpjij6a5a5gwc6fxzg5wk56inhy18iki5v6pif1p")) | |
1934 | (file-name (string-append name "-" version "-checkout")))) | |
1935 | (build-system gnu-build-system) | |
1936 | (arguments | |
189be331 | 1937 | '(#:configure-flags |
a614ce38 LC |
1938 | ;; Add -I to match 'bash.pc' of Bash 4.4. |
1939 | (list (string-append "CPPFLAGS=-I" | |
1940 | (assoc-ref %build-inputs "bash:include") | |
1941 | "/include/bash/include") | |
1942 | ||
1943 | ;; The '.a' file is useless. | |
1944 | "--disable-static" | |
1945 | ||
1946 | ;; Install 'lib/bash' as Bash 4.4 expects. | |
1947 | (string-append "--libdir=" (assoc-ref %outputs "out") | |
1948 | "/lib/bash")))) | |
1949 | (native-inputs `(("pkg-config" ,pkg-config) | |
464f5447 | 1950 | ("autoconf" ,autoconf-wrapper) |
a614ce38 LC |
1951 | ("automake" ,automake) |
1952 | ("libtool" ,libtool) | |
1953 | ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'. | |
b7158b76 LC |
1954 | ("gettext" ,gettext-minimal) |
1955 | ||
1956 | ;; Bash with loadable module support, for the test | |
1957 | ;; suite. | |
1958 | ("bash-full" ,bash))) | |
a614ce38 LC |
1959 | (inputs `(("guile" ,guile-2.0) |
1960 | ("bash:include" ,bash "include"))) | |
1961 | (synopsis "Extend Bash using Guile") | |
1962 | (description | |
1963 | "Guile-Bash provides a shared library and set of Guile modules, | |
1964 | allowing you to extend Bash in Scheme. Scheme interfaces allow you to access | |
1965 | the following aspects of Bash: | |
1966 | ||
1967 | @itemize | |
1968 | @item aliases; | |
1969 | @item setting and getting Bash variables; | |
1970 | @item creating dynamic variables; | |
1971 | @item creating Bash functions with a Scheme implementation; | |
1972 | @item reader macro for output capturing; | |
1973 | @item reader macro for evaluating raw Bash commands. | |
1974 | @end itemize | |
1975 | ||
1976 | To enable it, run: | |
1977 | ||
1978 | @example | |
1979 | enable -f ~/.guix-profile/lib/bash/libguile-bash.so scm | |
1980 | @end example | |
1981 | ||
1982 | and then run @command{scm example.scm}.") | |
71e0f217 | 1983 | (license license:gpl3+)))) |
a614ce38 | 1984 | |
c5793e7e CAW |
1985 | (define-public guile-8sync |
1986 | (package | |
1987 | (name "guile-8sync") | |
525acb6e | 1988 | (version "0.4.2") |
c5793e7e CAW |
1989 | (source (origin |
1990 | (method url-fetch) | |
1991 | (uri (string-append "mirror://gnu/8sync/8sync-" version | |
1992 | ".tar.gz")) | |
1993 | (sha256 | |
1994 | (base32 | |
525acb6e | 1995 | "031wm13srak3wsnll7j2mbbi29g1pcm4swdb71ds9yn567pn20qw")))) |
c5793e7e CAW |
1996 | (build-system gnu-build-system) |
1997 | (native-inputs `(("autoconf" ,autoconf) | |
1998 | ("automake" ,automake) | |
f6396d86 | 1999 | ("guile" ,guile-2.2) |
c5793e7e CAW |
2000 | ("pkg-config" ,pkg-config) |
2001 | ("texinfo" ,texinfo))) | |
2002 | (arguments | |
2003 | `(#:phases (modify-phases %standard-phases | |
2004 | (add-before 'configure 'setenv | |
2005 | (lambda _ | |
2006 | ;; quiet warnings | |
ab4a1731 CAW |
2007 | (setenv "GUILE_AUTO_COMPILE" "0") |
2008 | #t))))) | |
c5793e7e CAW |
2009 | (home-page "https://gnu.org/s/8sync/") |
2010 | (synopsis "Asynchronous actor model library for Guile") | |
2011 | (description | |
2012 | "GNU 8sync (pronounced \"eight-sync\") is an asynchronous programming | |
2013 | library for GNU Guile based on the actor model. | |
2014 | ||
f6396d86 | 2015 | Note that 8sync is only available for Guile 2.2.") |
71e0f217 | 2016 | (license license:lgpl3+))) |
c5793e7e | 2017 | |
aaf1bdc3 CAW |
2018 | (define-public guile-fibers |
2019 | (package | |
2020 | (name "guile-fibers") | |
2021 | (version "1.0.0") | |
2022 | (source (origin | |
2023 | (method url-fetch) | |
2024 | (uri (string-append "https://wingolog.org/pub/fibers/fibers-" | |
2025 | version ".tar.gz")) | |
2026 | (sha256 | |
2027 | (base32 | |
2028 | "0vjkg72ghgdgphzbjz9ig8al8271rq8974viknb2r1rg4lz92ld0")))) | |
2029 | (build-system gnu-build-system) | |
2030 | (native-inputs | |
2031 | `(("texinfo" ,texinfo) | |
2032 | ("pkg-config" ,pkg-config))) | |
2033 | (inputs | |
f6396d86 | 2034 | `(("guile" ,guile-2.2))) |
aaf1bdc3 CAW |
2035 | (synopsis "Lightweight concurrency facility for Guile") |
2036 | (description | |
2037 | "Fibers is a Guile library that implements a a lightweight concurrency | |
2038 | facility, inspired by systems like Concurrent ML, Go, and Erlang. A fiber is | |
2039 | like a \"goroutine\" from the Go language: a lightweight thread-like | |
2040 | abstraction. Systems built with Fibers can scale up to millions of concurrent | |
2041 | fibers, tens of thousands of concurrent socket connections, and many parallel | |
2042 | cores. The Fibers library also provides Concurrent ML-like channels for | |
2043 | communication between fibers. | |
2044 | ||
2045 | Note that Fibers makes use of some Guile 2.1/2.2-specific features and | |
2046 | is not available for Guile 2.0.") | |
2047 | (home-page "https://github.com/wingo/fibers") | |
2048 | (license license:lgpl3+))) | |
2049 | ||
bd233722 | 2050 | (define-public guile-git |
576f245c LC |
2051 | (let ((revision "6") |
2052 | (commit "36f93c174adc396c90ec3a6923487f0444fe5d69")) | |
bd233722 LC |
2053 | (package |
2054 | (name "guile-git") | |
2055 | (version (string-append "0.0-" revision "." (string-take commit 7))) | |
dc03f32d | 2056 | (home-page "https://gitlab.com/guile-git/guile-git.git") |
bd233722 LC |
2057 | (source (origin |
2058 | (method git-fetch) | |
2059 | (uri (git-reference (url home-page) (commit commit))) | |
2060 | (sha256 | |
2061 | (base32 | |
576f245c | 2062 | "0z1dvn0scx59pbgjkpacam7p5n7630z4qm8fazim7ixq9xv3s8wx")) |
bd233722 LC |
2063 | (file-name (git-file-name name version)))) |
2064 | (build-system gnu-build-system) | |
bd233722 LC |
2065 | (native-inputs |
2066 | `(("autoconf" ,autoconf) | |
2067 | ("automake" ,automake) | |
3a537598 | 2068 | ("texinfo" ,texinfo) |
bd233722 LC |
2069 | ("pkg-config" ,pkg-config))) |
2070 | (inputs | |
aabece2e | 2071 | `(("guile" ,guile-2.2) |
bd233722 LC |
2072 | ("libgit2" ,libgit2))) |
2073 | (propagated-inputs | |
2074 | `(("guile-bytestructures" ,guile-bytestructures))) | |
2075 | (synopsis "Guile bindings for libgit2") | |
2076 | (description | |
2077 | "This package provides Guile bindings to libgit2, a library to | |
2078 | manipulate repositories of the Git version control system.") | |
2079 | (license license:gpl3+)))) | |
c5793e7e | 2080 | |
70bc6085 LC |
2081 | (define-public guile2.0-git |
2082 | (package-for-guile-2.0 guile-git)) | |
2083 | ||
f252d6df | 2084 | (define-public guile-syntax-highlight |
3c90c7ae DT |
2085 | (package |
2086 | (name "guile-syntax-highlight") | |
2087 | (version "0.1") | |
2088 | (source (origin | |
2089 | (method url-fetch) | |
2090 | (uri (string-append "https://files.dthompson.us/" | |
2091 | "guile-syntax-highlight/" | |
2092 | "guile-syntax-highlight-" | |
2093 | version ".tar.gz")) | |
2094 | (sha256 | |
2095 | (base32 | |
2096 | "1p771kq15x83483m23bhah1sz6vkalg3drm7x279f4j1cxligkzi")))) | |
2097 | (build-system gnu-build-system) | |
2098 | (native-inputs | |
2099 | `(("pkg-config" ,pkg-config))) | |
2100 | (inputs | |
2101 | `(("guile" ,guile-2.2))) | |
8c72ed92 RW |
2102 | (synopsis "General-purpose syntax highlighter for GNU Guile") |
2103 | (description "Guile-syntax-highlight is a general-purpose syntax | |
f252d6df DT |
2104 | highlighting library for GNU Guile. It can parse code written in various |
2105 | programming languages into a simple s-expression that can be converted to | |
2106 | HTML (via SXML) or any other format for rendering.") | |
3c90c7ae DT |
2107 | (home-page "http://dthompson.us/projects/guile-syntax-highlight.html") |
2108 | (license license:lgpl3+))) | |
f252d6df | 2109 | |
d26ae96c CAW |
2110 | (define-public guile-sjson |
2111 | (package | |
2112 | (name "guile-sjson") | |
a62a16a4 | 2113 | (version "0.2.1") |
d26ae96c CAW |
2114 | (source (origin |
2115 | (method url-fetch) | |
2116 | (uri (string-append "https://dustycloud.org/misc/sjson-" version | |
2117 | ".tar.gz")) | |
2118 | (sha256 | |
2119 | (base32 | |
a62a16a4 | 2120 | "1mzmapln79vv10qxaggz9qwcdbag3jnrj19xx8bgkmxss8h03sv3")))) |
d26ae96c | 2121 | (build-system gnu-build-system) |
d26ae96c CAW |
2122 | (native-inputs |
2123 | `(("autoconf" ,autoconf) | |
2124 | ("automake" ,automake) | |
2125 | ("pkg-config" ,pkg-config))) | |
2126 | (inputs | |
2127 | `(("guile" ,guile-2.2))) | |
2128 | (home-page "https://gitlab.com/dustyweb/guile-sjson") | |
2129 | (synopsis "S-expression based json reader/writer for Guile") | |
2130 | (description "guile-sjson is a json reader/writer for Guile. | |
2131 | It has a nice, simple s-expression based syntax.") | |
2132 | (license license:lgpl3+))) | |
2133 | ||
e076d56a | 2134 | (define-public guile-colorized |
2135 | (package | |
2136 | (name "guile-colorized") | |
2137 | (version "0.1") | |
2138 | (source (origin | |
2139 | (method url-fetch) | |
2140 | (uri (string-append "https://github.com/NalaGinrut/guile-colorized/" | |
2141 | "archive/v" version ".tar.gz")) | |
2142 | (file-name (string-append name "-" version ".tar.gz")) | |
2143 | (sha256 | |
2144 | (base32 | |
2145 | "16xhc3an6aglnca8xl3mvgi8hsqzqn68vsl5ga4bz8bvbap5fn4p")))) | |
2146 | (build-system gnu-build-system) | |
2147 | (arguments | |
2148 | `(#:modules ((system base compile) | |
2149 | ,@%gnu-build-system-modules) | |
2150 | #:tests? #f ;No tests included | |
2151 | #:phases | |
2152 | (modify-phases %standard-phases | |
2153 | (delete 'configure) ;No configure script | |
2154 | (replace 'install | |
2155 | (lambda* (#:key outputs inputs #:allow-other-keys) | |
2156 | (let* ((out (assoc-ref outputs "out")) | |
2157 | (module-dir (string-append out "/share/guile/site/2.2")) | |
2158 | (language-dir (string-append module-dir "/ice-9")) | |
2159 | (guild (string-append (assoc-ref inputs "guile") | |
2160 | "/bin/guild"))) | |
2161 | ;; The original 'make install' is too primitive. | |
2162 | ||
2163 | ;; copy the source | |
2164 | (install-file "ice-9/colorized.scm" language-dir) | |
2165 | ||
2166 | ;; compile to the destination | |
2167 | (compile-file "ice-9/colorized.scm" | |
2168 | #:output-file (string-append | |
2169 | language-dir "/colorized.go")) | |
2170 | #t)))))) | |
2171 | (inputs | |
2172 | `(("guile" ,guile-2.2))) | |
2173 | (home-page "https://github.com/NalaGinrut/guile-colorized") | |
2174 | (synopsis "Colorized REPL for Guile") | |
2175 | (description | |
2176 | "Guile-colorized provides you with a colorized REPL for GNU Guile.") | |
2177 | (license license:gpl3+))) | |
2178 | ||
f858e58f | 2179 | (define-public guile-simple-zmq |
e46b84e3 PAR |
2180 | (let ((commit "1f3b7c0b9b249c6fde8e8a632b252d8a1b794424") |
2181 | (revision "1")) | |
f858e58f PAR |
2182 | (package |
2183 | (name "guile-simple-zmq") | |
2184 | (version (git-version "0.0.0" revision commit)) | |
2185 | (source | |
2186 | (origin | |
2187 | (method git-fetch) | |
2188 | (uri (git-reference | |
2189 | (url "https://github.com/jerry40/guile-simple-zmq") | |
2190 | (commit commit))) | |
2191 | (sha256 | |
2192 | (base32 | |
e46b84e3 | 2193 | "0nj2pd5bsmmgd3c54wh4sixfhmsv1arsq7yam2d7487h3n9q57r7")) |
f858e58f PAR |
2194 | (file-name (git-file-name name version)))) |
2195 | (build-system trivial-build-system) | |
2196 | (arguments | |
2197 | `(#:modules ((guix build utils)) | |
2198 | #:builder | |
2199 | (begin | |
2200 | (use-modules (guix build utils) | |
2201 | (srfi srfi-26) | |
2202 | (ice-9 match) | |
2203 | (ice-9 popen) | |
2204 | (ice-9 rdelim)) | |
2205 | ||
2206 | (let* ((out (assoc-ref %outputs "out")) | |
2207 | (guile (assoc-ref %build-inputs "guile")) | |
2208 | (effective (read-line | |
2209 | (open-pipe* OPEN_READ | |
2210 | (string-append guile "/bin/guile") | |
2211 | "-c" "(display (effective-version))"))) | |
2212 | (module-dir (string-append out "/share/guile/site/" | |
2213 | effective)) | |
2214 | (go-dir (string-append out "/lib/guile/" | |
2215 | effective "/site-ccache/")) | |
2216 | (source (string-append (assoc-ref %build-inputs "source") | |
2217 | "/src")) | |
2218 | (scm-file "simple-zmq.scm") | |
2219 | (guild (string-append (assoc-ref %build-inputs "guile") | |
2220 | "/bin/guild")) | |
2221 | (zmq (assoc-ref %build-inputs "zeromq")) | |
2222 | (deps (list zmq)) | |
2223 | (path (string-join | |
2224 | (map (cut string-append <> | |
2225 | "/lib/") | |
2226 | deps) | |
2227 | ":"))) | |
2228 | ;; Make installation directories. | |
2229 | (mkdir-p module-dir) | |
2230 | (mkdir-p go-dir) | |
2231 | ||
2232 | ;; Compile .scm files and install. | |
2233 | (chdir source) | |
2234 | (setenv "GUILE_AUTO_COMPILE" "0") | |
2235 | (for-each (lambda (file) | |
2236 | (let* ((dest-file (string-append module-dir "/" | |
2237 | file)) | |
2238 | (go-file (match (string-split file #\.) | |
2239 | ((base _) | |
2240 | (string-append go-dir "/" | |
2241 | base ".go"))))) | |
2242 | ;; Install source module. | |
2243 | (copy-file file dest-file) | |
2244 | (substitute* dest-file | |
2245 | (("\\(dynamic-link \"libzmq\"\\)") | |
2246 | (format #f "(dynamic-link \"~a/lib/libzmq.so\")" | |
2247 | (assoc-ref %build-inputs "zeromq")))) | |
2248 | ||
2249 | ;; Install and compile module. | |
2250 | (unless (zero? (system* guild "compile" | |
2251 | "-L" source | |
2252 | "-o" go-file | |
2253 | dest-file)) | |
2254 | (error (format #f "Failed to compile ~s to ~s!" | |
2255 | file go-file))))) | |
2256 | (list scm-file)) | |
2257 | #t)))) | |
e46b84e3 PAR |
2258 | (inputs |
2259 | `(("guile" ,guile-2.2))) | |
f858e58f | 2260 | (propagated-inputs |
e46b84e3 | 2261 | `(("zeromq" ,zeromq))) |
f858e58f PAR |
2262 | (home-page "https://github.com/jerry40/guile-simple-zmq") |
2263 | (synopsis "Guile wrapper over ZeroMQ library") | |
2264 | (description | |
2265 | "This package provides a Guile programming interface to the ZeroMQ | |
2266 | messaging library.") | |
2267 | (license license:gpl3+)))) | |
2268 | ||
fa6a3bb7 PAR |
2269 | (define-public jupyter-guile-kernel |
2270 | (let ((commit "a5c5f3ea3215b65e770bcb62f71117b0ec4575ed") | |
2271 | (revision "0")) | |
2272 | (package | |
2273 | (name "jupyter-guile-kernel") | |
2274 | (version (git-version "0.0.0" revision commit)) | |
2275 | (source | |
2276 | (origin | |
2277 | (method git-fetch) | |
2278 | (uri (git-reference | |
2279 | (url "https://github.com/jerry40/guile-kernel") | |
2280 | (commit commit))) | |
2281 | (sha256 | |
2282 | (base32 | |
2283 | "0y5jr0f0dyskvsawqbf6n0bpg8jirw4mhqbarf2a6p9lxhqha9s9")))) | |
2284 | (build-system trivial-build-system) | |
2285 | (arguments | |
2286 | `(#:modules ((guix build utils)) | |
2287 | #:builder | |
2288 | (begin | |
2289 | (use-modules (guix build utils) | |
2290 | (srfi srfi-26) | |
2291 | (ice-9 match) | |
2292 | (ice-9 popen) | |
2293 | (ice-9 rdelim)) | |
2294 | ||
2295 | (let* ((out (assoc-ref %outputs "out")) | |
2296 | (guile (assoc-ref %build-inputs "guile")) | |
2297 | (effective (read-line | |
2298 | (open-pipe* OPEN_READ | |
2299 | (string-append guile "/bin/guile") | |
2300 | "-c" "(display (effective-version))"))) | |
2301 | (module-dir (string-append out "/share/guile/site/" | |
2302 | effective)) | |
2303 | (kernel-dir (string-append out "/share/jupyter/kernels/guile")) | |
2304 | (go-dir (string-append out "/lib/guile/" | |
2305 | effective | |
2306 | "/site-ccache")) | |
2307 | (source (string-append (assoc-ref %build-inputs "source") | |
2308 | "/src")) | |
2309 | (scm-files '("hmac.scm" | |
2310 | "tools.scm" | |
2311 | "guile-jupyter-kernel.scm")) | |
2312 | (kernel-file "kernel.json") | |
2313 | (guild (string-append (assoc-ref %build-inputs "guile") | |
2314 | "/bin/guild")) | |
2315 | (g-szmq (assoc-ref %build-inputs "guile-simple-zmq")) | |
2316 | (json (assoc-ref %build-inputs "guile-json")) | |
2317 | (deps (list g-szmq json)) | |
2318 | (path (string-join | |
2319 | (map (cut string-append <> | |
2320 | "/share/guile/site/" | |
2321 | effective) | |
2322 | deps) | |
2323 | ":")) | |
2324 | (gopath (string-join | |
2325 | (map (cut string-append <> | |
2326 | "/lib/guile/" effective | |
2327 | "/site-ccache/") | |
2328 | deps) | |
2329 | ":"))) | |
2330 | ||
2331 | ;; Make installation directories. | |
2332 | (mkdir-p module-dir) | |
2333 | (mkdir-p kernel-dir) | |
2334 | (mkdir-p go-dir) | |
2335 | ||
2336 | ;; Make a writable copy of SOURCE. | |
2337 | (copy-recursively source ".") | |
2338 | ||
2339 | ;; Record the absolute file name of the 'openssl' command. | |
2340 | (substitute* "hmac.scm" | |
2341 | (("openssl") | |
2342 | (string-append (assoc-ref %build-inputs "openssl") | |
2343 | "/bin/openssl"))) | |
2344 | ||
2345 | ;; Compile .scm files and install. | |
2346 | (setenv "GUILE_AUTO_COMPILE" "0") | |
2347 | (setenv "GUILE_LOAD_PATH" path) | |
2348 | (setenv "GUILE_LOAD_COMPILED_PATH" gopath) | |
2349 | ||
2350 | (for-each (lambda (file) | |
2351 | (let* ((dest-file (string-append module-dir "/" | |
2352 | file)) | |
2353 | (go-file (match (string-split file #\.) | |
2354 | ((base _) | |
2355 | (string-append go-dir "/" | |
2356 | base ".go"))))) | |
2357 | ;; Install source module. | |
2358 | (copy-file file dest-file) | |
2359 | ||
2360 | ;; Install compiled module. | |
2361 | (unless (zero? (system* guild "compile" | |
2362 | "-L" source | |
2363 | "-o" go-file | |
2364 | file)) | |
2365 | (error (format #f "Failed to compile ~s to ~s!" | |
2366 | file go-file))))) | |
2367 | scm-files) | |
2368 | ||
2369 | ;; Install kernel | |
2370 | (copy-file kernel-file (string-append kernel-dir "/" | |
2371 | kernel-file)) | |
2372 | ;; Fix hard-coded file name in the kernel | |
2373 | (substitute* (string-append kernel-dir "/" | |
2374 | kernel-file) | |
2375 | (("/home/jerry/.local/share/jupyter/kernels/guile/guile-jupyter-kernel.scm") | |
2376 | (string-append module-dir "/guile-jupyter-kernel.scm")) | |
2377 | (("\"guile\"") | |
2378 | (string-append "\"" (assoc-ref %build-inputs "guile") | |
2379 | "/bin/guile\"")) | |
2380 | (("-s") | |
2381 | (string-append "--no-auto-compile\", \"-s"))) | |
2382 | ||
2383 | #t)))) | |
2384 | (inputs | |
2385 | `(("openssl" ,openssl) | |
2386 | ("guile" ,guile-2.2))) | |
2387 | (propagated-inputs | |
2388 | `(("guile-json" ,guile-json) | |
2389 | ("guile-simple-zmq" ,guile-simple-zmq))) | |
2390 | (synopsis "Guile kernel for the Jupyter Notebook") | |
2391 | (description | |
2392 | "This package provides a Guile 2.x kernel for the Jupyter Notebook. It | |
2393 | allows users to interact with the Guile REPL through Jupyter.") | |
2394 | (home-page "https://github.com/jerry40/guile-kernel") | |
2395 | (license license:gpl3+)))) | |
2396 | ||
89f8c2ac RJ |
2397 | (define-public guile-sparql |
2398 | (package | |
2399 | (name "guile-sparql") | |
2400 | (version "0.0.7") | |
2401 | (source (origin | |
2402 | (method url-fetch) | |
2403 | (uri (string-append | |
2404 | "https://github.com/roelj/guile-sparql/releases/download/" | |
2405 | version "/guile-sparql-" version ".tar.gz")) | |
2406 | (sha256 | |
2407 | (base32 "1drnvhsgl0gc5crmb16yyw1j98nkhwwcgssv9vgm36ng43nnzffd")))) | |
2408 | (build-system gnu-build-system) | |
2409 | (arguments `(#:tests? #f)) ; There are no tests. | |
2410 | (native-inputs | |
2411 | `(("pkg-config" ,pkg-config))) | |
2412 | (inputs | |
2413 | `(("guile" ,guile-2.2))) | |
2414 | (home-page "https://github.com/roelj/guile-sparql") | |
2415 | (synopsis "SPARQL module for Guile") | |
2416 | (description "This package provides the functionality to query a SPARQL | |
2417 | endpoint. Additionally, it provides an interface to write SPARQL queries | |
2418 | using S-expressions.") | |
2419 | (license license:gpl3+))) | |
2420 | ||
1722d680 | 2421 | ;;; guile.scm ends here |