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