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