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> |
e076d56a | 17 | ;;; Copyright © 2017 ng0 <ng0@infotropique.org> |
20897536 | 18 | ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr> |
d4660a54 | 19 | ;;; Copyright © 2018 Maxim Cournoyer <maxim.cournoyer@gmail.com> |
1722d680 | 20 | ;;; |
233e7676 | 21 | ;;; This file is part of GNU Guix. |
1722d680 | 22 | ;;; |
233e7676 | 23 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
1722d680 LC |
24 | ;;; under the terms of the GNU General Public License as published by |
25 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
26 | ;;; your option) any later version. | |
27 | ;;; | |
233e7676 | 28 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
1722d680 LC |
29 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
30 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
31 | ;;; GNU General Public License for more details. | |
32 | ;;; | |
33 | ;;; You should have received a copy of the GNU General Public License | |
233e7676 | 34 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
1722d680 | 35 | |
1ffa7090 | 36 | (define-module (gnu packages guile) |
71e0f217 | 37 | #:use-module ((guix licenses) #:prefix license:) |
59a43334 | 38 | #:use-module (gnu packages) |
28a1041f | 39 | #:use-module (gnu packages admin) ;;for tree |
472fc855 | 40 | #:use-module (gnu packages aspell) |
9c782445 | 41 | #:use-module (gnu packages bash) |
1ffa7090 | 42 | #:use-module (gnu packages bdw-gc) |
148585c2 | 43 | #:use-module (gnu packages compression) |
1ffa7090 LC |
44 | #:use-module (gnu packages gawk) |
45 | #:use-module (gnu packages gperf) | |
46 | #:use-module (gnu packages libffi) | |
47 | #:use-module (gnu packages autotools) | |
f906d30c | 48 | #:use-module (gnu packages flex) |
1ffa7090 | 49 | #:use-module (gnu packages libunistring) |
7119cca8 | 50 | #:use-module (gnu packages linux) |
1ffa7090 LC |
51 | #:use-module (gnu packages m4) |
52 | #:use-module (gnu packages multiprecision) | |
53 | #:use-module (gnu packages pkg-config) | |
54 | #:use-module (gnu packages readline) | |
ef02e1e9 | 55 | #:use-module (gnu packages ncurses) |
87d836b2 | 56 | #:use-module (gnu packages ed) |
ce0614dd | 57 | #:use-module (gnu packages base) |
f906d30c | 58 | #:use-module (gnu packages texinfo) |
01497dfe | 59 | #:use-module (gnu packages man) |
f906d30c | 60 | #:use-module (gnu packages gettext) |
b416aadf | 61 | #:use-module (gnu packages databases) |
9d373377 | 62 | #:use-module (gnu packages python) |
5649c8cd DT |
63 | #:use-module (gnu packages gl) |
64 | #:use-module (gnu packages sdl) | |
65 | #:use-module (gnu packages maths) | |
66 | #:use-module (gnu packages image) | |
bd233722 | 67 | #:use-module (gnu packages version-control) |
bd9af610 AK |
68 | #:use-module (gnu packages xdisorg) |
69 | #:use-module (gnu packages xorg) | |
1722d680 | 70 | #:use-module (guix packages) |
87f5d366 | 71 | #:use-module (guix download) |
6bc24063 | 72 | #:use-module (guix git-download) |
32795fcf | 73 | #:use-module (guix build-system gnu) |
6bc24063 | 74 | #:use-module (guix build-system trivial) |
32795fcf | 75 | #:use-module (guix utils) |
d4660a54 MC |
76 | #:use-module (ice-9 match) |
77 | #:use-module ((srfi srfi-1) #:prefix srfi-1:)) | |
1722d680 LC |
78 | |
79 | ;;; Commentary: | |
80 | ;;; | |
c44899a2 | 81 | ;;; GNU Guile, and modules and extensions. |
1722d680 LC |
82 | ;;; |
83 | ;;; Code: | |
84 | ||
c44899a2 LC |
85 | (define-public guile-1.8 |
86 | (package | |
87 | (name "guile") | |
88 | (version "1.8.8") | |
89 | (source (origin | |
87f5d366 | 90 | (method url-fetch) |
0db342a5 | 91 | (uri (string-append "mirror://gnu/guile/guile-" version |
c44899a2 LC |
92 | ".tar.gz")) |
93 | (sha256 | |
94 | (base32 | |
01eafd38 | 95 | "0l200a0v7h8bh0cwz6v7hc13ds39cgqsmfrks55b1rbj5vniyiy3")) |
fc1adab1 | 96 | (patches (search-patches "guile-1.8-cpp-4.5.patch")))) |
c44899a2 LC |
97 | (build-system gnu-build-system) |
98 | (arguments '(#:configure-flags '("--disable-error-on-warning") | |
c44899a2 LC |
99 | |
100 | ;; Insert a phase before `configure' to patch things up. | |
dc1d3cde KK |
101 | #:phases |
102 | (modify-phases %standard-phases | |
103 | (add-before 'configure 'patch-stuff | |
104 | (lambda* (#:key outputs #:allow-other-keys) | |
105 | ;; Add a call to `lt_dladdsearchdir' so that | |
106 | ;; `libguile-readline.so' & co. are in the | |
107 | ;; loader's search path. | |
108 | (substitute* "libguile/dynl.c" | |
109 | (("lt_dlinit.*$" match) | |
110 | (format #f | |
111 | " ~a~% lt_dladdsearchdir(\"~a/lib\");~%" | |
112 | match | |
113 | (assoc-ref outputs "out")))) | |
2f4fbe1c | 114 | |
dc1d3cde KK |
115 | ;; The usual /bin/sh... |
116 | (substitute* "ice-9/popen.scm" | |
117 | (("/bin/sh") (which "sh"))) | |
118 | #t))))) | |
01eafd38 | 119 | (inputs `(("gawk" ,gawk) |
c44899a2 LC |
120 | ("readline" ,readline))) |
121 | ||
122 | ;; Since `guile-1.8.pc' has "Libs: ... -lgmp -lltdl", these must be | |
123 | ;; propagated. | |
124 | (propagated-inputs `(("gmp" ,gmp) | |
be11b102 | 125 | ("libltdl" ,libltdl))) |
c44899a2 LC |
126 | |
127 | ;; When cross-compiling, a native version of Guile itself is needed. | |
128 | (self-native-input? #t) | |
129 | ||
9be8d7c8 LC |
130 | (native-search-paths |
131 | (list (search-path-specification | |
132 | (variable "GUILE_LOAD_PATH") | |
af070955 | 133 | (files '("share/guile/site"))))) |
9be8d7c8 | 134 | |
f50d2669 | 135 | (synopsis "Scheme implementation intended especially for extensions") |
c44899a2 | 136 | (description |
a22dc0c4 LC |
137 | "Guile is the GNU Ubiquitous Intelligent Language for Extensions, the |
138 | official extension language of the GNU system. It is an implementation of | |
139 | the Scheme language which can be easily embedded in other applications to | |
140 | provide a convenient means of extending the functionality of the application | |
141 | without requiring the source code to be rewritten.") | |
6fd52309 | 142 | (home-page "https://www.gnu.org/software/guile/") |
71e0f217 | 143 | (license license:lgpl2.0+))) |
c44899a2 LC |
144 | |
145 | (define-public guile-2.0 | |
146 | (package | |
147 | (name "guile") | |
b5efd14a | 148 | (version "2.0.14") |
c44899a2 | 149 | (source (origin |
87f5d366 | 150 | (method url-fetch) |
0db342a5 | 151 | (uri (string-append "mirror://gnu/guile/guile-" version |
c44899a2 LC |
152 | ".tar.xz")) |
153 | (sha256 | |
154 | (base32 | |
b5efd14a | 155 | "10lxc6l5alf3lzbs3ihnbfy6dfcrsyf8667wa57f26vf4mk2ai78")))) |
c44899a2 LC |
156 | (build-system gnu-build-system) |
157 | (native-inputs `(("pkgconfig" ,pkg-config))) | |
158 | (inputs `(("libffi" ,libffi) | |
88da729f | 159 | ,@(libiconv-if-needed) |
baf549df LC |
160 | |
161 | ;; We need Bash when cross-compiling because some of the scripts | |
162 | ;; in bin/ refer to it. Use 'bash-minimal' because we don't need | |
163 | ;; an interactive Bash with Readline and all. | |
164 | ,@(if (target-mingw?) '() `(("bash" ,bash-minimal))))) | |
c44899a2 LC |
165 | (propagated-inputs |
166 | `( ;; These ones aren't normally needed here, but since `libguile-2.0.la' | |
167 | ;; reads `-lltdl -lunistring', adding them here will add the needed | |
168 | ;; `-L' flags. As for why the `.la' file lacks the `-L' flags, see | |
169 | ;; <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/18903>. | |
170 | ("libunistring" ,libunistring) | |
be11b102 LC |
171 | |
172 | ;; Depend on LIBLTDL, not LIBTOOL. That way, we avoid some the extra | |
173 | ;; dependencies that LIBTOOL has, which is helpful during bootstrap. | |
174 | ("libltdl" ,libltdl) | |
c44899a2 LC |
175 | |
176 | ;; The headers and/or `guile-2.0.pc' refer to these packages, so they | |
177 | ;; must be propagated. | |
bda1bc6c | 178 | ("bdw-gc" ,libgc) |
c44899a2 LC |
179 | ("gmp" ,gmp))) |
180 | ||
181 | (self-native-input? #t) | |
182 | ||
9bf62d9b LC |
183 | (outputs '("out" "debug")) |
184 | ||
8ffaa93b | 185 | (arguments |
20897536 TGR |
186 | `(#:configure-flags '("--disable-static") ; saves 3 MiB |
187 | #:phases | |
188 | (modify-phases %standard-phases | |
189 | (add-before 'configure 'pre-configure | |
190 | (lambda* (#:key inputs #:allow-other-keys) | |
191 | ;; Tell (ice-9 popen) the file name of Bash. | |
192 | (let ((bash (assoc-ref inputs "bash"))) | |
193 | (substitute* "module/ice-9/popen.scm" | |
194 | ;; If bash is #f allow fallback for user to provide | |
195 | ;; "bash" in PATH. This happens when cross-building to | |
196 | ;; MinGW for which we do not have Bash yet. | |
197 | (("/bin/sh") | |
198 | ,@(if (target-mingw?) | |
199 | '((if bash | |
200 | (string-append bash "/bin/bash") | |
201 | "bash")) | |
202 | '((string-append bash "/bin/bash"))))) | |
203 | #t)))))) | |
8ffaa93b | 204 | |
9be8d7c8 LC |
205 | (native-search-paths |
206 | (list (search-path-specification | |
207 | (variable "GUILE_LOAD_PATH") | |
af070955 | 208 | (files '("share/guile/site/2.0"))) |
9be8d7c8 LC |
209 | (search-path-specification |
210 | (variable "GUILE_LOAD_COMPILED_PATH") | |
ca408580 | 211 | (files '("lib/guile/2.0/site-ccache" |
05f1e956 | 212 | "share/guile/site/2.0"))))) |
9be8d7c8 | 213 | |
f50d2669 | 214 | (synopsis "Scheme implementation intended especially for extensions") |
c44899a2 | 215 | (description |
a22dc0c4 LC |
216 | "Guile is the GNU Ubiquitous Intelligent Language for Extensions, the |
217 | official extension language of the GNU system. It is an implementation of | |
218 | the Scheme language which can be easily embedded in other applications to | |
219 | provide a convenient means of extending the functionality of the application | |
220 | without requiring the source code to be rewritten.") | |
6fd52309 | 221 | (home-page "https://www.gnu.org/software/guile/") |
71e0f217 | 222 | (license license:lgpl3+))) |
c44899a2 | 223 | |
f6396d86 | 224 | (define-public guile-2.2 |
f906d30c | 225 | (package (inherit guile-2.0) |
f6396d86 | 226 | (name "guile") |
2664e0f6 | 227 | (version "2.2.3") |
4eae7980 LC |
228 | (source (origin |
229 | (method url-fetch) | |
34d624ce LC |
230 | |
231 | ;; Note: we are limited to one of the compression formats | |
232 | ;; supported by the bootstrap binaries, so no lzip here. | |
80a72572 | 233 | (uri (string-append "mirror://gnu/guile/guile-" version |
34d624ce | 234 | ".tar.xz")) |
4eae7980 LC |
235 | (sha256 |
236 | (base32 | |
2664e0f6 | 237 | "11j01agvnci2cx32wwpqs9078856yxmvs15gcsz7ganpkj2ahlw3")) |
d9f0788a LC |
238 | (modules '((guix build utils))) |
239 | ||
240 | ;; Remove the pre-built object files. Instead, build everything | |
241 | ;; from source, at the expense of significantly longer build | |
242 | ;; times (almost 3 hours on a 4-core Intel i5). | |
6cbee49d MW |
243 | (snippet '(begin |
244 | (for-each delete-file | |
245 | (find-files "prebuilt" "\\.go$")) | |
246 | #t)))) | |
4fbd0f4f | 247 | (properties '((timeout . 72000) ;20 hours |
16b0f205 | 248 | (max-silent-time . 36000))) ;10 hours (needed on ARM |
1577a658 | 249 | ; when heavily loaded) |
dd90ed89 DT |
250 | (native-search-paths |
251 | (list (search-path-specification | |
252 | (variable "GUILE_LOAD_PATH") | |
253 | (files '("share/guile/site/2.2"))) | |
254 | (search-path-specification | |
255 | (variable "GUILE_LOAD_COMPILED_PATH") | |
31769b9f | 256 | (files '("lib/guile/2.2/site-ccache" |
33c3a214 LC |
257 | "share/guile/site/2.2"))))) |
258 | ||
259 | (arguments | |
260 | (if (%current-target-system) | |
261 | (substitute-keyword-arguments (package-arguments guile-2.0) | |
262 | ((#:phases phases '%standard-phases) | |
263 | `(modify-phases ,phases | |
264 | (add-after 'unpack 'sacrifice-elisp-support | |
265 | (lambda _ | |
266 | ;; Cross-compiling language/elisp/boot.el fails, so | |
267 | ;; sacrifice it. See | |
268 | ;; <https://git.savannah.gnu.org/cgit/guile.git/commit/?h=stable-2.2&id=988aa29238fca862c7e2cb55f15762a69b4c16ce> | |
269 | ;; for the upstream fix. | |
270 | (substitute* "module/Makefile.in" | |
271 | (("language/elisp/boot\\.el") | |
272 | "\n")) | |
273 | #t))))) | |
274 | (package-arguments guile-2.0))))) | |
4eae7980 | 275 | |
34d624ce LC |
276 | (define-public guile-2.2/fixed |
277 | ;; A package of Guile 2.2 that's rarely changed. It is the one used | |
278 | ;; in the `base' module, and thus changing it entails a full rebuild. | |
279 | (package | |
280 | (inherit guile-2.2) | |
a9308efe | 281 | (properties '((hidden? . #t) ;people should install 'guile-2.2' |
5a5b3632 MW |
282 | (timeout . 72000) ;20 hours |
283 | (max-silent-time . 36000))))) ;10 hours (needed on ARM | |
284 | ; when heavily loaded) | |
34d624ce | 285 | |
3aab8851 LC |
286 | (define-public guile-2.2.2 |
287 | ;; Keep it so that, when 'guix' runs on 2.2.2, 'guix pull' compiles objects | |
288 | ;; with 2.2.2, thereby avoiding the ABI incompatibility issues described in | |
289 | ;; <https://bugs.gnu.org/29570>. | |
290 | (package | |
291 | (inherit guile-2.2) | |
292 | (version "2.2.2") | |
293 | (source (origin | |
294 | (inherit (package-source guile-2.2)) | |
295 | (uri (string-append "mirror://gnu/guile/guile-" version | |
296 | ".tar.xz")) | |
297 | (sha256 | |
298 | (base32 | |
299 | "1azm25zcmxif0skxfrp11d2wc89nrzpjaann9yxdw6pvjxhs948w")))))) | |
300 | ||
5cd074ea LC |
301 | (define-public guile-next |
302 | (deprecated-package "guile-next" guile-2.2)) | |
303 | ||
2ba2c98d LC |
304 | (define (make-guile-readline guile) |
305 | (package | |
306 | (name "guile-readline") | |
307 | (version (package-version guile)) | |
308 | (source (package-source guile)) | |
309 | (build-system gnu-build-system) | |
310 | (arguments | |
311 | '(#:configure-flags '("--disable-silent-rules") | |
312 | #:phases (modify-phases %standard-phases | |
313 | (add-before 'build 'chdir | |
314 | (lambda* (#:key outputs #:allow-other-keys) | |
315 | (invoke "make" "-C" "libguile" "scmconfig.h") | |
316 | (invoke "make" "-C" "lib") | |
317 | (chdir "guile-readline") | |
318 | ||
319 | (substitute* "Makefile" | |
320 | (("../libguile/libguile-[[:graph:]]+\\.la") | |
321 | ;; Remove dependency on libguile-X.Y.la. | |
322 | "") | |
323 | (("^READLINE_LIBS = (.*)$" _ libs) | |
324 | ;; Link against the provided libguile. | |
325 | (string-append "READLINE_LIBS = " | |
326 | "-lguile-$(GUILE_EFFECTIVE_VERSION) " | |
327 | libs "\n")) | |
328 | (("\\$\\(top_builddir\\)/meta/build-env") | |
329 | ;; Use the provided Guile, not the one from | |
330 | ;; $(builddir). | |
331 | "") | |
332 | ||
333 | ;; Install modules to the 'site' directories. | |
334 | (("^moddir = .*$") | |
335 | "moddir = $(pkgdatadir)/site/$(GUILE_EFFECTIVE_VERSION)\n") | |
336 | (("^ccachedir = .*$") | |
337 | "ccachedir = $(pkglibdir)/$(GUILE_EFFECTIVE_VERSION)/site-ccache\n")) | |
338 | ||
339 | ;; Load 'guile-readline.so' from the right place. | |
340 | (substitute* "ice-9/readline.scm" | |
341 | (("load-extension \"guile-readline\"") | |
342 | (format #f "load-extension \ | |
343 | (string-append ~s \"/lib/guile/\" (effective-version) \"/extensions/guile-readline\")" | |
344 | (assoc-ref outputs "out")))) | |
345 | #t))))) | |
346 | (home-page (package-home-page guile)) | |
347 | (native-inputs (package-native-inputs guile)) | |
348 | (inputs | |
349 | `(,@(package-inputs guile) ;to placate 'configure' | |
350 | ,@(package-propagated-inputs guile) | |
351 | ("guile" ,guile) | |
352 | ("readline" ,readline))) | |
353 | (synopsis "Line editing support for GNU Guile") | |
354 | (description | |
355 | "This module provides line editing support via the Readline library for | |
356 | GNU@tie{}Guile. Use the @code{(ice-9 readline)} module and call its | |
357 | @code{activate-readline} procedure to enable it.") | |
358 | (license license:gpl3+))) | |
359 | ||
360 | (define-public guile-readline | |
361 | (make-guile-readline guile-2.2)) | |
362 | ||
8f4acad7 LC |
363 | (define (guile-variant-package-name prefix) |
364 | (lambda (name) | |
365 | "Return NAME with PREFIX instead of \"guile-\", when applicable." | |
366 | (if (string-prefix? "guile-" name) | |
367 | (string-append prefix "-" | |
368 | (string-drop name | |
369 | (string-length "guile-"))) | |
370 | name))) | |
947a5d47 LC |
371 | |
372 | (define package-for-guile-2.2 | |
373 | ;; A procedure that rewrites the dependency tree of the given package to use | |
f6396d86 LC |
374 | ;; GUILE-2.2 instead of GUILE-2.0. |
375 | (package-input-rewriting `((,guile-2.0 . ,guile-2.2)) | |
8f4acad7 LC |
376 | (guile-variant-package-name "guile2.2"))) |
377 | ||
378 | (define package-for-guile-2.0 | |
379 | ;; Likewise, but the other way around. :-) | |
380 | (package-input-rewriting `((,guile-2.2 . ,guile-2.0)) | |
381 | (guile-variant-package-name "guile2.0"))) | |
947a5d47 | 382 | |
4eae7980 | 383 | (define-public guile-for-guile-emacs |
f6396d86 | 384 | (package (inherit guile-2.2) |
4eae7980 LC |
385 | (name "guile-for-guile-emacs") |
386 | (version "20150510.d8d9a8d") | |
f906d30c CAW |
387 | (source (origin |
388 | (method git-fetch) | |
389 | (uri (git-reference | |
4eae7980 LC |
390 | (url "git://git.hcoop.net/git/bpt/guile.git") |
391 | (commit "d8d9a8da05ec876acba81a559798eb5eeceb5a17"))) | |
51988e3a | 392 | (file-name (string-append name "-" version "-checkout")) |
f906d30c CAW |
393 | (sha256 |
394 | (base32 | |
4eae7980 | 395 | "00sprsshy16y8pxjy126hr2adqcvvzzz96hjyjwgg8swva1qh6b0")))) |
f906d30c CAW |
396 | (arguments |
397 | (substitute-keyword-arguments `(;; Tests aren't passing for now. | |
398 | ;; Obviously we should re-enable this! | |
399 | #:tests? #f | |
f6396d86 | 400 | ,@(package-arguments guile-2.2)) |
f906d30c CAW |
401 | ((#:phases phases) |
402 | `(modify-phases ,phases | |
403 | (add-after 'unpack 'autogen | |
404 | (lambda _ | |
405 | (zero? (system* "sh" "autogen.sh")))) | |
406 | (add-before 'autogen 'patch-/bin/sh | |
407 | (lambda _ | |
408 | (substitute* "build-aux/git-version-gen" | |
409 | (("#!/bin/sh") (string-append "#!" (which "sh")))) | |
410 | #t)))))) | |
411 | (native-inputs | |
412 | `(("autoconf" ,autoconf) | |
413 | ("automake" ,automake) | |
414 | ("libtool" ,libtool) | |
415 | ("flex" ,flex) | |
416 | ("texinfo" ,texinfo) | |
b94a6ca0 | 417 | ("gettext" ,gettext-minimal) |
f6396d86 | 418 | ,@(package-native-inputs guile-2.2))) |
daeb61f7 RW |
419 | ;; Same as in guile-2.0 |
420 | (native-search-paths | |
421 | (list (search-path-specification | |
422 | (variable "GUILE_LOAD_PATH") | |
423 | (files '("share/guile/site/2.0"))) | |
424 | (search-path-specification | |
425 | (variable "GUILE_LOAD_COMPILED_PATH") | |
31769b9f | 426 | (files '("lib/guile/2.0/site-ccache" |
daeb61f7 | 427 | "share/guile/site/2.0"))))))) |
be3feafe | 428 | |
71311e4e RW |
429 | ;; There has not been any release yet. |
430 | (define-public guildhall | |
431 | (let ((commit "2fe2cc539f4b811bbcd69e58738db03eb5a2b778") | |
432 | (revision "1")) | |
433 | (package | |
434 | (name "guildhall") | |
435 | (version (string-append "0-" revision "." (string-take commit 9))) | |
436 | (source (origin | |
437 | (method git-fetch) | |
438 | (uri (git-reference | |
439 | (url "https://github.com/ijp/guildhall.git") | |
440 | (commit commit))) | |
441 | (file-name (string-append name "-" version "-checkout")) | |
442 | (sha256 | |
443 | (base32 | |
444 | "115bym7bg66h3gs399yb2vkzc2ygriaqsn4zbrg8f054mgy8wzn1")))) | |
445 | (build-system gnu-build-system) | |
446 | (arguments | |
447 | `(#:phases | |
448 | (modify-phases %standard-phases | |
449 | ;; Tests fail without this fix because they try to load the bash | |
450 | ;; executable as a Scheme file. See bug report at | |
451 | ;; https://github.com/ijp/guildhall/issues/22 | |
452 | (add-after 'unpack 'fix-bug-22 | |
453 | (lambda _ | |
454 | (substitute* "Makefile.am" | |
455 | (("TESTS_ENVIRONMENT=.*") | |
456 | "AM_TESTS_ENVIRONMENT=srcdir=$(abs_top_srcdir)/tests/ | |
457 | TEST_EXTENSIONS = .scm | |
458 | SCM_LOG_COMPILER= $(top_builddir)/env $(GUILE) | |
459 | AM_SCM_LOG_FLAGS = --no-auto-compile -s") | |
460 | ;; FIXME: one of the database tests fails for unknown | |
461 | ;; reasons. It does not fail when run outside of Guix. | |
462 | (("tests/database.scm") "")) | |
463 | #t)) | |
d10092b8 | 464 | (add-after 'fix-bug-22 'autogen |
71311e4e RW |
465 | (lambda _ |
466 | (zero? (system* "sh" "autogen.sh"))))))) | |
467 | (inputs | |
468 | `(("guile" ,guile-2.0))) | |
469 | (native-inputs | |
470 | `(("zip" ,zip) ; for tests | |
471 | ("autoconf" ,autoconf) | |
472 | ("automake" ,automake) | |
473 | ("texinfo" ,texinfo))) | |
474 | (synopsis "Package manager for Guile") | |
475 | (description | |
476 | "Guildhall is a package manager written for Guile Scheme. A guild is | |
477 | an association of independent craftspeople. A guildhall is where they meet. | |
478 | This Guildhall aims to make a virtual space for Guile wizards and journeyfolk | |
479 | to share code. | |
480 | ||
481 | On a practical level, Guildhall lets you share Scheme modules and programs | |
482 | over the internet, and install code that has been shared by others. Guildhall | |
483 | can handle dependencies, so when a program requires several libraries, and | |
484 | each of those has further dependencies, all of the prerequisites for the | |
485 | program can be installed in one go.") | |
486 | (home-page "https://github.com/ijp/guildhall") | |
487 | (license license:gpl3+)))) | |
488 | ||
c44899a2 LC |
489 | \f |
490 | ;;; | |
491 | ;;; Extensions. | |
492 | ;;; | |
493 | ||
7119cca8 | 494 | (define-public artanis |
12235a12 AFN |
495 | (let ((release "0.2.1") |
496 | (revision 3)) | |
497 | (package | |
498 | (name "artanis") | |
499 | (version (if (zero? revision) | |
500 | release | |
501 | (string-append release "-" | |
502 | (number->string revision)))) | |
503 | (source (origin | |
504 | (method url-fetch) | |
505 | (uri (string-append "mirror://gnu/artanis/artanis-" | |
506 | release ".tar.gz")) | |
507 | (file-name (string-append name "-" version ".tar.gz")) | |
508 | (sha256 | |
509 | (base32 | |
510 | "041ajcg2pz918kd9iqcj4inpzddc3impvz3r2nhlpbv8zrz011hn")) | |
511 | (modules '((guix build utils))) | |
512 | (snippet | |
513 | '(begin | |
514 | (delete-file-recursively "artanis/third-party/json.scm") | |
515 | (delete-file-recursively "artanis/third-party/json") | |
516 | (substitute* '("artanis/artanis.scm" | |
517 | "artanis/oht.scm") | |
518 | (("(#:use-module \\()artanis third-party (json\\))" _ | |
519 | use-module json) | |
520 | (string-append use-module json))) | |
521 | (substitute* "artanis/oht.scm" | |
522 | (("([[:punct:][:space:]]+)(->json-string)([[:punct:][:space:]]+)" | |
523 | _ pre json-string post) | |
524 | (string-append pre | |
525 | "scm" json-string | |
526 | post))) | |
527 | (substitute* "artanis/artanis.scm" | |
528 | (("[[:punct:][:space:]]+->json-string[[:punct:][:space:]]+") | |
6cbee49d MW |
529 | "")) |
530 | #t)))) | |
12235a12 AFN |
531 | (build-system gnu-build-system) |
532 | ;; TODO: Add guile-dbi and guile-dbd optional dependencies. | |
533 | (inputs `(("guile" ,guile-2.2) | |
534 | ("guile-json" ,guile-json))) | |
535 | (native-inputs `(("bash" ,bash) ;for the `source' builtin | |
536 | ("pkgconfig" ,pkg-config) | |
537 | ("util-linux" ,util-linux))) ;for the `script' command | |
538 | (arguments | |
539 | '(#:make-flags | |
540 | ;; TODO: The documentation must be built with the `docs' target. | |
541 | (let* ((out (assoc-ref %outputs "out")) | |
542 | (scm (string-append out "/share/guile/site/2.2")) | |
543 | (go (string-append out "/lib/guile/2.2/site-ccache"))) | |
544 | ;; Don't use (%site-dir) for site paths. | |
545 | (list (string-append "MOD_PATH=" scm) | |
546 | (string-append "MOD_COMPILED_PATH=" go))) | |
547 | #:test-target "test" | |
548 | #:phases | |
549 | (modify-phases %standard-phases | |
550 | (add-before 'install 'substitute-root-dir | |
551 | (lambda* (#:key outputs #:allow-other-keys) | |
552 | (let ((out (assoc-ref outputs "out"))) | |
553 | (substitute* "Makefile" ;ignore the execution of bash.bashrc | |
554 | ((" /etc/bash.bashrc") " /dev/null")) | |
555 | (substitute* "Makefile" ;set the root of config files to OUT | |
556 | ((" /etc") (string-append " " out "/etc"))) | |
557 | (mkdir-p (string-append out "/bin")) ;for the `art' executable | |
558 | #t))) | |
559 | (add-after 'install 'wrap-art | |
560 | (lambda* (#:key outputs #:allow-other-keys) | |
561 | (let* ((out (assoc-ref outputs "out")) | |
562 | (bin (string-append out "/bin")) | |
563 | (scm (string-append out "/share/guile/site/2.2")) | |
564 | (go (string-append out "/lib/guile/2.2/site-ccache"))) | |
565 | (wrap-program (string-append bin "/art") | |
566 | `("GUILE_LOAD_PATH" ":" prefix (,scm)) | |
567 | `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,go))) | |
568 | #t)))))) | |
569 | (synopsis "Web application framework written in Guile") | |
570 | (description "GNU Artanis is a web application framework written in Guile | |
7119cca8 ML |
571 | Scheme. A web application framework (WAF) is a software framework that is |
572 | designed to support the development of dynamic websites, web applications, web | |
573 | services and web resources. The framework aims to alleviate the overhead | |
574 | associated with common activities performed in web development. Artanis | |
575 | provides several tools for web development: database access, templating | |
576 | frameworks, session management, URL-remapping for RESTful, page caching, and | |
577 | more.") | |
12235a12 AFN |
578 | (home-page "https://www.gnu.org/software/artanis/") |
579 | (license (list license:gpl3+ license:lgpl3+))))) ;dual license | |
7119cca8 | 580 | |
d6d9f1f7 | 581 | (define-public guile-reader |
1722d680 | 582 | (package |
d6d9f1f7 | 583 | (name "guile-reader") |
77aa0887 | 584 | (version "0.6.2") |
d6d9f1f7 LC |
585 | (source (origin |
586 | (method url-fetch) | |
587 | (uri (string-append "mirror://savannah/guile-reader/guile-reader-" | |
588 | version ".tar.gz")) | |
589 | (sha256 | |
590 | (base32 | |
77aa0887 | 591 | "0592s2s8ampqmqwilc4fvcild6rb9gy79di6vxv5kcdmv23abkgx")))) |
d6d9f1f7 LC |
592 | (build-system gnu-build-system) |
593 | (native-inputs `(("pkgconfig" ,pkg-config) | |
2fa077f3 | 594 | ("gperf" ,gperf-3.0))) |
bdf1022d | 595 | (inputs `(("guile" ,guile-2.2))) |
d6d9f1f7 LC |
596 | (synopsis "Framework for building readers for GNU Guile") |
597 | (description | |
598 | "Guile-Reader is a simple framework for building readers for GNU Guile. | |
1722d680 LC |
599 | |
600 | The idea is to make it easy to build procedures that extend Guile’s read | |
35b9e423 | 601 | procedure. Readers supporting various syntax variants can easily be written, |
1722d680 | 602 | possibly by re-using existing “token readers” of a standard Scheme |
35b9e423 | 603 | readers. For example, it is used to implement Skribilo’s R5RS-derived |
1722d680 LC |
604 | document syntax. |
605 | ||
606 | Guile-Reader’s approach is similar to Common Lisp’s “read table”, but | |
607 | hopefully more powerful and flexible (for instance, one may instantiate as | |
608 | many readers as needed).") | |
340978d7 | 609 | (home-page "https://www.nongnu.org/guile-reader/") |
71e0f217 | 610 | (license license:gpl3+))) |
1722d680 | 611 | |
bdf1022d LC |
612 | (define-public guile2.0-reader |
613 | (package-for-guile-2.0 guile-reader)) | |
517fce63 | 614 | (define-public guile2.2-reader |
bdf1022d | 615 | (deprecated-package "guile2.2-reader" guile-reader)) |
517fce63 | 616 | |
ef02e1e9 LC |
617 | (define-public guile-ncurses |
618 | (package | |
619 | (name "guile-ncurses") | |
958d357a | 620 | (version "2.2") |
ef02e1e9 LC |
621 | (source (origin |
622 | (method url-fetch) | |
623 | (uri (string-append "mirror://gnu/guile-ncurses/guile-ncurses-" | |
624 | version ".tar.gz")) | |
625 | (sha256 | |
626 | (base32 | |
958d357a | 627 | "1wvggbr4xv8idh1hzd8caj4xfp4pln78a7w1wqzd4zgzwmnzxr2f")))) |
ef02e1e9 LC |
628 | (build-system gnu-build-system) |
629 | (inputs `(("ncurses" ,ncurses) | |
81eaa3f8 | 630 | ("guile" ,guile-2.2))) |
0881b616 | 631 | (native-inputs `(("pkg-config" ,pkg-config))) |
ef02e1e9 | 632 | (arguments |
2c6b7c7d | 633 | '(#:configure-flags (list "--with-ncursesw" ; Unicode support |
0881b616 | 634 | "--with-gnu-filesystem-hierarchy") |
fa37f21b EF |
635 | #:phases |
636 | (modify-phases %standard-phases | |
8c4e99cc | 637 | (add-before 'build 'fix-libguile-ncurses-file-name |
fa37f21b | 638 | (lambda* (#:key outputs #:allow-other-keys) |
8c4e99cc JD |
639 | (and (zero? (system* "make" "install" |
640 | "-C" "src/ncurses" | |
641 | "-j" (number->string | |
642 | (parallel-job-count)))) | |
643 | (let* ((out (assoc-ref outputs "out")) | |
644 | (dir "src/ncurses") | |
645 | (files (find-files dir ".scm"))) | |
646 | (substitute* files | |
647 | (("\"libguile-ncurses\"") | |
81eaa3f8 | 648 | (format #f "\"~a/lib/guile/2.2/libguile-ncurses\"" |
8c4e99cc JD |
649 | out))) |
650 | #t))))))) | |
d81850d4 | 651 | (home-page "https://www.gnu.org/software/guile-ncurses/") |
f50d2669 | 652 | (synopsis "Guile bindings to ncurses") |
ef02e1e9 | 653 | (description |
12bcf94a | 654 | "guile-ncurses provides Guile language bindings for the ncurses |
79c311b8 | 655 | library.") |
71e0f217 | 656 | (license license:lgpl3+))) |
ef02e1e9 | 657 | |
4d02e9ff DM |
658 | (define-public guile-ncurses/gpm |
659 | (package | |
660 | (inherit guile-ncurses) | |
661 | (name "guile-ncurses-with-gpm") | |
662 | (inputs `(("ncurses" ,ncurses/gpm) | |
663 | ("guile" ,guile-2.2))))) | |
664 | ||
87d836b2 LC |
665 | (define-public mcron |
666 | (package | |
667 | (name "mcron") | |
d12c626c | 668 | (version "1.0.8") |
87d836b2 LC |
669 | (source (origin |
670 | (method url-fetch) | |
671 | (uri (string-append "mirror://gnu/mcron/mcron-" | |
672 | version ".tar.gz")) | |
673 | (sha256 | |
674 | (base32 | |
d12c626c | 675 | "0zparwgf01jgl1x53ik71ghabldq6zz18ha4dscps1i0qrzgap1b")) |
fc1adab1 | 676 | (patches (search-patches "mcron-install.patch")))) |
87d836b2 | 677 | (build-system gnu-build-system) |
b6c18d6a LC |
678 | (native-inputs `(("pkg-config" ,pkg-config))) |
679 | (inputs `(("ed" ,ed) ("which" ,which) ("guile" ,guile-2.0))) | |
6fd52309 | 680 | (home-page "https://www.gnu.org/software/mcron/") |
f50d2669 | 681 | (synopsis "Run jobs at scheduled times") |
87d836b2 | 682 | (description |
79c311b8 | 683 | "GNU Mcron is a complete replacement for Vixie cron. It is used to run |
a22dc0c4 | 684 | tasks on a schedule, such as every hour or every Monday. Mcron is written in |
79c311b8 LC |
685 | Guile, so its configuration can be written in Scheme; the original cron |
686 | format is also supported.") | |
71e0f217 | 687 | (license license:gpl3+))) |
87d836b2 | 688 | |
01497dfe LC |
689 | (define-public mcron2 |
690 | ;; This is mthl's mcron development branch, not yet merged in mcron. | |
691 | (let ((commit "31baff1a5187d8ddc89324cbe42dbeffc309c962")) | |
692 | (package | |
693 | (inherit mcron) | |
694 | (name "mcron2") | |
695 | (version (string-append (package-version mcron) "-0." | |
696 | (string-take commit 7))) | |
697 | (source (origin | |
698 | (method git-fetch) | |
699 | (uri (git-reference | |
700 | (url "https://notabug.org/mthl/mcron/") | |
701 | (commit commit))) | |
702 | (sha256 | |
703 | (base32 | |
704 | "1h5wxy997hxi718hpx419c23q09939kbxrjbbq54lv0cgw1bb63z")) | |
705 | (file-name (string-append name "-" version "-checkout")))) | |
706 | (native-inputs | |
707 | `(("autoconf" ,autoconf) | |
708 | ("automake" ,automake) | |
709 | ("pkg-config" ,pkg-config) | |
710 | ("texinfo" ,texinfo) | |
711 | ("help2man" ,help2man))) | |
d4660a54 MC |
712 | (inputs |
713 | `(("guile-2.2" ,guile-2.2) | |
714 | ,@(srfi-1:alist-delete "guile" (package-inputs mcron)))) | |
01497dfe LC |
715 | (arguments |
716 | `(#:modules ((ice-9 match) (ice-9 ftw) | |
717 | ,@%gnu-build-system-modules) | |
d4660a54 MC |
718 | ;; When building the targets in parallel, help2man tries to generate |
719 | ;; the manpage from ./cron --help before it is built, which fails. | |
720 | #:parallel-build? #f | |
721 | #:phases | |
722 | (modify-phases %standard-phases | |
723 | (add-after 'unpack 'use-guile-2.2 | |
724 | (lambda _ | |
725 | (substitute* "configure.ac" | |
726 | (("PKG_CHECK_MODULES\\(\\[GUILE\\],.*$") | |
bc880f9d LC |
727 | "PKG_CHECK_MODULES([GUILE], [guile-2.2])\n") |
728 | (("guile/site/2.0") | |
729 | "guile/site/2.2")) | |
d4660a54 | 730 | #t)) |
d4660a54 MC |
731 | (add-after 'install 'wrap-mcron |
732 | (lambda* (#:key outputs #:allow-other-keys) | |
733 | ;; Wrap the 'mcron' command to refer to the right | |
734 | ;; modules. | |
735 | (let* ((out (assoc-ref outputs "out")) | |
736 | (bin (string-append out "/bin")) | |
737 | (site (string-append | |
738 | out "/share/guile/site"))) | |
739 | (match (scandir site) | |
740 | (("." ".." version) | |
741 | (let ((modules (string-append site "/" version))) | |
742 | (wrap-program (string-append bin "/mcron") | |
743 | `("GUILE_LOAD_PATH" ":" prefix | |
744 | (,modules)) | |
745 | `("GUILE_LOAD_COMPILED_PATH" ":" prefix | |
746 | (,modules))) | |
747 | #t)))))))))))) | |
01497dfe | 748 | |
814b18e5 AS |
749 | (define-public guile-ics |
750 | (package | |
751 | (name "guile-ics") | |
752 | (version "0.1.1") | |
753 | (source (origin | |
754 | (method git-fetch) | |
755 | (uri (git-reference | |
756 | (url "https://github.com/artyom-poptsov/guile-ics") | |
757 | (commit "v0.1.1"))) | |
758 | (file-name (string-append name "-" version "-checkout")) | |
759 | (sha256 | |
760 | (base32 | |
761 | "1pvg6j48inpbq47hq00yh5hhl2qd2srvrx5yjl7w7ky1jsjadp86")))) | |
762 | (build-system gnu-build-system) | |
763 | (arguments | |
764 | '(#:phases (modify-phases %standard-phases | |
d10092b8 KK |
765 | (add-after 'unpack 'autoreconf |
766 | (lambda _ | |
767 | ;; Repository comes with a broken symlink | |
768 | (delete-file "README") | |
769 | (symlink "README.org" "README") | |
770 | (zero? (system* "autoreconf" "-fi"))))))) | |
814b18e5 | 771 | (native-inputs |
464f5447 | 772 | `(("autoconf" ,autoconf-wrapper) |
814b18e5 AS |
773 | ("automake" ,automake) |
774 | ("texinfo" ,texinfo) | |
775 | ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'. | |
776 | ("gettext" ,gettext-minimal) | |
777 | ("pkg-config" ,pkg-config))) | |
778 | (inputs `(("guile" ,guile-2.0) ("which" ,which))) | |
1b0f266e | 779 | (propagated-inputs `(("guile-lib" ,guile2.0-lib))) |
814b18e5 AS |
780 | (home-page "https://github.com/artyom-poptsov/guile-ics") |
781 | (synopsis "Guile parser library for the iCalendar format") | |
782 | (description | |
783 | "Guile-ICS is an iCalendar (RFC5545) format parser library written in | |
784 | pure Scheme. The library can be used to read and write iCalendar data. | |
785 | ||
786 | The library is shipped with documentation in Info format and usage examples.") | |
71e0f217 | 787 | (license license:gpl3+))) |
814b18e5 | 788 | |
3e9066fc LC |
789 | (define-public guile-lib |
790 | (package | |
791 | (name "guile-lib") | |
30f17d73 | 792 | (version "0.2.5.1") |
3e9066fc | 793 | (source (origin |
af126875 MC |
794 | (method url-fetch) |
795 | (uri (string-append "mirror://savannah/guile-lib/guile-lib-" | |
796 | version ".tar.gz")) | |
797 | (sha256 | |
798 | (base32 | |
30f17d73 | 799 | "19q420i3is3d4jmkdqs5y7ir7ipp4s795saflqgwf6617cx2zpj4")))) |
3e9066fc LC |
800 | (build-system gnu-build-system) |
801 | (arguments | |
af126875 MC |
802 | '(#:make-flags |
803 | '("GUILE_AUTO_COMPILE=0") ;to prevent guild errors | |
804 | #:phases | |
805 | (modify-phases %standard-phases | |
806 | (add-before 'configure 'patch-module-dir | |
807 | (lambda _ | |
808 | (substitute* "src/Makefile.in" | |
809 | (("^moddir = ([[:graph:]]+)") | |
810 | "moddir = $(datadir)/guile/site/@GUILE_EFFECTIVE_VERSION@\n") | |
811 | (("^godir = ([[:graph:]]+)") | |
812 | "godir = \ | |
bf62b8ff | 813 | $(libdir)/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n")) |
af126875 | 814 | #t))))) |
bf62b8ff | 815 | (native-inputs `(("pkg-config" ,pkg-config))) |
1b0f266e | 816 | (inputs `(("guile" ,guile-2.2))) |
340978d7 | 817 | (home-page "https://www.nongnu.org/guile-lib/") |
3e9066fc LC |
818 | (synopsis "Collection of useful Guile Scheme modules") |
819 | (description | |
35b9e423 | 820 | "Guile-Lib is intended as an accumulation place for pure-scheme Guile |
3e9066fc LC |
821 | modules, allowing for people to cooperate integrating their generic Guile |
822 | modules into a coherent library. Think \"a down-scaled, limited-scope CPAN | |
823 | for Guile\".") | |
824 | ||
825 | ;; The whole is under GPLv3+, but some modules are under laxer | |
826 | ;; distribution terms such as LGPL and public domain. See `COPYING' for | |
827 | ;; details. | |
71e0f217 | 828 | (license license:gpl3+))) |
3e9066fc | 829 | |
1b0f266e LC |
830 | (define-public guile2.0-lib |
831 | (package-for-guile-2.0 guile-lib)) | |
832 | ||
12773de3 | 833 | (define-public guile2.2-lib |
1b0f266e | 834 | (deprecated-package "guile2.2-lib" guile-lib)) |
12773de3 | 835 | |
6050a1fb CR |
836 | (define-public guile-json |
837 | (package | |
838 | (name "guile-json") | |
1f4f2360 | 839 | (version "0.6.0") |
6050a1fb | 840 | (source (origin |
ffc72ec6 LC |
841 | (method url-fetch) |
842 | (uri (string-append "mirror://savannah/guile-json/guile-json-" | |
843 | version ".tar.gz")) | |
844 | (sha256 | |
845 | (base32 | |
1f4f2360 | 846 | "1qmjg7lbgciw95fkdzvlp9f68vv17kdjky42ywfzd4ffzwww0lgc")) |
ffc72ec6 LC |
847 | (modules '((guix build utils))) |
848 | (snippet | |
849 | ;; Make sure everything goes under .../site/X.Y, like Guile's | |
850 | ;; search paths expects. | |
851 | '(begin | |
852 | (substitute* "configure" | |
853 | (("ac_subst_vars='") | |
854 | "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n")) | |
855 | (substitute* '("Makefile.in" "json/Makefile.in") | |
856 | (("moddir =.*/share/guile/site" all) | |
6cbee49d MW |
857 | (string-append all "/@GUILE_EFFECTIVE_VERSION@"))) |
858 | #t)))) | |
6050a1fb | 859 | (build-system gnu-build-system) |
2252f087 | 860 | (native-inputs `(("guile" ,guile-2.2))) |
340978d7 | 861 | (home-page "https://savannah.nongnu.org/projects/guile-json/") |
6050a1fb CR |
862 | (synopsis "JSON module for Guile") |
863 | (description | |
0f31d4f0 LC |
864 | "Guile-JSON supports parsing and building JSON documents according to the |
865 | specification. These are the main features: | |
866 | ||
867 | @itemize | |
868 | @item Strictly complies to @uref{http://json.org, specification}. | |
869 | @item Build JSON documents programmatically via macros. | |
870 | @item Unicode support for strings. | |
871 | @item Allows JSON pretty printing. | |
872 | @end itemize\n") | |
71e0f217 | 873 | (license license:lgpl3+))) |
6050a1fb | 874 | |
947a5d47 | 875 | (define-public guile2.2-json |
2252f087 LC |
876 | (deprecated-package "guile2.2-json" guile-json)) |
877 | ||
878 | (define-public guile2.0-json | |
879 | (package-for-guile-2.0 guile-json)) | |
947a5d47 | 880 | |
6bc24063 CAW |
881 | (define-public guile-minikanren |
882 | (package | |
883 | (name "guile-minikanren") | |
884 | (version "20150424.e844d85") | |
885 | (source (origin | |
886 | (method git-fetch) | |
887 | (uri (git-reference | |
888 | (url "https://github.com/ijp/minikanren.git") | |
889 | (commit "e844d85512f8c055d3f96143ee506007389a25e3"))) | |
821f4dc2 | 890 | (file-name (string-append name "-" version "-checkout")) |
6bc24063 CAW |
891 | (sha256 |
892 | (base32 | |
893 | "0r50jlpzi940jlmxyy3ddqqwmj5r12gb4bcv0ssini9v8km13xz6")))) | |
894 | (build-system trivial-build-system) | |
895 | (arguments | |
4b74a29d | 896 | `(#:modules ((guix build utils)) |
6bc24063 CAW |
897 | #:builder |
898 | (begin | |
899 | (use-modules (guix build utils) | |
4b74a29d LC |
900 | (ice-9 match) |
901 | (ice-9 popen) | |
902 | (ice-9 rdelim)) | |
903 | ||
6bc24063 | 904 | (let* ((out (assoc-ref %outputs "out")) |
4b74a29d LC |
905 | (guile (assoc-ref %build-inputs "guile")) |
906 | (effective (read-line | |
907 | (open-pipe* OPEN_READ | |
908 | (string-append guile "/bin/guile") | |
909 | "-c" "(display (effective-version))"))) | |
910 | (module-dir (string-append out "/share/guile/site/" | |
911 | effective)) | |
6bc24063 | 912 | (source (assoc-ref %build-inputs "source")) |
f3d8cd79 | 913 | (doc (string-append out "/share/doc/guile-minikanren")) |
6bc24063 CAW |
914 | (scm-files '("minikanren.scm" |
915 | "minikanren/mkextraforms.scm" | |
916 | "minikanren/mkprelude.scm" | |
917 | "minikanren/mk.scm")) | |
918 | (guild (string-append (assoc-ref %build-inputs "guile") | |
919 | "/bin/guild"))) | |
920 | ;; Make installation directories. | |
921 | (mkdir-p (string-append module-dir "/minikanren")) | |
922 | (mkdir-p doc) | |
923 | ||
924 | ;; Compile .scm files and install. | |
925 | (chdir source) | |
926 | (setenv "GUILE_AUTO_COMPILE" "0") | |
927 | (for-each (lambda (file) | |
928 | (let* ((dest-file (string-append module-dir "/" | |
76e6e663 | 929 | file)) |
6bc24063 CAW |
930 | (go-file (match (string-split file #\.) |
931 | ((base _) | |
932 | (string-append module-dir "/" | |
933 | base ".go"))))) | |
934 | ;; Install source module. | |
935 | (copy-file file dest-file) | |
936 | ;; Install compiled module. | |
937 | (unless (zero? (system* guild "compile" | |
938 | "-L" source | |
939 | "-o" go-file | |
940 | file)) | |
941 | (error (format #f "Failed to compile ~s to ~s!" | |
942 | file go-file))))) | |
943 | scm-files) | |
944 | ||
945 | ;; Also copy over the README. | |
96c46210 | 946 | (install-file "README.org" doc) |
6bc24063 CAW |
947 | #t)))) |
948 | (inputs | |
949 | `(("guile" ,guile-2.0))) | |
950 | (home-page "https://github.com/ijp/minikanren") | |
e881752c | 951 | (synopsis "MiniKanren declarative logic system, packaged for Guile") |
6bc24063 CAW |
952 | (description |
953 | "MiniKanren is a relational programming extension to the Scheme | |
954 | programming Language, written as a smaller version of Kanren suitable for | |
955 | pedagogical purposes. It is featured in the book, The Reasoned Schemer, | |
956 | written by Dan Friedman, William Byrd, and Oleg Kiselyov. | |
957 | ||
e881752c | 958 | This is Ian Price's r6rs packaged version of miniKanren, which deviates |
6bc24063 CAW |
959 | slightly from miniKanren mainline. |
960 | ||
961 | See http://minikanren.org/ for more on miniKanren generally.") | |
71e0f217 | 962 | (license license:expat))) |
6bc24063 | 963 | |
947a5d47 LC |
964 | (define-public guile2.2-minikanren |
965 | (package-for-guile-2.2 guile-minikanren)) | |
966 | ||
28a1041f AP |
967 | (define-public guile-miniadapton |
968 | (let ((commit "1b5749422304567c96ac5367f2221dda9eff5880") | |
969 | (revision "1")) | |
970 | (package | |
971 | (name "guile-miniadapton") | |
972 | (version (string-append "0-" revision "." (string-take commit 9))) | |
973 | (source (origin | |
974 | (method git-fetch) | |
975 | (uri (git-reference | |
976 | (url "https://github.com/fisherdj/miniAdapton.git") | |
977 | (commit commit))) | |
978 | (file-name (string-append name "-" version "-checkout")) | |
979 | (sha256 | |
980 | (base32 | |
981 | "09q51zkw2fypad5xixskfzw2cjhjgs5cswdp3i7cpp651rb3zndh")))) | |
982 | (build-system gnu-build-system) | |
983 | (arguments | |
984 | `(#:modules ((guix build utils) | |
985 | (ice-9 popen) | |
986 | (ice-9 rdelim) | |
987 | (srfi srfi-1) | |
988 | (guix build gnu-build-system)) | |
989 | #:tests? #f ; there is no test target | |
990 | #:phases | |
991 | (modify-phases %standard-phases | |
992 | (delete 'configure) | |
993 | (delete 'build) | |
994 | (replace 'install | |
995 | (lambda* (#:key outputs #:allow-other-keys) | |
996 | (let* ((cwd (getcwd)) | |
997 | (scm-files (find-files "." "\\.scm$")) | |
998 | (effective (read-line | |
999 | (open-pipe* OPEN_READ | |
1000 | "guile" "-c" | |
1001 | "(display (effective-version))"))) | |
1002 | (module-dir (string-append (assoc-ref outputs "out") | |
1003 | "/share/guile/site/" | |
1004 | effective))) | |
1005 | ||
1006 | ;; Make installation directories. | |
1007 | (mkdir-p module-dir) | |
1008 | ||
1009 | (setenv "GUILE_AUTO_COMPILE" "0") | |
1010 | ||
1011 | ;; Compile .scm files and install. | |
1012 | (every (lambda (file) | |
1013 | (let ((go-file (string-append module-dir "/" | |
1014 | (basename file ".scm") ".go"))) | |
1015 | ;; Install source module. | |
1016 | (install-file file module-dir) | |
1017 | ;; Compile and install module. | |
1018 | (zero? (system* "guild" "compile" "-L" cwd | |
1019 | "-o" go-file file)))) | |
1020 | scm-files))))))) | |
1021 | (inputs | |
1022 | `(("guile" ,guile-2.2))) | |
1023 | (home-page "https://github.com/fisherdj/miniAdapton") | |
1024 | (synopsis "Minimal implementation of incremental computation in Guile | |
1025 | Scheme") | |
1026 | (description "This package provides a complete Scheme implementation of | |
1027 | miniAdapton, which implements the core functionality of the Adapton system for | |
1028 | incremental computation (also known as self-adjusting computation). Like | |
1029 | Adapton, miniAdapton allows programmers to safely combine mutation and | |
1030 | memoization. miniAdapton is built on top of an even simpler system, | |
1031 | microAdapton. Both miniAdapton and microAdapton are designed to be easy to | |
1032 | understand, extend, and port to host languages other than Scheme.") | |
1033 | (license license:expat)))) | |
1034 | ||
32e14fc1 CAW |
1035 | (define-public guile-irregex |
1036 | (package | |
1037 | (name "guile-irregex") | |
fb73f07a | 1038 | (version "0.9.6") |
32e14fc1 CAW |
1039 | (source (origin |
1040 | (method url-fetch) | |
1041 | (uri (string-append | |
1042 | "http://synthcode.com/scheme/irregex/irregex-" | |
d03f9446 | 1043 | version ".tar.gz")) |
32e14fc1 CAW |
1044 | (sha256 |
1045 | (base32 | |
fb73f07a | 1046 | "1ia3m7dp3lcxa048q0gqbiwwsyvn99baw6xkhb4bhhzn4k7bwyqq")))) |
32e14fc1 CAW |
1047 | (build-system gnu-build-system) |
1048 | (arguments | |
1049 | `(#:modules ((guix build utils) | |
1050 | (ice-9 match) | |
fe447664 LC |
1051 | (ice-9 rdelim) |
1052 | (ice-9 popen) | |
32e14fc1 CAW |
1053 | (guix build gnu-build-system)) |
1054 | #:phases | |
1055 | (modify-phases %standard-phases | |
32e14fc1 CAW |
1056 | (delete 'configure) |
1057 | (delete 'build) | |
1058 | (delete 'check) | |
1059 | (replace 'install | |
1060 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
fe447664 LC |
1061 | (let* ((out (assoc-ref outputs "out")) |
1062 | (effective (read-line | |
1063 | (open-pipe* OPEN_READ | |
1064 | "guile" "-c" | |
1065 | "(display (effective-version))"))) | |
1066 | (module-dir (string-append out "/share/guile/site/" | |
1067 | effective)) | |
1068 | (source (assoc-ref inputs "source")) | |
1069 | (doc (string-append out "/share/doc/guile-irregex/")) | |
1070 | (guild (string-append (assoc-ref %build-inputs "guile") | |
1071 | "/bin/guild"))) | |
1072 | ;; Make installation directories. | |
1073 | (mkdir-p (string-append module-dir "/rx/source")) | |
1074 | (mkdir-p doc) | |
1075 | ||
1076 | ;; Compile .scm files and install. | |
1077 | (setenv "GUILE_AUTO_COMPILE" "0") | |
1078 | ||
1079 | (for-each (lambda (copy-info) | |
1080 | (match copy-info | |
1081 | ((src-file dest-file-basis) | |
1082 | (let* ((dest-file (string-append | |
32e14fc1 | 1083 | module-dir dest-file-basis |
fe447664 LC |
1084 | ".scm")) |
1085 | (go-file (string-append | |
1086 | module-dir dest-file-basis | |
1087 | ".go"))) | |
1088 | ;; Install source module. | |
1089 | (copy-file src-file | |
1090 | dest-file) | |
1091 | ;; Install compiled module. | |
1092 | (unless (zero? (system* guild "compile" | |
1093 | "-L" (getcwd) | |
1094 | "-o" go-file | |
1095 | src-file)) | |
1096 | (error (format #f "Failed to compile ~s to ~s!" | |
1097 | src-file dest-file))))))) | |
1098 | '(("irregex-guile.scm" "/rx/irregex") | |
1099 | ("irregex.scm" "/rx/source/irregex") | |
1100 | ;; Not really reachable via guile's packaging system, | |
1101 | ;; but nice to have around | |
1102 | ("irregex-utils.scm" "/rx/source/irregex-utils"))) | |
1103 | ||
1104 | ;; Also copy over the README. | |
1105 | (install-file "irregex.html" doc) | |
1106 | #t)))))) | |
32e14fc1 CAW |
1107 | (inputs |
1108 | `(("guile" ,guile-2.0))) | |
1109 | (home-page "http://synthcode.com/scheme/irregex") | |
1110 | (synopsis "S-expression based regular expressions") | |
1111 | (description | |
1112 | "Irregex is an s-expression based alternative to your classic | |
1113 | string-based regular expressions. It implements SRFI 115 and is deeply | |
1114 | inspired by the SCSH regular expression system.") | |
71e0f217 | 1115 | (license license:bsd-3))) |
93e7199b | 1116 | |
947a5d47 LC |
1117 | (define-public guile2.2-irregex |
1118 | (package-for-guile-2.2 guile-irregex)) | |
1119 | ||
93e7199b CAW |
1120 | ;; There are two guile-gdbm packages, one using the FFI and one with |
1121 | ;; direct C bindings, hence the verbose name. | |
1122 | ||
1123 | (define-public guile-gdbm-ffi | |
1124 | (package | |
1125 | (name "guile-gdbm-ffi") | |
1126 | (version "20120209.fa1d5b6") | |
1127 | (source (origin | |
1128 | (method git-fetch) | |
1129 | (uri (git-reference | |
1130 | (url "https://github.com/ijp/guile-gdbm.git") | |
1131 | (commit "fa1d5b6231d0e4d096687b378c025f2148c5f246"))) | |
821f4dc2 | 1132 | (file-name (string-append name "-" version "-checkout")) |
93e7199b CAW |
1133 | (sha256 |
1134 | (base32 | |
1135 | "1j8wrsw7v9w6qkl47xz0rdikg50v16nn6kbs3lgzcymjzpa7babj")))) | |
1136 | (build-system trivial-build-system) | |
1137 | (arguments | |
1138 | `(#:modules | |
1139 | ((guix build utils)) | |
1140 | #:builder | |
1141 | (begin | |
1142 | (use-modules (guix build utils) | |
a5bd6a5e CAW |
1143 | (ice-9 rdelim) |
1144 | (ice-9 popen)) | |
1145 | ||
1146 | ;; Avoid warnings we can safely ignore | |
1147 | (setenv "GUILE_AUTO_COMPILE" "0") | |
93e7199b CAW |
1148 | |
1149 | (let* ((out (assoc-ref %outputs "out")) | |
a5bd6a5e CAW |
1150 | (effective-version |
1151 | (read-line | |
1152 | (open-pipe* OPEN_READ | |
1153 | (string-append | |
1154 | (assoc-ref %build-inputs "guile") | |
1155 | "/bin/guile") | |
1156 | "-c" "(display (effective-version))"))) | |
1157 | (module-dir (string-append out "/share/guile/site/" | |
1158 | effective-version)) | |
93e7199b CAW |
1159 | (source (assoc-ref %build-inputs "source")) |
1160 | (doc (string-append out "/share/doc")) | |
1161 | (guild (string-append (assoc-ref %build-inputs "guile") | |
1162 | "/bin/guild")) | |
1163 | (gdbm.scm-dest | |
1164 | (string-append module-dir "/gdbm.scm")) | |
1165 | (gdbm.go-dest | |
a5bd6a5e CAW |
1166 | (string-append module-dir "/gdbm.go")) |
1167 | (compile-file | |
1168 | (lambda (in-file out-file) | |
07e36357 | 1169 | (invoke guild "compile" "-o" out-file in-file)))) |
93e7199b CAW |
1170 | ;; Switch directory for compiling and installing |
1171 | (chdir source) | |
1172 | ||
4168ddf6 TGR |
1173 | ;; Install the documentation. |
1174 | (install-file "README.md" doc) | |
1175 | (copy-recursively "examples" (string-append doc "/examples")) | |
1176 | ||
1177 | ;; Make installation directories. | |
1178 | (mkdir-p module-dir) | |
1179 | ||
93e7199b CAW |
1180 | ;; copy the source |
1181 | (copy-file "gdbm.scm" gdbm.scm-dest) | |
1182 | ||
1183 | ;; Patch the FFI | |
1184 | (substitute* gdbm.scm-dest | |
1185 | (("\\(dynamic-link \"libgdbm\"\\)") | |
1186 | (format #f "(dynamic-link \"~a/lib/libgdbm.so\")" | |
1187 | (assoc-ref %build-inputs "gdbm")))) | |
1188 | ||
1189 | ;; compile to the destination | |
a5bd6a5e | 1190 | (compile-file gdbm.scm-dest gdbm.go-dest))))) |
93e7199b | 1191 | (inputs |
5bd3a841 | 1192 | `(("guile" ,guile-2.2))) |
93e7199b CAW |
1193 | (propagated-inputs |
1194 | `(("gdbm" ,gdbm))) | |
1195 | (home-page "https://github.com/ijp/guile-gdbm") | |
1196 | (synopsis "Guile bindings to the GDBM library via Guile's FFI") | |
1197 | (description | |
1198 | "Guile bindings to the GDBM key-value storage system, using | |
1199 | Guile's foreign function interface.") | |
71e0f217 | 1200 | (license license:gpl3+))) |
93e7199b | 1201 | |
5bd3a841 LC |
1202 | (define-public guile2.0-gdbm-ffi |
1203 | (package-for-guile-2.0 guile-gdbm-ffi)) | |
1204 | ||
2737bcff | 1205 | (define-public guile2.2-gdbm-ffi |
5bd3a841 | 1206 | (deprecated-package "guile2.2-gdbm-ffi" guile-gdbm-ffi)) |
93e7199b | 1207 | |
e8ac1f8f | 1208 | (define-public guile-sqlite3 |
499e499b LC |
1209 | (let ((commit "10c13a7e02ab1655c8a758e560cafc9d6eff26f4") |
1210 | (revision "4")) | |
e8ac1f8f LC |
1211 | (package |
1212 | (name "guile-sqlite3") | |
18adb1f0 | 1213 | (version (git-version "0.0" revision commit)) |
e8ac1f8f | 1214 | |
ae21519f LC |
1215 | ;; XXX: This used to be available read-only at |
1216 | ;; <https://www.gitorious.org/guile-sqlite3/guile-sqlite3.git/> but it | |
1217 | ;; eventually disappeared, so we have our own copy here. | |
1218 | (home-page "https://notabug.org/civodul/guile-sqlite3.git") | |
e8ac1f8f LC |
1219 | (source (origin |
1220 | (method git-fetch) | |
1221 | (uri (git-reference | |
1222 | (url home-page) | |
1223 | (commit commit))) | |
1224 | (sha256 | |
1225 | (base32 | |
499e499b | 1226 | "0nhhswpd7nb2f0gfr55fzcc2xm3l2xx4rbljsd1clrm8fj2d7q9d")) |
e8ac1f8f LC |
1227 | (file-name (string-append name "-" version "-checkout")) |
1228 | (modules '((guix build utils))) | |
1229 | (snippet | |
1230 | ;; Upgrade 'Makefile.am' to the current way of doing things. | |
6cbee49d MW |
1231 | '(begin |
1232 | (substitute* "Makefile.am" | |
1233 | (("TESTS_ENVIRONMENT") | |
1234 | "TEST_LOG_COMPILER")) | |
1235 | #t)))) | |
e8ac1f8f LC |
1236 | |
1237 | (build-system gnu-build-system) | |
1238 | (native-inputs | |
1239 | `(("autoconf" ,autoconf) | |
1240 | ("automake" ,automake) | |
1241 | ("pkg-config" ,pkg-config))) | |
1242 | (inputs | |
99bde93b | 1243 | `(("guile" ,guile-2.2) |
e8ac1f8f LC |
1244 | ("sqlite" ,sqlite))) |
1245 | (arguments | |
1246 | '(#:phases (modify-phases %standard-phases | |
d10092b8 | 1247 | (add-after 'unpack 'autoreconf |
e8ac1f8f LC |
1248 | (lambda _ |
1249 | (zero? (system* "autoreconf" "-vfi")))) | |
1250 | (add-before 'build 'set-sqlite3-file-name | |
1251 | (lambda* (#:key inputs #:allow-other-keys) | |
1252 | (substitute* "sqlite3.scm" | |
1253 | (("\"libsqlite3\"") | |
1254 | (string-append "\"" (assoc-ref inputs "sqlite") | |
1255 | "/lib/libsqlite3\""))) | |
1256 | #t))))) | |
1257 | (synopsis "Access SQLite databases from Guile") | |
1258 | (description | |
1259 | "This package provides Guile bindings to the SQLite database system.") | |
71e0f217 | 1260 | (license license:gpl3+)))) |
e8ac1f8f | 1261 | |
27f5e13e DT |
1262 | (define-public haunt |
1263 | (package | |
1264 | (name "haunt") | |
907254e5 | 1265 | (version "0.2.2") |
27f5e13e DT |
1266 | (source (origin |
1267 | (method url-fetch) | |
4960beaa | 1268 | (uri (string-append "https://files.dthompson.us/haunt/haunt-" |
27f5e13e DT |
1269 | version ".tar.gz")) |
1270 | (sha256 | |
1271 | (base32 | |
907254e5 | 1272 | "0nm00krmqq4zmqi2irh35dbf2cn6al58s620hijmhfvhgvdqznlp")))) |
27f5e13e | 1273 | (build-system gnu-build-system) |
4ecbf6d2 LC |
1274 | (arguments |
1275 | `(#:modules ((ice-9 match) (ice-9 ftw) | |
1276 | ,@%gnu-build-system-modules) | |
1e406301 | 1277 | #:tests? #f ; test suite is non-deterministic :( |
4ecbf6d2 LC |
1278 | #:phases (modify-phases %standard-phases |
1279 | (add-after 'install 'wrap-haunt | |
1280 | (lambda* (#:key outputs #:allow-other-keys) | |
1281 | ;; Wrap the 'haunt' command to refer to the right | |
1282 | ;; modules. | |
1283 | (let* ((out (assoc-ref outputs "out")) | |
1284 | (bin (string-append out "/bin")) | |
1285 | (site (string-append | |
1286 | out "/share/guile/site"))) | |
1287 | (match (scandir site) | |
1288 | (("." ".." version) | |
907254e5 DT |
1289 | (let ((modules (string-append site "/" version)) |
1290 | (compiled-modules (string-append | |
1291 | out "/lib/guile/" version | |
1292 | "/site-ccache"))) | |
4ecbf6d2 LC |
1293 | (wrap-program (string-append bin "/haunt") |
1294 | `("GUILE_LOAD_PATH" ":" prefix | |
1295 | (,modules)) | |
1296 | `("GUILE_LOAD_COMPILED_PATH" ":" prefix | |
907254e5 | 1297 | (,compiled-modules))) |
4ecbf6d2 | 1298 | #t))))))))) |
4960beaa DT |
1299 | (native-inputs |
1300 | `(("pkg-config" ,pkg-config) | |
1301 | ("texinfo" ,texinfo))) | |
27f5e13e | 1302 | (inputs |
bd19f65a | 1303 | `(("guile" ,guile-2.2))) |
4960beaa | 1304 | (propagated-inputs |
9b1a497e AP |
1305 | `(("guile-reader" ,guile-reader) |
1306 | ("guile-commonmark" ,guile-commonmark))) | |
27f5e13e DT |
1307 | (synopsis "Functional static site generator") |
1308 | (description "Haunt is a static site generator written in Guile | |
1309 | Scheme. Haunt features a functional build system and an extensible | |
1310 | interface for reading articles in any format.") | |
1311 | (home-page "http://haunt.dthompson.us") | |
71e0f217 | 1312 | (license license:gpl3+))) |
27f5e13e | 1313 | |
bd19f65a LC |
1314 | (define-public guile2.0-haunt |
1315 | (package-for-guile-2.0 | |
1316 | (package (inherit haunt) (name "guile2.0-haunt")))) | |
64f34aef | 1317 | (define-public guile2.2-haunt |
bd19f65a | 1318 | (deprecated-package "guile2.2-haunt" haunt)) |
64f34aef | 1319 | |
44a2bdf8 AS |
1320 | (define-public guile-config |
1321 | (package | |
1322 | (name "guile-config") | |
3c98acb7 | 1323 | (version "0.1.1") |
44a2bdf8 AS |
1324 | (source (origin |
1325 | (method url-fetch) | |
1326 | (uri (string-append | |
1327 | "http://alex.pompo.co/software/" name "-" version | |
1328 | ".tar.gz")) | |
1329 | (sha256 | |
1330 | (base32 | |
3c98acb7 | 1331 | "1b719bn192f9wg24rr0zx8jpmygsvyhfi35iy778pb5p392snrn8")))) |
44a2bdf8 AS |
1332 | (build-system gnu-build-system) |
1333 | (inputs | |
1334 | `(("guile" ,guile-2.0))) | |
1335 | (synopsis "Guile application configuration parsing library") | |
1336 | (description | |
1337 | "Guile Config is a library providing a declarative approach to | |
1338 | application configuration specification. The library provides clean | |
1339 | configuration declaration forms, and processors that take care of: | |
1340 | configuration file creation; configuration file parsing; command-line | |
1341 | parameter parsing using getopt-long; basic GNU command-line parameter | |
1342 | generation (--help, --usage, --version); automatic output generation for the | |
1343 | above command-line parameters.") | |
1344 | (home-page "https://github.com/a-sassmannshausen/guile-config") | |
71e0f217 | 1345 | (license license:agpl3+))) |
44a2bdf8 | 1346 | |
36548111 DT |
1347 | (define-public guile-redis |
1348 | (package | |
1349 | (name "guile-redis") | |
1350 | (version "0.1.0") | |
1351 | (source (origin | |
1352 | (method url-fetch) | |
1353 | (uri (string-append "mirror://savannah/guile-redis/guile-redis-" | |
1354 | version ".tar.gz")) | |
1355 | (sha256 | |
1356 | (base32 | |
1357 | "0vx6if6b4r3kwx64vzbs6vpc0cpcr85x11w9vkzq27gw8n7isv56")) | |
1358 | (modules '((guix build utils))) | |
1359 | (snippet | |
ea833d30 | 1360 | ;; Make sure everything goes under .../site/X.Y, like Guile's |
36548111 | 1361 | ;; search paths expects. |
ea833d30 RW |
1362 | '(begin |
1363 | (substitute* "configure" | |
1364 | (("ac_subst_vars='") | |
1365 | "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n")) | |
1366 | (substitute* '("Makefile.in" | |
1367 | "redis/Makefile.in" | |
1368 | "redis/commands/Makefile.in") | |
1369 | (("moddir =.*/share/guile/site" all) | |
6cbee49d MW |
1370 | (string-append all "/@GUILE_EFFECTIVE_VERSION@"))) |
1371 | #t)))) | |
36548111 DT |
1372 | (build-system gnu-build-system) |
1373 | (native-inputs | |
1374 | `(("guile" ,guile-2.0))) | |
340978d7 | 1375 | (home-page "https://savannah.nongnu.org/projects/guile-redis/") |
36548111 DT |
1376 | (synopsis "Redis client library for Guile") |
1377 | (description "Guile-redis provides a Scheme interface to the Redis | |
1378 | key-value cache and store.") | |
71e0f217 | 1379 | (license license:lgpl3+))) |
36548111 | 1380 | |
85313be8 RW |
1381 | (define-public guile2.2-redis |
1382 | (package-for-guile-2.2 guile-redis)) | |
1383 | ||
9d373377 CAW |
1384 | (define-public guile-wisp |
1385 | (package | |
1386 | (name "guile-wisp") | |
e0840905 | 1387 | (version "0.9.8") |
9d373377 CAW |
1388 | (source (origin |
1389 | (method url-fetch) | |
1390 | (uri (string-append "https://bitbucket.org/ArneBab/" | |
1391 | "wisp/downloads/wisp-" | |
1392 | version ".tar.gz")) | |
1393 | (sha256 | |
1394 | (base32 | |
e0840905 | 1395 | "1f2bbicq1rxnwmiplrm4r75wj06w385mjkyvi7g4k740bgwcrzxr")))) |
9d373377 CAW |
1396 | (build-system gnu-build-system) |
1397 | (arguments | |
e8374e69 LC |
1398 | `(#:modules ((guix build gnu-build-system) |
1399 | (guix build utils) | |
1400 | (ice-9 rdelim) | |
1401 | (ice-9 popen)) | |
1402 | ||
9d373377 CAW |
1403 | #:phases |
1404 | (modify-phases %standard-phases | |
e0840905 | 1405 | (add-before 'configure 'substitute-before-config |
9d373377 CAW |
1406 | |
1407 | (lambda* (#:key inputs #:allow-other-keys) | |
1408 | (let ((bash (assoc-ref inputs "bash"))) | |
9d373377 CAW |
1409 | ;; Puts together some test files with /bin/bash hardcoded |
1410 | (substitute* "Makefile.in" | |
e0840905 LC |
1411 | (("/usr/bin/env bash") |
1412 | (string-append bash "/bin/bash")) | |
1413 | (("\\$\\(GUILE_EFFECTIVE_VERSION\\)/site") | |
1414 | "site/$(GUILE_EFFECTIVE_VERSION)")) ;use the right order | |
9d373377 CAW |
1415 | #t))) |
1416 | ||
1417 | ;; auto compilation breaks, but if we set HOME to /tmp, | |
1418 | ;; that works ok | |
1419 | (add-before | |
1420 | 'check 'auto-compile-hacky-workaround | |
1421 | (lambda _ | |
1422 | (setenv "HOME" "/tmp") | |
1423 | #t)) | |
e0840905 | 1424 | (add-after 'install 'install-go-files |
9d373377 CAW |
1425 | (lambda* (#:key outputs inputs #:allow-other-keys) |
1426 | (let* ((out (assoc-ref outputs "out")) | |
e8374e69 LC |
1427 | (effective (read-line |
1428 | (open-pipe* OPEN_READ | |
1429 | "guile" "-c" | |
1430 | "(display (effective-version))"))) | |
1431 | (module-dir (string-append out "/share/guile/site/" | |
1432 | effective)) | |
1433 | (object-dir (string-append out "/lib/guile/" effective | |
1434 | "/site-ccache")) | |
1435 | (prefix (string-length module-dir))) | |
9d373377 | 1436 | ;; compile to the destination |
e0840905 | 1437 | (for-each (lambda (file) |
e8374e69 LC |
1438 | (let* ((base (string-drop (string-drop-right file 4) |
1439 | prefix)) | |
1440 | (go (string-append object-dir base ".go"))) | |
1441 | (invoke "guild" "compile" "-L" module-dir | |
1442 | file "-o" go))) | |
e0840905 | 1443 | (find-files module-dir "\\.scm$")) |
9d373377 CAW |
1444 | #t)))))) |
1445 | (home-page "http://draketo.de/english/wisp") | |
1446 | (inputs | |
89c4bfe7 | 1447 | `(("guile" ,guile-2.2))) |
e0840905 LC |
1448 | (native-inputs |
1449 | `(("python" ,python) | |
1450 | ("pkg-config" ,pkg-config))) | |
a124bbd2 SB |
1451 | (synopsis "Whitespace to lisp syntax for Guile") |
1452 | (description "Wisp is a syntax for Guile which provides a Python-like | |
9d373377 CAW |
1453 | whitespace-significant language. It may be easier on the eyes for some |
1454 | users and in some situations.") | |
71e0f217 | 1455 | (license license:gpl3+))) |
9d373377 | 1456 | |
5649c8cd DT |
1457 | (define-public guile-sly |
1458 | (package | |
1459 | (name "guile-sly") | |
1460 | (version "0.1") | |
1461 | (source (origin | |
1462 | (method url-fetch) | |
8d5e7ad2 | 1463 | (uri (string-append "https://files.dthompson.us/sly/sly-" |
5649c8cd DT |
1464 | version ".tar.gz")) |
1465 | (sha256 | |
1466 | (base32 | |
44394ef9 LC |
1467 | "1svzlbz2vripmyq2kjh0rig16bsrnbkwbsm558pjln9l65mcl4qq")) |
1468 | (modules '((guix build utils))) | |
1469 | (snippet | |
1470 | '(begin | |
1471 | (substitute* "configure" | |
1472 | (("_guile_required_version=\"2.0.11\"") | |
1473 | "_guile_required_version=\"2\"") | |
1474 | (("ac_subst_vars='") | |
1475 | "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n")) | |
1476 | (substitute* (find-files "." "Makefile.in") | |
1477 | (("moddir = .*$") | |
1478 | (string-append | |
1479 | "moddir = " | |
1480 | "$(prefix)/share/guile/site/@GUILE_EFFECTIVE_VERSION@\n")) | |
1481 | (("godir = .*$") | |
1482 | (string-append | |
1483 | "godir = " | |
6cbee49d MW |
1484 | "$(prefix)/lib/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n"))) |
1485 | #t)))) | |
5649c8cd DT |
1486 | (build-system gnu-build-system) |
1487 | (arguments | |
1488 | '(#:configure-flags | |
1489 | (list (string-append "--with-libfreeimage-prefix=" | |
1490 | (assoc-ref %build-inputs "freeimage")) | |
1491 | (string-append "--with-libgslcblas-prefix=" | |
1492 | (assoc-ref %build-inputs "gsl"))))) | |
1493 | (native-inputs | |
1494 | `(("pkg-config" ,pkg-config))) | |
1495 | (propagated-inputs | |
2e7825bc | 1496 | `(("guile-sdl" ,guile-sdl) |
5649c8cd DT |
1497 | ("guile-opengl" ,guile-opengl))) |
1498 | (inputs | |
2e7825bc LC |
1499 | `(("guile" ,guile-2.2) |
1500 | ("gsl" ,gsl) | |
5649c8cd DT |
1501 | ("freeimage" ,freeimage) |
1502 | ("mesa" ,mesa))) | |
1503 | (synopsis "2D/3D game engine for GNU Guile") | |
1504 | (description "Sly is a 2D/3D game engine written in Guile Scheme. Sly | |
1505 | features a functional reactive programming interface and live coding | |
1506 | capabilities.") | |
1507 | (home-page "http://dthompson.us/pages/software/sly.html") | |
71e0f217 | 1508 | (license license:gpl3+))) |
5649c8cd | 1509 | |
dec1e2b3 AB |
1510 | (define-public g-wrap |
1511 | (package | |
1512 | (name "g-wrap") | |
1513 | (version "1.9.15") | |
1514 | (source (origin | |
1515 | (method url-fetch) | |
1516 | (uri (string-append "mirror://savannah/g-wrap/g-wrap-" | |
1517 | version ".tar.gz")) | |
1518 | (sha256 | |
1519 | (base32 | |
1520 | "0ak0bha37dfpj9kmyw1r8fj8nva639aw5xr66wr5gd3l1rqf5xhg")))) | |
1521 | (build-system gnu-build-system) | |
1522 | (native-inputs | |
1523 | `(("pkg-config" ,pkg-config))) | |
1524 | (propagated-inputs | |
61583094 | 1525 | `(("guile" ,guile-2.2) |
dec1e2b3 AB |
1526 | ("guile-lib" ,guile-lib))) |
1527 | (inputs | |
1528 | `(("libffi" ,libffi))) | |
9e8599a3 | 1529 | (arguments |
61583094 TF |
1530 | `(#:configure-flags '("--disable-Werror") |
1531 | #:phases | |
1532 | (modify-phases %standard-phases | |
1533 | (add-before 'configure 'pre-configure | |
1534 | (lambda* (#:key outputs #:allow-other-keys) | |
1535 | (let ((out (assoc-ref outputs "out"))) | |
1536 | (substitute* (find-files "." "^Makefile.in$") | |
1537 | (("guilemoduledir =.*guile/site" all) | |
1538 | (string-append all "/@GUILE_EFFECTIVE_VERSION@"))) | |
1539 | #t)))))) | |
dec1e2b3 AB |
1540 | (synopsis "Generate C bindings for Guile") |
1541 | (description "G-Wrap is a tool and Guile library for generating function | |
1542 | wrappers for inter-language calls. It currently only supports generating Guile | |
1543 | wrappers for C functions. Given a definition of the types and prototypes for | |
1544 | a given C interface, G-Wrap will automatically generate the C code that | |
1545 | provides access to that interface and its types from the Scheme level.") | |
340978d7 | 1546 | (home-page "https://www.nongnu.org/g-wrap/index.html") |
71e0f217 | 1547 | (license license:lgpl2.1+))) |
dec1e2b3 | 1548 | |
01497dfe LC |
1549 | (define-public guile-dbi |
1550 | (package | |
1551 | (name "guile-dbi") | |
1552 | (version "2.1.6") | |
1553 | (source (origin | |
1554 | (method url-fetch) | |
1555 | (uri (string-append | |
1556 | "http://download.gna.org/guile-dbi/guile-dbi-" | |
1557 | version ".tar.gz")) | |
1558 | (sha256 | |
1559 | (base32 | |
1560 | "116njrprhgrsv1qm904sp3b02rq01fx639r433d657gyhw3x159n")))) | |
1561 | (build-system gnu-build-system) | |
1562 | (arguments | |
1563 | '(#:configure-flags | |
1564 | (list (string-append | |
1565 | "--with-guile-site-dir=" %output "/share/guile/site/2.0")) | |
1566 | #:phases | |
1567 | (modify-phases %standard-phases | |
1568 | (add-after 'install 'patch-extension-path | |
1569 | (lambda* (#:key outputs #:allow-other-keys) | |
1570 | (let* ((out (assoc-ref outputs "out")) | |
1571 | (dbi.scm (string-append | |
1572 | out "/share/guile/site/2.0/dbi/dbi.scm")) | |
1573 | (ext (string-append out "/lib/libguile-dbi"))) | |
1574 | (substitute* dbi.scm (("libguile-dbi") ext)) | |
1575 | #t)))))) | |
1576 | (propagated-inputs | |
1577 | `(("guile" ,guile-2.0))) | |
1578 | (synopsis "Guile database abstraction layer") | |
1579 | (home-page "http://home.gna.org/guile-dbi/guile-dbi.html") | |
1580 | (description | |
1581 | "guile-dbi is a library for Guile that provides a convenient interface to | |
1582 | SQL databases. Database programming with guile-dbi is generic in that the same | |
1583 | programming interface is presented regardless of which database system is used. | |
1584 | It currently supports MySQL, Postgres and SQLite3.") | |
71e0f217 | 1585 | (license license:gpl2+))) |
01497dfe LC |
1586 | |
1587 | (define-public guile-dbd-sqlite3 | |
1588 | (package | |
1589 | (name "guile-dbd-sqlite3") | |
1590 | (version "2.1.6") | |
1591 | (source (origin | |
1592 | (method url-fetch) | |
1593 | (uri (string-append | |
1594 | "http://download.gna.org/guile-dbi/guile-dbd-sqlite3-" | |
1595 | version ".tar.gz")) | |
1596 | (sha256 | |
1597 | (base32 | |
1598 | "0rg71jchxd2y8x496s8zmfmikr5g8zxi8zv2ar3f7a23pph92iw2")))) | |
1599 | (build-system gnu-build-system) | |
1600 | (native-inputs | |
1601 | `(("pkg-config" ,pkg-config))) | |
1602 | (inputs | |
1603 | `(("sqlite" ,sqlite) | |
1604 | ("zlib" ,(@ (gnu packages compression) zlib)))) | |
1605 | (propagated-inputs | |
1606 | `(("guile-dbi" ,guile-dbi))) | |
1607 | (synopsis "Guile DBI driver for SQLite") | |
1608 | (home-page "https://github.com/jkalbhenn/guile-dbd-sqlite3") | |
1609 | (description | |
1610 | "guile-dbi is a library for Guile that provides a convenient interface to | |
1611 | SQL databases. This package implements the interface for SQLite.") | |
71e0f217 | 1612 | (license license:gpl2+))) |
01497dfe | 1613 | |
e9291eaa AS |
1614 | (define-public guile-dsv |
1615 | (package | |
1616 | (name "guile-dsv") | |
8c80f8ef | 1617 | (version "0.2.1") |
e9291eaa AS |
1618 | (source (origin |
1619 | (method git-fetch) | |
1620 | (uri (git-reference | |
1621 | (url "https://github.com/artyom-poptsov/guile-dsv") | |
8c80f8ef | 1622 | (commit "bdc5267d007478abc20ea96d7c459b7dd9560b3d"))) |
e9291eaa AS |
1623 | (file-name (string-append name "-" version "-checkout")) |
1624 | (sha256 | |
1625 | (base32 | |
8c80f8ef | 1626 | "1irw6mz8998nwyhzrw9g94jcz60b9zljgqfmipaz1ybn8579qjx0")))) |
e9291eaa AS |
1627 | (build-system gnu-build-system) |
1628 | (native-inputs | |
1629 | `(("autoconf" ,autoconf) | |
1630 | ("automake" ,automake) | |
1631 | ("pkg-config" ,pkg-config) | |
1632 | ("texinfo" ,texinfo))) | |
1633 | (inputs `(("guile" ,guile-2.2))) | |
1634 | (propagated-inputs `(("guile-lib" ,guile-lib))) | |
1635 | (arguments | |
1636 | '(#:phases (modify-phases %standard-phases | |
1637 | (add-before 'configure 'set-guilesitedir | |
1638 | (lambda _ | |
1639 | (substitute* "Makefile.in" | |
1640 | (("^guilesitedir =.*$") | |
1641 | "guilesitedir = \ | |
1642 | $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n")) | |
1643 | (substitute* "modules/Makefile.in" | |
1644 | (("^guilesitedir =.*$") | |
1645 | "guilesitedir = \ | |
1646 | $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n")) | |
1647 | (substitute* "modules/dsv/Makefile.in" | |
1648 | (("^guilesitedir =.*$") | |
1649 | "guilesitedir = \ | |
1650 | $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n")) | |
1651 | #t)) | |
1652 | (add-after 'unpack 'autoreconf | |
1653 | (lambda _ | |
1654 | (zero? (system* "autoreconf" "-vfi"))))))) | |
1655 | (home-page "https://github.com/artyom-poptsov/guile-dsv") | |
1656 | (synopsis "DSV module for Guile") | |
1657 | (description | |
1658 | "Guile-DSV is a GNU Guile module for working with the | |
1659 | delimiter-separated values (DSV) data format. Guile-DSV supports the | |
1660 | Unix-style DSV format and RFC 4180 format.") | |
1661 | (license license:gpl3+))) | |
1662 | ||
bd9af610 AK |
1663 | (define-public guile-xosd |
1664 | (package | |
1665 | (name "guile-xosd") | |
4b2b7135 | 1666 | (version "0.2.1") |
bd9af610 AK |
1667 | (source (origin |
1668 | (method url-fetch) | |
1669 | (uri (string-append "https://github.com/alezost/" name | |
1670 | "/releases/download/v" version | |
1671 | "/" name "-" version ".tar.gz")) | |
1672 | (sha256 | |
1673 | (base32 | |
4b2b7135 | 1674 | "1ri5065c16kmgrf2pysn2ymxjqi5302lhpb07wkl1jr75ym8fn8p")))) |
bd9af610 AK |
1675 | (build-system gnu-build-system) |
1676 | (native-inputs | |
1677 | `(("pkg-config" ,pkg-config))) | |
1678 | (inputs | |
c6726a5f | 1679 | `(("guile" ,guile-2.2) |
bd9af610 AK |
1680 | ("libx11" ,libx11) |
1681 | ("libxext" ,libxext) | |
1682 | ("libxinerama" ,libxinerama) | |
1683 | ("xosd" ,xosd))) | |
1684 | (home-page "https://github.com/alezost/guile-xosd") | |
1685 | (synopsis "XOSD bindings for Guile") | |
1686 | (description | |
1687 | "Guile-XOSD provides Guile bindings for @code{libxosd}, | |
1688 | @uref{http://sourceforge.net/projects/libxosd/, the X On Screen Display | |
1689 | library}.") | |
71e0f217 | 1690 | (license license:gpl3+))) |
bd9af610 | 1691 | |
07f7cc03 AK |
1692 | (define-public guile-daemon |
1693 | (package | |
1694 | (name "guile-daemon") | |
5245399f | 1695 | (version "0.1.2") |
07f7cc03 AK |
1696 | (source (origin |
1697 | (method url-fetch) | |
1698 | (uri (string-append "https://github.com/alezost/" name | |
1699 | "/releases/download/v" version | |
1700 | "/" name "-" version ".tar.gz")) | |
1701 | (sha256 | |
1702 | (base32 | |
5245399f | 1703 | "0hh6gq6b6phpxm0b1dkxyzj3f4sxdf7dji63609lzypa5v1ad2gv")))) |
07f7cc03 AK |
1704 | (build-system gnu-build-system) |
1705 | (native-inputs | |
1706 | `(("pkg-config" ,pkg-config))) | |
1707 | (inputs | |
c6726a5f | 1708 | `(("guile" ,guile-2.2))) |
07f7cc03 AK |
1709 | (home-page "https://github.com/alezost/guile-daemon") |
1710 | (synopsis "Evaluate code in a running Guile process") | |
1711 | (description | |
1712 | "Guile-Daemon is a small Guile program that loads your initial | |
1713 | configuration file, and then reads and evaluates Guile expressions that | |
1714 | you send to a FIFO file.") | |
71e0f217 | 1715 | (license license:gpl3+))) |
07f7cc03 | 1716 | |
e28e74a5 EE |
1717 | (define-public guile-commonmark |
1718 | (package | |
1719 | (name "guile-commonmark") | |
1720 | (version "0.1") | |
1721 | (source (origin | |
1722 | (method url-fetch) | |
1723 | (uri (string-append "https://github.com/OrangeShark/" name | |
1724 | "/releases/download/v" version | |
1725 | "/" name "-" version ".tar.gz")) | |
1726 | (sha256 | |
1727 | (base32 | |
757ce0f9 LC |
1728 | "12cb5fqvvgc87f5xp0ih5az305wnjia89l5jba83d0r2p8bfy0b0")) |
1729 | (modules '((guix build utils))) | |
1730 | (snippet | |
1731 | ;; Use the real effective version of Guile in directory names | |
1732 | ;; instead of a hard-coded "/2.0". | |
1733 | '(begin | |
1734 | (substitute* "configure" | |
1735 | (("ac_subst_vars='") | |
1736 | "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n")) | |
1737 | (substitute* "Makefile.in" | |
1738 | (("/site/2.0") | |
6cbee49d MW |
1739 | "/site/@GUILE_EFFECTIVE_VERSION@")) |
1740 | #t)))) | |
e28e74a5 EE |
1741 | (build-system gnu-build-system) |
1742 | (inputs | |
7c86c031 | 1743 | `(("guile" ,guile-2.2))) |
e28e74a5 EE |
1744 | (synopsis "CommonMark parser for Guile") |
1745 | (description | |
1746 | "guile-commonmark is a library for parsing CommonMark, a fully specified | |
1747 | variant of Markdown. The library is written in Guile Scheme and is designed | |
1748 | to transform a CommonMark document to SXML. guile-commonmark tries to closely | |
1749 | follow the @uref{http://commonmark.org/, CommonMark spec}, the main difference | |
1750 | is no support for parsing block and inline level HTML.") | |
1751 | (home-page "https://github.com/OrangeShark/guile-commonmark") | |
71e0f217 | 1752 | (license license:lgpl3+))) |
e28e74a5 | 1753 | |
7c86c031 LC |
1754 | (define-public guile2.0-commonmark |
1755 | (package-for-guile-2.0 guile-commonmark)) | |
947a5d47 | 1756 | (define-public guile2.2-commonmark |
7c86c031 | 1757 | (deprecated-package "guile2.2-commonmark" guile-commonmark)) |
947a5d47 | 1758 | |
3b5783fc AB |
1759 | (define-public guile-bytestructures |
1760 | (package | |
1761 | (name "guile-bytestructures") | |
4f85f7f7 | 1762 | (version "1.0.1") |
3b5783fc | 1763 | (source (origin |
4f85f7f7 | 1764 | (method url-fetch) |
1765 | (uri (string-append "https://github.com/TaylanUB/scheme-bytestructures" | |
1766 | "/releases/download/v" version | |
1767 | "/bytestructures-" version ".tar.gz")) | |
3b5783fc AB |
1768 | (sha256 |
1769 | (base32 | |
4f85f7f7 | 1770 | "1lnfcy65mqj823lamy2n2vaghdz0g7mj011bgnhmd6hwpnaidnh2")))) |
1771 | (build-system gnu-build-system) | |
726ecfeb | 1772 | (native-inputs |
4f85f7f7 | 1773 | `(("pkg-config" ,pkg-config))) |
3b5783fc | 1774 | (inputs |
aabece2e | 1775 | `(("guile" ,guile-2.2))) |
3b5783fc AB |
1776 | (home-page "https://github.com/TaylanUB/scheme-bytestructures") |
1777 | (synopsis "Structured access to bytevector contents for Guile") | |
1778 | (description | |
1779 | "Guile bytestructures offers a system imitating the type system | |
1780 | of the C programming language, to be used on bytevectors. C's type | |
1781 | system works on raw memory, and Guile works on bytevectors which are | |
1782 | an abstraction over raw memory. It's also more powerful than the C | |
1783 | type system, elevating types to first-class status.") | |
71e0f217 | 1784 | (license license:gpl3+))) |
3b5783fc | 1785 | |
726ecfeb LC |
1786 | (define-public guile2.0-bytestructures |
1787 | (package-for-guile-2.0 guile-bytestructures)) | |
1788 | ||
472fc855 LC |
1789 | (define-public guile-aspell |
1790 | (package | |
1791 | (name "guile-aspell") | |
234ea3d6 | 1792 | (version "0.4") |
472fc855 LC |
1793 | (source (origin |
1794 | (method url-fetch) | |
1795 | (uri (string-append | |
1796 | "http://lonelycactus.com/tarball/guile_aspell-" | |
1797 | version ".tar.gz")) | |
1798 | (sha256 | |
1799 | (base32 | |
234ea3d6 | 1800 | "0vpk5xj9m9qc702z3khmkwhgpb949qbsyz8kw2qycda6qnxk0077")))) |
472fc855 LC |
1801 | (build-system gnu-build-system) |
1802 | (arguments | |
7295087e LC |
1803 | '(#:phases (modify-phases %standard-phases |
1804 | (add-before 'configure 'set-guilesitedir | |
1805 | (lambda _ | |
1806 | (substitute* "Makefile.in" | |
1807 | (("^guilesitedir =.*$") | |
1808 | "guilesitedir = \ | |
1809 | $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n")) | |
1810 | #t)) | |
472fc855 LC |
1811 | (add-before 'build 'set-libaspell-file-name |
1812 | (lambda* (#:key inputs #:allow-other-keys) | |
1813 | (let ((aspell (assoc-ref inputs "aspell"))) | |
234ea3d6 | 1814 | (substitute* "aspell.scm" |
472fc855 LC |
1815 | (("\"libaspell\\.so\"") |
1816 | (string-append "\"" aspell | |
1817 | "/lib/libaspell\""))) | |
1818 | #t)))))) | |
1819 | (native-inputs `(("pkg-config" ,pkg-config))) | |
cb5be6df | 1820 | (inputs `(("guile" ,guile-2.2) |
472fc855 LC |
1821 | ("aspell" ,aspell))) |
1822 | (home-page "https://github.com/spk121/guile-aspell") | |
1823 | (synopsis "Spell-checking from Guile") | |
1824 | (description | |
1825 | "guile-aspell is a Guile Scheme library for comparing a string against a | |
1826 | dictionary and suggesting spelling corrections.") | |
71e0f217 | 1827 | (license license:gpl3+))) |
472fc855 | 1828 | |
a614ce38 LC |
1829 | (define-public guile-bash |
1830 | ;; This project is currently retired. It was initially announced here: | |
1831 | ;; <https://lists.gnu.org/archive/html/guile-user/2015-02/msg00003.html>. | |
1832 | (let ((commit "1eabc563ca5692b3e08d84f1f0e6fd2283284469") | |
1833 | (revision "0")) | |
1834 | (package | |
1835 | (name "guile-bash") | |
1836 | (version (string-append "0.1.6-" revision "." (string-take commit 7))) | |
1837 | (home-page | |
1838 | "https://anonscm.debian.org/cgit/users/kaction-guest/retired/dev.guile-bash.git") | |
1839 | (source (origin | |
1840 | (method git-fetch) | |
1841 | (uri (git-reference | |
1842 | (commit commit) | |
1843 | (url home-page))) | |
1844 | (sha256 | |
1845 | (base32 | |
1846 | "097vny990wp2qpjij6a5a5gwc6fxzg5wk56inhy18iki5v6pif1p")) | |
1847 | (file-name (string-append name "-" version "-checkout")))) | |
1848 | (build-system gnu-build-system) | |
1849 | (arguments | |
189be331 | 1850 | '(#:configure-flags |
a614ce38 LC |
1851 | ;; Add -I to match 'bash.pc' of Bash 4.4. |
1852 | (list (string-append "CPPFLAGS=-I" | |
1853 | (assoc-ref %build-inputs "bash:include") | |
1854 | "/include/bash/include") | |
1855 | ||
1856 | ;; The '.a' file is useless. | |
1857 | "--disable-static" | |
1858 | ||
1859 | ;; Install 'lib/bash' as Bash 4.4 expects. | |
1860 | (string-append "--libdir=" (assoc-ref %outputs "out") | |
1861 | "/lib/bash")))) | |
1862 | (native-inputs `(("pkg-config" ,pkg-config) | |
464f5447 | 1863 | ("autoconf" ,autoconf-wrapper) |
a614ce38 LC |
1864 | ("automake" ,automake) |
1865 | ("libtool" ,libtool) | |
1866 | ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'. | |
b7158b76 LC |
1867 | ("gettext" ,gettext-minimal) |
1868 | ||
1869 | ;; Bash with loadable module support, for the test | |
1870 | ;; suite. | |
1871 | ("bash-full" ,bash))) | |
a614ce38 LC |
1872 | (inputs `(("guile" ,guile-2.0) |
1873 | ("bash:include" ,bash "include"))) | |
1874 | (synopsis "Extend Bash using Guile") | |
1875 | (description | |
1876 | "Guile-Bash provides a shared library and set of Guile modules, | |
1877 | allowing you to extend Bash in Scheme. Scheme interfaces allow you to access | |
1878 | the following aspects of Bash: | |
1879 | ||
1880 | @itemize | |
1881 | @item aliases; | |
1882 | @item setting and getting Bash variables; | |
1883 | @item creating dynamic variables; | |
1884 | @item creating Bash functions with a Scheme implementation; | |
1885 | @item reader macro for output capturing; | |
1886 | @item reader macro for evaluating raw Bash commands. | |
1887 | @end itemize | |
1888 | ||
1889 | To enable it, run: | |
1890 | ||
1891 | @example | |
1892 | enable -f ~/.guix-profile/lib/bash/libguile-bash.so scm | |
1893 | @end example | |
1894 | ||
1895 | and then run @command{scm example.scm}.") | |
71e0f217 | 1896 | (license license:gpl3+)))) |
a614ce38 | 1897 | |
c5793e7e CAW |
1898 | (define-public guile-8sync |
1899 | (package | |
1900 | (name "guile-8sync") | |
525acb6e | 1901 | (version "0.4.2") |
c5793e7e CAW |
1902 | (source (origin |
1903 | (method url-fetch) | |
1904 | (uri (string-append "mirror://gnu/8sync/8sync-" version | |
1905 | ".tar.gz")) | |
1906 | (sha256 | |
1907 | (base32 | |
525acb6e | 1908 | "031wm13srak3wsnll7j2mbbi29g1pcm4swdb71ds9yn567pn20qw")))) |
c5793e7e CAW |
1909 | (build-system gnu-build-system) |
1910 | (native-inputs `(("autoconf" ,autoconf) | |
1911 | ("automake" ,automake) | |
f6396d86 | 1912 | ("guile" ,guile-2.2) |
c5793e7e CAW |
1913 | ("pkg-config" ,pkg-config) |
1914 | ("texinfo" ,texinfo))) | |
1915 | (arguments | |
1916 | `(#:phases (modify-phases %standard-phases | |
1917 | (add-before 'configure 'setenv | |
1918 | (lambda _ | |
1919 | ;; quiet warnings | |
ab4a1731 CAW |
1920 | (setenv "GUILE_AUTO_COMPILE" "0") |
1921 | #t))))) | |
c5793e7e CAW |
1922 | (home-page "https://gnu.org/s/8sync/") |
1923 | (synopsis "Asynchronous actor model library for Guile") | |
1924 | (description | |
1925 | "GNU 8sync (pronounced \"eight-sync\") is an asynchronous programming | |
1926 | library for GNU Guile based on the actor model. | |
1927 | ||
f6396d86 | 1928 | Note that 8sync is only available for Guile 2.2.") |
71e0f217 | 1929 | (license license:lgpl3+))) |
c5793e7e | 1930 | |
aaf1bdc3 CAW |
1931 | (define-public guile-fibers |
1932 | (package | |
1933 | (name "guile-fibers") | |
1934 | (version "1.0.0") | |
1935 | (source (origin | |
1936 | (method url-fetch) | |
1937 | (uri (string-append "https://wingolog.org/pub/fibers/fibers-" | |
1938 | version ".tar.gz")) | |
1939 | (sha256 | |
1940 | (base32 | |
1941 | "0vjkg72ghgdgphzbjz9ig8al8271rq8974viknb2r1rg4lz92ld0")))) | |
1942 | (build-system gnu-build-system) | |
1943 | (native-inputs | |
1944 | `(("texinfo" ,texinfo) | |
1945 | ("pkg-config" ,pkg-config))) | |
1946 | (inputs | |
f6396d86 | 1947 | `(("guile" ,guile-2.2))) |
aaf1bdc3 CAW |
1948 | (synopsis "Lightweight concurrency facility for Guile") |
1949 | (description | |
1950 | "Fibers is a Guile library that implements a a lightweight concurrency | |
1951 | facility, inspired by systems like Concurrent ML, Go, and Erlang. A fiber is | |
1952 | like a \"goroutine\" from the Go language: a lightweight thread-like | |
1953 | abstraction. Systems built with Fibers can scale up to millions of concurrent | |
1954 | fibers, tens of thousands of concurrent socket connections, and many parallel | |
1955 | cores. The Fibers library also provides Concurrent ML-like channels for | |
1956 | communication between fibers. | |
1957 | ||
1958 | Note that Fibers makes use of some Guile 2.1/2.2-specific features and | |
1959 | is not available for Guile 2.0.") | |
1960 | (home-page "https://github.com/wingo/fibers") | |
1961 | (license license:lgpl3+))) | |
1962 | ||
bd233722 | 1963 | (define-public guile-git |
a0e4b41b LC |
1964 | (let ((revision "4") |
1965 | (commit "951a32c56cc4d80f8836e3c7394783e69c1fcbad")) | |
bd233722 LC |
1966 | (package |
1967 | (name "guile-git") | |
1968 | (version (string-append "0.0-" revision "." (string-take commit 7))) | |
dc03f32d | 1969 | (home-page "https://gitlab.com/guile-git/guile-git.git") |
bd233722 LC |
1970 | (source (origin |
1971 | (method git-fetch) | |
1972 | (uri (git-reference (url home-page) (commit commit))) | |
1973 | (sha256 | |
1974 | (base32 | |
a0e4b41b | 1975 | "0qri9x73ij6g40ijs4hyhj8knxw39ydgghiafq74dp99bc8hh0qc")) |
bd233722 LC |
1976 | (file-name (git-file-name name version)))) |
1977 | (build-system gnu-build-system) | |
1978 | (arguments | |
44b0faee | 1979 | `(#:phases (modify-phases %standard-phases |
44b0faee LC |
1980 | ;; FIXME: On i686, bytestructures miscalculates the offset |
1981 | ;; of the 'old-file' and 'new-file' fields within the | |
1982 | ;; '%diff-delta' structure. | |
1983 | ,@(if (string=? (%current-system) "x86_64-linux") | |
1984 | '() | |
1985 | '((add-before 'check 'skip-tests | |
1986 | (lambda _ | |
1987 | (substitute* "Makefile" | |
1988 | (("tests/status\\.scm") | |
1989 | "")) | |
1990 | #t))))))) | |
bd233722 LC |
1991 | (native-inputs |
1992 | `(("autoconf" ,autoconf) | |
1993 | ("automake" ,automake) | |
3a537598 | 1994 | ("texinfo" ,texinfo) |
bd233722 LC |
1995 | ("pkg-config" ,pkg-config))) |
1996 | (inputs | |
aabece2e | 1997 | `(("guile" ,guile-2.2) |
bd233722 LC |
1998 | ("libgit2" ,libgit2))) |
1999 | (propagated-inputs | |
2000 | `(("guile-bytestructures" ,guile-bytestructures))) | |
2001 | (synopsis "Guile bindings for libgit2") | |
2002 | (description | |
2003 | "This package provides Guile bindings to libgit2, a library to | |
2004 | manipulate repositories of the Git version control system.") | |
2005 | (license license:gpl3+)))) | |
c5793e7e | 2006 | |
70bc6085 LC |
2007 | (define-public guile2.0-git |
2008 | (package-for-guile-2.0 guile-git)) | |
2009 | ||
f252d6df | 2010 | (define-public guile-syntax-highlight |
3c90c7ae DT |
2011 | (package |
2012 | (name "guile-syntax-highlight") | |
2013 | (version "0.1") | |
2014 | (source (origin | |
2015 | (method url-fetch) | |
2016 | (uri (string-append "https://files.dthompson.us/" | |
2017 | "guile-syntax-highlight/" | |
2018 | "guile-syntax-highlight-" | |
2019 | version ".tar.gz")) | |
2020 | (sha256 | |
2021 | (base32 | |
2022 | "1p771kq15x83483m23bhah1sz6vkalg3drm7x279f4j1cxligkzi")))) | |
2023 | (build-system gnu-build-system) | |
2024 | (native-inputs | |
2025 | `(("pkg-config" ,pkg-config))) | |
2026 | (inputs | |
2027 | `(("guile" ,guile-2.2))) | |
8c72ed92 RW |
2028 | (synopsis "General-purpose syntax highlighter for GNU Guile") |
2029 | (description "Guile-syntax-highlight is a general-purpose syntax | |
f252d6df DT |
2030 | highlighting library for GNU Guile. It can parse code written in various |
2031 | programming languages into a simple s-expression that can be converted to | |
2032 | HTML (via SXML) or any other format for rendering.") | |
3c90c7ae DT |
2033 | (home-page "http://dthompson.us/projects/guile-syntax-highlight.html") |
2034 | (license license:lgpl3+))) | |
f252d6df | 2035 | |
d26ae96c CAW |
2036 | (define-public guile-sjson |
2037 | (package | |
2038 | (name "guile-sjson") | |
a62a16a4 | 2039 | (version "0.2.1") |
d26ae96c CAW |
2040 | (source (origin |
2041 | (method url-fetch) | |
2042 | (uri (string-append "https://dustycloud.org/misc/sjson-" version | |
2043 | ".tar.gz")) | |
2044 | (sha256 | |
2045 | (base32 | |
a62a16a4 | 2046 | "1mzmapln79vv10qxaggz9qwcdbag3jnrj19xx8bgkmxss8h03sv3")))) |
d26ae96c | 2047 | (build-system gnu-build-system) |
d26ae96c CAW |
2048 | (native-inputs |
2049 | `(("autoconf" ,autoconf) | |
2050 | ("automake" ,automake) | |
2051 | ("pkg-config" ,pkg-config))) | |
2052 | (inputs | |
2053 | `(("guile" ,guile-2.2))) | |
2054 | (home-page "https://gitlab.com/dustyweb/guile-sjson") | |
2055 | (synopsis "S-expression based json reader/writer for Guile") | |
2056 | (description "guile-sjson is a json reader/writer for Guile. | |
2057 | It has a nice, simple s-expression based syntax.") | |
2058 | (license license:lgpl3+))) | |
2059 | ||
e076d56a | 2060 | (define-public guile-colorized |
2061 | (package | |
2062 | (name "guile-colorized") | |
2063 | (version "0.1") | |
2064 | (source (origin | |
2065 | (method url-fetch) | |
2066 | (uri (string-append "https://github.com/NalaGinrut/guile-colorized/" | |
2067 | "archive/v" version ".tar.gz")) | |
2068 | (file-name (string-append name "-" version ".tar.gz")) | |
2069 | (sha256 | |
2070 | (base32 | |
2071 | "16xhc3an6aglnca8xl3mvgi8hsqzqn68vsl5ga4bz8bvbap5fn4p")))) | |
2072 | (build-system gnu-build-system) | |
2073 | (arguments | |
2074 | `(#:modules ((system base compile) | |
2075 | ,@%gnu-build-system-modules) | |
2076 | #:tests? #f ;No tests included | |
2077 | #:phases | |
2078 | (modify-phases %standard-phases | |
2079 | (delete 'configure) ;No configure script | |
2080 | (replace 'install | |
2081 | (lambda* (#:key outputs inputs #:allow-other-keys) | |
2082 | (let* ((out (assoc-ref outputs "out")) | |
2083 | (module-dir (string-append out "/share/guile/site/2.2")) | |
2084 | (language-dir (string-append module-dir "/ice-9")) | |
2085 | (guild (string-append (assoc-ref inputs "guile") | |
2086 | "/bin/guild"))) | |
2087 | ;; The original 'make install' is too primitive. | |
2088 | ||
2089 | ;; copy the source | |
2090 | (install-file "ice-9/colorized.scm" language-dir) | |
2091 | ||
2092 | ;; compile to the destination | |
2093 | (compile-file "ice-9/colorized.scm" | |
2094 | #:output-file (string-append | |
2095 | language-dir "/colorized.go")) | |
2096 | #t)))))) | |
2097 | (inputs | |
2098 | `(("guile" ,guile-2.2))) | |
2099 | (home-page "https://github.com/NalaGinrut/guile-colorized") | |
2100 | (synopsis "Colorized REPL for Guile") | |
2101 | (description | |
2102 | "Guile-colorized provides you with a colorized REPL for GNU Guile.") | |
2103 | (license license:gpl3+))) | |
2104 | ||
1722d680 | 2105 | ;;; guile.scm ends here |