Commit | Line | Data |
---|---|---|
233e7676 | 1 | ;;; GNU Guix --- Functional package management for GNU |
00ebe474 | 2 | ;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> |
b515822d | 3 | ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> |
6bc24063 | 4 | ;;; Copyright © 2015 Christopher Allan Webber <cwebber@dustycloud.org> |
1722d680 | 5 | ;;; |
233e7676 | 6 | ;;; This file is part of GNU Guix. |
1722d680 | 7 | ;;; |
233e7676 | 8 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
1722d680 LC |
9 | ;;; under the terms of the GNU General Public License as published by |
10 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
11 | ;;; your option) any later version. | |
12 | ;;; | |
233e7676 | 13 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
1722d680 LC |
14 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | ;;; GNU General Public License for more details. | |
17 | ;;; | |
18 | ;;; You should have received a copy of the GNU General Public License | |
233e7676 | 19 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
1722d680 | 20 | |
1ffa7090 | 21 | (define-module (gnu packages guile) |
4a44e743 | 22 | #:use-module (guix licenses) |
59a43334 | 23 | #:use-module (gnu packages) |
9c782445 | 24 | #:use-module (gnu packages bash) |
1ffa7090 LC |
25 | #:use-module (gnu packages bdw-gc) |
26 | #:use-module (gnu packages gawk) | |
27 | #:use-module (gnu packages gperf) | |
28 | #:use-module (gnu packages libffi) | |
29 | #:use-module (gnu packages autotools) | |
f906d30c | 30 | #:use-module (gnu packages flex) |
1ffa7090 | 31 | #:use-module (gnu packages libunistring) |
7119cca8 | 32 | #:use-module (gnu packages linux) |
1ffa7090 LC |
33 | #:use-module (gnu packages m4) |
34 | #:use-module (gnu packages multiprecision) | |
35 | #:use-module (gnu packages pkg-config) | |
36 | #:use-module (gnu packages readline) | |
ef02e1e9 | 37 | #:use-module (gnu packages ncurses) |
87d836b2 | 38 | #:use-module (gnu packages ed) |
ce0614dd | 39 | #:use-module (gnu packages base) |
f906d30c CAW |
40 | #:use-module (gnu packages texinfo) |
41 | #:use-module (gnu packages gettext) | |
b416aadf | 42 | #:use-module (gnu packages databases) |
9d373377 | 43 | #:use-module (gnu packages python) |
5649c8cd DT |
44 | #:use-module (gnu packages gl) |
45 | #:use-module (gnu packages sdl) | |
46 | #:use-module (gnu packages maths) | |
47 | #:use-module (gnu packages image) | |
1722d680 | 48 | #:use-module (guix packages) |
87f5d366 | 49 | #:use-module (guix download) |
6bc24063 | 50 | #:use-module (guix git-download) |
32795fcf | 51 | #:use-module (guix build-system gnu) |
6bc24063 | 52 | #:use-module (guix build-system trivial) |
32795fcf LC |
53 | #:use-module (guix utils) |
54 | #:use-module (ice-9 match)) | |
1722d680 LC |
55 | |
56 | ;;; Commentary: | |
57 | ;;; | |
c44899a2 | 58 | ;;; GNU Guile, and modules and extensions. |
1722d680 LC |
59 | ;;; |
60 | ;;; Code: | |
61 | ||
c44899a2 LC |
62 | (define-public guile-1.8 |
63 | (package | |
64 | (name "guile") | |
65 | (version "1.8.8") | |
66 | (source (origin | |
87f5d366 | 67 | (method url-fetch) |
0db342a5 | 68 | (uri (string-append "mirror://gnu/guile/guile-" version |
c44899a2 LC |
69 | ".tar.gz")) |
70 | (sha256 | |
71 | (base32 | |
01eafd38 LC |
72 | "0l200a0v7h8bh0cwz6v7hc13ds39cgqsmfrks55b1rbj5vniyiy3")) |
73 | (patches (list (search-patch "guile-1.8-cpp-4.5.patch"))))) | |
c44899a2 LC |
74 | (build-system gnu-build-system) |
75 | (arguments '(#:configure-flags '("--disable-error-on-warning") | |
c44899a2 LC |
76 | |
77 | ;; Insert a phase before `configure' to patch things up. | |
78 | #:phases (alist-cons-before | |
79 | 'configure | |
2f4fbe1c | 80 | 'patch-stuff |
c44899a2 LC |
81 | (lambda* (#:key outputs #:allow-other-keys) |
82 | ;; Add a call to `lt_dladdsearchdir' so that | |
83 | ;; `libguile-readline.so' & co. are in the | |
84 | ;; loader's search path. | |
85 | (substitute* "libguile/dynl.c" | |
2f4fbe1c LC |
86 | (("lt_dlinit.*$" match) |
87 | (format #f | |
88 | " ~a~% lt_dladdsearchdir(\"~a/lib\");~%" | |
89 | match | |
90 | (assoc-ref outputs "out")))) | |
91 | ||
92 | ;; The usual /bin/sh... | |
93 | (substitute* "ice-9/popen.scm" | |
94 | (("/bin/sh") (which "sh")))) | |
c44899a2 | 95 | %standard-phases))) |
01eafd38 | 96 | (inputs `(("gawk" ,gawk) |
c44899a2 LC |
97 | ("readline" ,readline))) |
98 | ||
99 | ;; Since `guile-1.8.pc' has "Libs: ... -lgmp -lltdl", these must be | |
100 | ;; propagated. | |
101 | (propagated-inputs `(("gmp" ,gmp) | |
be11b102 | 102 | ("libltdl" ,libltdl))) |
c44899a2 LC |
103 | |
104 | ;; When cross-compiling, a native version of Guile itself is needed. | |
105 | (self-native-input? #t) | |
106 | ||
9be8d7c8 LC |
107 | (native-search-paths |
108 | (list (search-path-specification | |
109 | (variable "GUILE_LOAD_PATH") | |
af070955 | 110 | (files '("share/guile/site"))))) |
9be8d7c8 | 111 | |
f50d2669 | 112 | (synopsis "Scheme implementation intended especially for extensions") |
c44899a2 | 113 | (description |
a22dc0c4 LC |
114 | "Guile is the GNU Ubiquitous Intelligent Language for Extensions, the |
115 | official extension language of the GNU system. It is an implementation of | |
116 | the Scheme language which can be easily embedded in other applications to | |
117 | provide a convenient means of extending the functionality of the application | |
118 | without requiring the source code to be rewritten.") | |
c44899a2 | 119 | (home-page "http://www.gnu.org/software/guile/") |
4a44e743 | 120 | (license lgpl2.0+))) |
c44899a2 LC |
121 | |
122 | (define-public guile-2.0 | |
123 | (package | |
124 | (name "guile") | |
b1a01474 | 125 | (version "2.0.11") |
c44899a2 | 126 | (source (origin |
87f5d366 | 127 | (method url-fetch) |
0db342a5 | 128 | (uri (string-append "mirror://gnu/guile/guile-" version |
c44899a2 LC |
129 | ".tar.xz")) |
130 | (sha256 | |
131 | (base32 | |
b515822d MW |
132 | "1qh3j7308qvsjgwf7h94yqgckpbgz2k3yqdkzsyhqcafvfka9l5f")) |
133 | (patches (list (search-patch "guile-arm-fixes.patch"))))) | |
c44899a2 LC |
134 | (build-system gnu-build-system) |
135 | (native-inputs `(("pkgconfig" ,pkg-config))) | |
136 | (inputs `(("libffi" ,libffi) | |
9c782445 | 137 | ("readline" ,readline) |
cba95006 | 138 | ("bash" ,bash))) |
c44899a2 LC |
139 | |
140 | (propagated-inputs | |
141 | `( ;; These ones aren't normally needed here, but since `libguile-2.0.la' | |
142 | ;; reads `-lltdl -lunistring', adding them here will add the needed | |
143 | ;; `-L' flags. As for why the `.la' file lacks the `-L' flags, see | |
144 | ;; <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/18903>. | |
145 | ("libunistring" ,libunistring) | |
be11b102 LC |
146 | |
147 | ;; Depend on LIBLTDL, not LIBTOOL. That way, we avoid some the extra | |
148 | ;; dependencies that LIBTOOL has, which is helpful during bootstrap. | |
149 | ("libltdl" ,libltdl) | |
c44899a2 LC |
150 | |
151 | ;; The headers and/or `guile-2.0.pc' refer to these packages, so they | |
152 | ;; must be propagated. | |
bda1bc6c | 153 | ("bdw-gc" ,libgc) |
c44899a2 LC |
154 | ("gmp" ,gmp))) |
155 | ||
156 | (self-native-input? #t) | |
157 | ||
9bf62d9b LC |
158 | (outputs '("out" "debug")) |
159 | ||
8ffaa93b | 160 | (arguments |
9c782445 | 161 | `(#:phases (alist-cons-before |
8ffaa93b LC |
162 | 'configure 'pre-configure |
163 | (lambda* (#:key inputs #:allow-other-keys) | |
58b4e8e8 | 164 | ;; Tell (ice-9 popen) the file name of Bash. |
8ffaa93b LC |
165 | (let ((bash (assoc-ref inputs "bash"))) |
166 | (substitute* "module/ice-9/popen.scm" | |
167 | (("/bin/sh") | |
168 | (string-append bash "/bin/bash"))))) | |
db619089 | 169 | %standard-phases))) |
8ffaa93b | 170 | |
9be8d7c8 LC |
171 | (native-search-paths |
172 | (list (search-path-specification | |
173 | (variable "GUILE_LOAD_PATH") | |
af070955 | 174 | (files '("share/guile/site/2.0"))) |
9be8d7c8 LC |
175 | (search-path-specification |
176 | (variable "GUILE_LOAD_COMPILED_PATH") | |
af070955 | 177 | (files '("share/guile/site/2.0"))))) |
9be8d7c8 | 178 | |
f50d2669 | 179 | (synopsis "Scheme implementation intended especially for extensions") |
c44899a2 | 180 | (description |
a22dc0c4 LC |
181 | "Guile is the GNU Ubiquitous Intelligent Language for Extensions, the |
182 | official extension language of the GNU system. It is an implementation of | |
183 | the Scheme language which can be easily embedded in other applications to | |
184 | provide a convenient means of extending the functionality of the application | |
185 | without requiring the source code to be rewritten.") | |
c44899a2 | 186 | (home-page "http://www.gnu.org/software/guile/") |
4a44e743 | 187 | (license lgpl3+))) |
c44899a2 | 188 | |
fa29b199 LC |
189 | (define-public guile-2.0/fixed |
190 | ;; A package of Guile 2.0 that's rarely changed. It is the one used | |
191 | ;; in the `base' module, and thus changing it entails a full rebuild. | |
bda1bc6c | 192 | guile-2.0) |
fa29b199 | 193 | |
be3feafe | 194 | (define-public guile-next |
f906d30c | 195 | (package (inherit guile-2.0) |
be3feafe | 196 | (name "guile-next") |
9a9e143b | 197 | (version "20151025.e5bccb6") |
f906d30c CAW |
198 | (source (origin |
199 | (method git-fetch) | |
200 | (uri (git-reference | |
be3feafe | 201 | (url "git://git.sv.gnu.org/guile.git") |
9a9e143b | 202 | (commit "e5bccb6e5df3485152bc6501e1f36275e09c6352"))) |
f906d30c CAW |
203 | (sha256 |
204 | (base32 | |
9a9e143b | 205 | "0z7ywryfcargrpz8hdrz6sfs06c2h2y9baqin3mbjvvg96a5bx47")))) |
be3feafe | 206 | |
f906d30c CAW |
207 | (arguments |
208 | (substitute-keyword-arguments `(;; Tests aren't passing for now. | |
209 | ;; Obviously we should re-enable this! | |
210 | #:tests? #f | |
211 | ,@(package-arguments guile-2.0)) | |
212 | ((#:phases phases) | |
213 | `(modify-phases ,phases | |
214 | (add-after 'unpack 'autogen | |
215 | (lambda _ | |
216 | (zero? (system* "sh" "autogen.sh")))) | |
217 | (add-before 'autogen 'patch-/bin/sh | |
218 | (lambda _ | |
219 | (substitute* "build-aux/git-version-gen" | |
220 | (("#!/bin/sh") (string-append "#!" (which "sh")))) | |
221 | #t)))))) | |
be3feafe | 222 | (synopsis "Snapshot of what will become version 2.2 of GNU Guile") |
f906d30c CAW |
223 | (native-inputs |
224 | `(("autoconf" ,autoconf) | |
225 | ("automake" ,automake) | |
226 | ("libtool" ,libtool) | |
227 | ("flex" ,flex) | |
228 | ("texinfo" ,texinfo) | |
229 | ("gettext" ,gnu-gettext) | |
230 | ,@(package-native-inputs guile-2.0))))) | |
231 | ||
be3feafe CAW |
232 | (define-public guile-for-guile-emacs |
233 | (package (inherit guile-next) | |
234 | (name "guile-for-guile-emacs") | |
235 | (version "20150510.d8d9a8d") | |
236 | (source (origin | |
237 | (method git-fetch) | |
238 | (uri (git-reference | |
239 | (url "git://git.hcoop.net/git/bpt/guile.git") | |
240 | (commit "d8d9a8da05ec876acba81a559798eb5eeceb5a17"))) | |
241 | (sha256 | |
242 | (base32 | |
243 | "00sprsshy16y8pxjy126hr2adqcvvzzz96hjyjwgg8swva1qh6b0")))))) | |
244 | ||
c44899a2 LC |
245 | \f |
246 | ;;; | |
247 | ;;; Extensions. | |
248 | ;;; | |
249 | ||
7119cca8 ML |
250 | (define-public artanis |
251 | (package | |
252 | (name "artanis") | |
253 | (version "0.1.0") | |
254 | (source (origin | |
255 | (method url-fetch) | |
256 | (uri (string-append "ftp://alpha.gnu.org/gnu/artanis/artanis-" | |
257 | version ".tar.gz")) | |
258 | (sha256 | |
259 | (base32 | |
260 | "1mc2zy6n9wnn4hzi3zp3jd6b5rlr0lv7fvh800xf4fyrxg0zia4g")))) | |
261 | (build-system gnu-build-system) | |
262 | ;; TODO: Add guile-dbi and guile-dbd optional dependencies. | |
263 | (inputs `(("guile" ,guile-2.0))) | |
264 | (native-inputs `(("bash" ,bash) ;for the `source' builtin | |
265 | ("pkgconfig" ,pkg-config) | |
266 | ("util-linux" ,util-linux))) ;for the `script' command | |
267 | (arguments | |
268 | '(#:make-flags | |
269 | ;; TODO: The documentation must be built with the `docs' target. | |
270 | (let* ((out (assoc-ref %outputs "out")) | |
271 | (dir (string-append out "/share/guile/site/2.0"))) | |
272 | ;; Don't use (%site-dir) for site paths. | |
273 | (list (string-append "MOD_PATH=" dir) | |
274 | (string-append "MOD_COMPILED_PATH=" dir))) | |
275 | #:test-target "test" | |
276 | #:phases | |
277 | (modify-phases %standard-phases | |
278 | (add-before | |
279 | 'install 'substitute-root-dir | |
280 | (lambda* (#:key outputs #:allow-other-keys) | |
281 | (let ((out (assoc-ref outputs "out"))) | |
282 | (substitute* "Makefile" ;ignore the execution of bash.bashrc | |
283 | ((" /etc/bash.bashrc") " /dev/null")) | |
284 | (substitute* "Makefile" ;set the root of config files to OUT | |
285 | ((" /etc") (string-append " " out "/etc"))) | |
286 | (mkdir-p (string-append out "/bin")) ;for the `art' executable | |
287 | #t)))))) | |
288 | (synopsis "Web application framework written in Guile") | |
289 | (description "GNU Artanis is a web application framework written in Guile | |
290 | Scheme. A web application framework (WAF) is a software framework that is | |
291 | designed to support the development of dynamic websites, web applications, web | |
292 | services and web resources. The framework aims to alleviate the overhead | |
293 | associated with common activities performed in web development. Artanis | |
294 | provides several tools for web development: database access, templating | |
295 | frameworks, session management, URL-remapping for RESTful, page caching, and | |
296 | more.") | |
297 | (home-page "https://www.gnu.org/software/artanis/") | |
298 | (license (list gpl3+ lgpl3+)))) ;dual license | |
299 | ||
d6d9f1f7 | 300 | (define-public guile-reader |
1722d680 | 301 | (package |
d6d9f1f7 | 302 | (name "guile-reader") |
ad29c6f2 | 303 | (version "0.6.1") |
d6d9f1f7 LC |
304 | (source (origin |
305 | (method url-fetch) | |
306 | (uri (string-append "mirror://savannah/guile-reader/guile-reader-" | |
307 | version ".tar.gz")) | |
308 | (sha256 | |
309 | (base32 | |
ad29c6f2 | 310 | "020wz5w8z6g79nbqifg2n496wxwkcjzh8xizpv6mz0hczpl155ma")))) |
d6d9f1f7 LC |
311 | (build-system gnu-build-system) |
312 | (native-inputs `(("pkgconfig" ,pkg-config) | |
313 | ("gperf" ,gperf))) | |
314 | (inputs `(("guile" ,guile-2.0))) | |
ad29c6f2 | 315 | (arguments `(#:configure-flags |
d6d9f1f7 LC |
316 | (let ((out (assoc-ref %outputs "out"))) |
317 | (list (string-append "--with-guilemoduledir=" | |
318 | out "/share/guile/site/2.0"))))) | |
319 | (synopsis "Framework for building readers for GNU Guile") | |
320 | (description | |
321 | "Guile-Reader is a simple framework for building readers for GNU Guile. | |
1722d680 LC |
322 | |
323 | The idea is to make it easy to build procedures that extend Guile’s read | |
35b9e423 | 324 | procedure. Readers supporting various syntax variants can easily be written, |
1722d680 | 325 | possibly by re-using existing “token readers” of a standard Scheme |
35b9e423 | 326 | readers. For example, it is used to implement Skribilo’s R5RS-derived |
1722d680 LC |
327 | document syntax. |
328 | ||
329 | Guile-Reader’s approach is similar to Common Lisp’s “read table”, but | |
330 | hopefully more powerful and flexible (for instance, one may instantiate as | |
331 | many readers as needed).") | |
d6d9f1f7 LC |
332 | (home-page "http://www.nongnu.org/guile-reader/") |
333 | (license gpl3+))) | |
1722d680 | 334 | |
ef02e1e9 LC |
335 | (define-public guile-ncurses |
336 | (package | |
337 | (name "guile-ncurses") | |
31a123fe | 338 | (version "1.6") |
ef02e1e9 LC |
339 | (source (origin |
340 | (method url-fetch) | |
341 | (uri (string-append "mirror://gnu/guile-ncurses/guile-ncurses-" | |
342 | version ".tar.gz")) | |
343 | (sha256 | |
344 | (base32 | |
31a123fe | 345 | "0wmk681zzi1wxw543r2s2r84ndnzxp69kr7pc01aw4l55hg7jn73")))) |
ef02e1e9 LC |
346 | (build-system gnu-build-system) |
347 | (inputs `(("ncurses" ,ncurses) | |
348 | ("guile" ,guile-2.0))) | |
349 | (arguments | |
2c6b7c7d LC |
350 | '(#:configure-flags (list "--with-ncursesw" ; Unicode support |
351 | (string-append "--with-guilesitedir=" | |
ef02e1e9 | 352 | (assoc-ref %outputs "out") |
3f69e393 | 353 | "/share/guile/site/2.0")) |
3931607e LC |
354 | |
355 | ;; Work around <http://bugs.gnu.org/21677>. | |
356 | #:make-flags '("XFAIL_TESTS=curses_034_util.test") | |
357 | ||
afd3d931 LC |
358 | #:phases (alist-cons-after |
359 | 'install 'post-install | |
360 | (lambda* (#:key outputs #:allow-other-keys) | |
361 | (let* ((out (assoc-ref outputs "out")) | |
362 | (dir (string-append out "/share/guile/site/")) | |
363 | (files (find-files dir ".scm"))) | |
364 | (substitute* files | |
365 | (("\"libguile-ncurses\"") | |
366 | (format #f "\"~a/lib/libguile-ncurses\"" | |
367 | out))))) | |
368 | %standard-phases))) | |
ef02e1e9 | 369 | (home-page "http://www.gnu.org/software/guile-ncurses/") |
f50d2669 | 370 | (synopsis "Guile bindings to ncurses") |
ef02e1e9 | 371 | (description |
12bcf94a | 372 | "guile-ncurses provides Guile language bindings for the ncurses |
79c311b8 | 373 | library.") |
ef02e1e9 LC |
374 | (license lgpl3+))) |
375 | ||
87d836b2 LC |
376 | (define-public mcron |
377 | (package | |
378 | (name "mcron") | |
d12c626c | 379 | (version "1.0.8") |
87d836b2 LC |
380 | (source (origin |
381 | (method url-fetch) | |
382 | (uri (string-append "mirror://gnu/mcron/mcron-" | |
383 | version ".tar.gz")) | |
384 | (sha256 | |
385 | (base32 | |
d12c626c | 386 | "0zparwgf01jgl1x53ik71ghabldq6zz18ha4dscps1i0qrzgap1b")) |
01eafd38 | 387 | (patches (list (search-patch "mcron-install.patch"))))) |
87d836b2 | 388 | (build-system gnu-build-system) |
b6c18d6a LC |
389 | (native-inputs `(("pkg-config" ,pkg-config))) |
390 | (inputs `(("ed" ,ed) ("which" ,which) ("guile" ,guile-2.0))) | |
87d836b2 | 391 | (home-page "http://www.gnu.org/software/mcron/") |
f50d2669 | 392 | (synopsis "Run jobs at scheduled times") |
87d836b2 | 393 | (description |
79c311b8 | 394 | "GNU Mcron is a complete replacement for Vixie cron. It is used to run |
a22dc0c4 | 395 | tasks on a schedule, such as every hour or every Monday. Mcron is written in |
79c311b8 LC |
396 | Guile, so its configuration can be written in Scheme; the original cron |
397 | format is also supported.") | |
87d836b2 LC |
398 | (license gpl3+))) |
399 | ||
3e9066fc LC |
400 | (define-public guile-lib |
401 | (package | |
402 | (name "guile-lib") | |
403 | (version "0.2.2") | |
404 | (source (origin | |
405 | (method url-fetch) | |
406 | (uri (string-append "mirror://savannah/guile-lib/guile-lib-" | |
407 | version ".tar.gz")) | |
408 | (sha256 | |
409 | (base32 | |
410 | "1f9n2b5b5r75lzjinyk6zp6g20g60msa0jpfrk5hhg4j8cy0ih4b")))) | |
411 | (build-system gnu-build-system) | |
412 | (arguments | |
413 | '(#:phases (alist-cons-before | |
414 | 'configure 'patch-module-dir | |
415 | (lambda _ | |
416 | (substitute* "src/Makefile.in" | |
417 | (("^moddir[[:blank:]]*=[[:blank:]]*([[:graph:]]+)" _ rhs) | |
418 | (string-append "moddir = " rhs "/2.0\n")))) | |
419 | %standard-phases))) | |
420 | (inputs `(("guile" ,guile-2.0))) | |
421 | (home-page "http://www.nongnu.org/guile-lib/") | |
422 | (synopsis "Collection of useful Guile Scheme modules") | |
423 | (description | |
35b9e423 | 424 | "Guile-Lib is intended as an accumulation place for pure-scheme Guile |
3e9066fc LC |
425 | modules, allowing for people to cooperate integrating their generic Guile |
426 | modules into a coherent library. Think \"a down-scaled, limited-scope CPAN | |
427 | for Guile\".") | |
428 | ||
429 | ;; The whole is under GPLv3+, but some modules are under laxer | |
430 | ;; distribution terms such as LGPL and public domain. See `COPYING' for | |
431 | ;; details. | |
432 | (license gpl3+))) | |
433 | ||
6050a1fb CR |
434 | (define-public guile-json |
435 | (package | |
436 | (name "guile-json") | |
cdf2b286 | 437 | (version "0.4.0") |
6050a1fb CR |
438 | (source (origin |
439 | (method url-fetch) | |
440 | (uri (string-append "mirror://savannah/guile-json/guile-json-" | |
441 | version ".tar.gz")) | |
442 | (sha256 | |
443 | (base32 | |
cdf2b286 | 444 | "0v06272rw4ycwzssjf3fzpk2vhpslvl55hz94q80vc6f74j0d5h6")) |
bf6fcf54 LC |
445 | (modules '((guix build utils))) |
446 | (snippet | |
447 | ;; Make sure everything goes under .../site/2.0, like Guile's | |
448 | ;; search paths expects. | |
449 | '(substitute* '("Makefile.in" "json/Makefile.in") | |
450 | (("moddir =.*/share/guile/site" all) | |
451 | (string-append all "/2.0")))))) | |
6050a1fb | 452 | (build-system gnu-build-system) |
db5584dd | 453 | (native-inputs `(("guile" ,guile-2.0))) |
6050a1fb CR |
454 | (home-page "http://savannah.nongnu.org/projects/guile-json/") |
455 | (synopsis "JSON module for Guile") | |
456 | (description | |
457 | "Guile-json supports parsing and building JSON documents according to the | |
35b9e423 | 458 | http:://json.org specification. These are the main features: |
6050a1fb CR |
459 | - Strictly complies to http://json.org specification. |
460 | - Build JSON documents programmatically via macros. | |
461 | - Unicode support for strings. | |
462 | - Allows JSON pretty printing.") | |
463 | (license lgpl3+))) | |
464 | ||
6bc24063 CAW |
465 | (define-public guile-minikanren |
466 | (package | |
467 | (name "guile-minikanren") | |
468 | (version "20150424.e844d85") | |
469 | (source (origin | |
470 | (method git-fetch) | |
471 | (uri (git-reference | |
472 | (url "https://github.com/ijp/minikanren.git") | |
473 | (commit "e844d85512f8c055d3f96143ee506007389a25e3"))) | |
474 | (sha256 | |
475 | (base32 | |
476 | "0r50jlpzi940jlmxyy3ddqqwmj5r12gb4bcv0ssini9v8km13xz6")))) | |
477 | (build-system trivial-build-system) | |
478 | (arguments | |
479 | `(#:modules | |
480 | ((guix build utils) | |
481 | (ice-9 match)) | |
482 | #:builder | |
483 | (begin | |
484 | (use-modules (guix build utils) | |
485 | (ice-9 match)) | |
486 | (let* ((out (assoc-ref %outputs "out")) | |
487 | (module-dir (string-append out "/share/guile/site/2.0")) | |
488 | (source (assoc-ref %build-inputs "source")) | |
f3d8cd79 | 489 | (doc (string-append out "/share/doc/guile-minikanren")) |
6bc24063 CAW |
490 | (scm-files '("minikanren.scm" |
491 | "minikanren/mkextraforms.scm" | |
492 | "minikanren/mkprelude.scm" | |
493 | "minikanren/mk.scm")) | |
494 | (guild (string-append (assoc-ref %build-inputs "guile") | |
495 | "/bin/guild"))) | |
496 | ;; Make installation directories. | |
497 | (mkdir-p (string-append module-dir "/minikanren")) | |
498 | (mkdir-p doc) | |
499 | ||
500 | ;; Compile .scm files and install. | |
501 | (chdir source) | |
502 | (setenv "GUILE_AUTO_COMPILE" "0") | |
503 | (for-each (lambda (file) | |
504 | (let* ((dest-file (string-append module-dir "/" | |
505 | file ".scm")) | |
506 | (go-file (match (string-split file #\.) | |
507 | ((base _) | |
508 | (string-append module-dir "/" | |
509 | base ".go"))))) | |
510 | ;; Install source module. | |
511 | (copy-file file dest-file) | |
512 | ;; Install compiled module. | |
513 | (unless (zero? (system* guild "compile" | |
514 | "-L" source | |
515 | "-o" go-file | |
516 | file)) | |
517 | (error (format #f "Failed to compile ~s to ~s!" | |
518 | file go-file))))) | |
519 | scm-files) | |
520 | ||
521 | ;; Also copy over the README. | |
96c46210 | 522 | (install-file "README.org" doc) |
6bc24063 CAW |
523 | #t)))) |
524 | (inputs | |
525 | `(("guile" ,guile-2.0))) | |
526 | (home-page "https://github.com/ijp/minikanren") | |
e881752c | 527 | (synopsis "MiniKanren declarative logic system, packaged for Guile") |
6bc24063 CAW |
528 | (description |
529 | "MiniKanren is a relational programming extension to the Scheme | |
530 | programming Language, written as a smaller version of Kanren suitable for | |
531 | pedagogical purposes. It is featured in the book, The Reasoned Schemer, | |
532 | written by Dan Friedman, William Byrd, and Oleg Kiselyov. | |
533 | ||
e881752c | 534 | This is Ian Price's r6rs packaged version of miniKanren, which deviates |
6bc24063 CAW |
535 | slightly from miniKanren mainline. |
536 | ||
537 | See http://minikanren.org/ for more on miniKanren generally.") | |
538 | (license expat))) | |
539 | ||
32e14fc1 CAW |
540 | (define-public guile-irregex |
541 | (package | |
542 | (name "guile-irregex") | |
543 | (version "0.9.3") | |
544 | (source (origin | |
545 | (method url-fetch) | |
546 | (uri (string-append | |
547 | "http://synthcode.com/scheme/irregex/irregex-" | |
548 | version | |
549 | ".tar.gz")) | |
550 | (sha256 | |
551 | (base32 | |
552 | "1b8jl7bycyl2ssp6sb1j24pp9hvqyxm85ki9bmwd50glyyjs5zay")))) | |
553 | (build-system gnu-build-system) | |
554 | (arguments | |
555 | `(#:modules ((guix build utils) | |
556 | (ice-9 match) | |
557 | (guix build gnu-build-system)) | |
558 | #:phases | |
559 | (modify-phases %standard-phases | |
32e14fc1 CAW |
560 | (delete 'configure) |
561 | (delete 'build) | |
562 | (delete 'check) | |
563 | (replace 'install | |
564 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
565 | (begin | |
566 | (use-modules (guix build utils) | |
567 | (ice-9 match)) | |
568 | (let* ((out (assoc-ref outputs "out")) | |
569 | (module-dir (string-append out "/share/guile/site/2.0")) | |
570 | (source (assoc-ref inputs "source")) | |
571 | (doc (string-append out "/share/doc/guile-irregex/")) | |
572 | (guild (string-append (assoc-ref %build-inputs "guile") | |
573 | "/bin/guild"))) | |
574 | ;; Make installation directories. | |
575 | (mkdir-p (string-append module-dir "/rx/source")) | |
576 | (mkdir-p doc) | |
577 | ||
578 | ;; Compile .scm files and install. | |
579 | (setenv "GUILE_AUTO_COMPILE" "0") | |
580 | ||
581 | (for-each (lambda (copy-info) | |
582 | (match copy-info | |
583 | ((src-file dest-file-basis) | |
584 | (let* ((dest-file (string-append | |
585 | module-dir dest-file-basis | |
586 | ".scm")) | |
587 | (go-file (string-append | |
588 | module-dir dest-file-basis | |
589 | ".go"))) | |
590 | ;; Install source module. | |
591 | (copy-file src-file | |
592 | dest-file) | |
593 | ;; Install compiled module. | |
594 | (unless (zero? (system* guild "compile" | |
595 | "-L" (getcwd) | |
596 | "-o" go-file | |
597 | src-file)) | |
598 | (error (format #f "Failed to compile ~s to ~s!" | |
599 | src-file dest-file))))))) | |
600 | '(("irregex-guile.scm" "/rx/irregex") | |
601 | ("irregex.scm" "/rx/source/irregex") | |
602 | ;; Not really reachable via guile's packaging system, | |
603 | ;; but nice to have around | |
604 | ("irregex-utils.scm" "/rx/source/irregex-utils"))) | |
605 | ||
606 | ;; Also copy over the README. | |
607 | (install-file "irregex.html" doc) | |
608 | #t))))))) | |
609 | (inputs | |
610 | `(("guile" ,guile-2.0))) | |
611 | (home-page "http://synthcode.com/scheme/irregex") | |
612 | (synopsis "S-expression based regular expressions") | |
613 | (description | |
614 | "Irregex is an s-expression based alternative to your classic | |
615 | string-based regular expressions. It implements SRFI 115 and is deeply | |
616 | inspired by the SCSH regular expression system.") | |
617 | (license bsd-3))) | |
93e7199b CAW |
618 | |
619 | ;; There are two guile-gdbm packages, one using the FFI and one with | |
620 | ;; direct C bindings, hence the verbose name. | |
621 | ||
622 | (define-public guile-gdbm-ffi | |
623 | (package | |
624 | (name "guile-gdbm-ffi") | |
625 | (version "20120209.fa1d5b6") | |
626 | (source (origin | |
627 | (method git-fetch) | |
628 | (uri (git-reference | |
629 | (url "https://github.com/ijp/guile-gdbm.git") | |
630 | (commit "fa1d5b6231d0e4d096687b378c025f2148c5f246"))) | |
631 | (sha256 | |
632 | (base32 | |
633 | "1j8wrsw7v9w6qkl47xz0rdikg50v16nn6kbs3lgzcymjzpa7babj")))) | |
634 | (build-system trivial-build-system) | |
635 | (arguments | |
636 | `(#:modules | |
637 | ((guix build utils)) | |
638 | #:builder | |
639 | (begin | |
640 | (use-modules (guix build utils) | |
641 | (system base compile)) | |
642 | ||
643 | (let* ((out (assoc-ref %outputs "out")) | |
644 | (module-dir (string-append out "/share/guile/site/2.0")) | |
645 | (source (assoc-ref %build-inputs "source")) | |
646 | (doc (string-append out "/share/doc")) | |
647 | (guild (string-append (assoc-ref %build-inputs "guile") | |
648 | "/bin/guild")) | |
649 | (gdbm.scm-dest | |
650 | (string-append module-dir "/gdbm.scm")) | |
651 | (gdbm.go-dest | |
652 | (string-append module-dir "/gdbm.go"))) | |
653 | ;; Make installation directories. | |
654 | (mkdir-p module-dir) | |
655 | (mkdir-p doc) | |
656 | ||
657 | ;; Switch directory for compiling and installing | |
658 | (chdir source) | |
659 | ||
660 | ;; copy the source | |
661 | (copy-file "gdbm.scm" gdbm.scm-dest) | |
662 | ||
663 | ;; Patch the FFI | |
664 | (substitute* gdbm.scm-dest | |
665 | (("\\(dynamic-link \"libgdbm\"\\)") | |
666 | (format #f "(dynamic-link \"~a/lib/libgdbm.so\")" | |
667 | (assoc-ref %build-inputs "gdbm")))) | |
668 | ||
669 | ;; compile to the destination | |
670 | (compile-file gdbm.scm-dest | |
671 | #:output-file gdbm.go-dest))))) | |
672 | (inputs | |
673 | `(("guile" ,guile-2.0))) | |
674 | (propagated-inputs | |
675 | `(("gdbm" ,gdbm))) | |
676 | (home-page "https://github.com/ijp/guile-gdbm") | |
677 | (synopsis "Guile bindings to the GDBM library via Guile's FFI") | |
678 | (description | |
679 | "Guile bindings to the GDBM key-value storage system, using | |
680 | Guile's foreign function interface.") | |
681 | (license gpl3+))) | |
682 | ||
27f5e13e DT |
683 | (define-public haunt |
684 | (package | |
685 | (name "haunt") | |
686 | (version "0.1") | |
687 | (source (origin | |
688 | (method url-fetch) | |
689 | (uri (string-append "http://files.dthompson.us/haunt/haunt-" | |
690 | version ".tar.gz")) | |
691 | (sha256 | |
692 | (base32 | |
693 | "15q1qwjnay7k90ppqrzqsmikvwyj61mjvf1zahyd9gm4vi2fgb3x")))) | |
694 | (build-system gnu-build-system) | |
695 | (inputs | |
696 | `(("guile" ,guile-2.0))) | |
697 | (synopsis "Functional static site generator") | |
698 | (description "Haunt is a static site generator written in Guile | |
699 | Scheme. Haunt features a functional build system and an extensible | |
700 | interface for reading articles in any format.") | |
701 | (home-page "http://haunt.dthompson.us") | |
702 | (license gpl3+))) | |
703 | ||
36548111 DT |
704 | (define-public guile-redis |
705 | (package | |
706 | (name "guile-redis") | |
707 | (version "0.1.0") | |
708 | (source (origin | |
709 | (method url-fetch) | |
710 | (uri (string-append "mirror://savannah/guile-redis/guile-redis-" | |
711 | version ".tar.gz")) | |
712 | (sha256 | |
713 | (base32 | |
714 | "0vx6if6b4r3kwx64vzbs6vpc0cpcr85x11w9vkzq27gw8n7isv56")) | |
715 | (modules '((guix build utils))) | |
716 | (snippet | |
717 | ;; Make sure everything goes under .../site/2.0, like Guile's | |
718 | ;; search paths expects. | |
719 | '(substitute* '("Makefile.in" | |
720 | "redis/Makefile.in" | |
721 | "redis/commands/Makefile.in") | |
722 | (("moddir =.*/share/guile/site" all) | |
723 | (string-append all "/2.0")))))) | |
724 | (build-system gnu-build-system) | |
725 | (native-inputs | |
726 | `(("guile" ,guile-2.0))) | |
727 | (home-page "http://savannah.nongnu.org/projects/guile-redis/") | |
728 | (synopsis "Redis client library for Guile") | |
729 | (description "Guile-redis provides a Scheme interface to the Redis | |
730 | key-value cache and store.") | |
731 | (license lgpl3+))) | |
732 | ||
9d373377 CAW |
733 | (define-public guile-wisp |
734 | (package | |
735 | (name "guile-wisp") | |
736 | (version "0.9.0") | |
737 | (source (origin | |
738 | (method url-fetch) | |
739 | (uri (string-append "https://bitbucket.org/ArneBab/" | |
740 | "wisp/downloads/wisp-" | |
741 | version ".tar.gz")) | |
742 | (sha256 | |
743 | (base32 | |
744 | "0y5fxacalkgbv9s71h58vdvm2h2ln3rk024dd0vszwcf953as5fq")))) | |
745 | (build-system gnu-build-system) | |
746 | (arguments | |
747 | `(#:modules ((system base compile) | |
748 | ,@%gnu-build-system-modules) | |
749 | #:phases | |
750 | (modify-phases %standard-phases | |
751 | (add-before | |
752 | 'configure 'substitute-before-config | |
753 | ||
754 | (lambda* (#:key inputs #:allow-other-keys) | |
755 | (let ((bash (assoc-ref inputs "bash"))) | |
756 | ;; configure checks for guile-2.0, but ours is just named "guile" :) | |
757 | (substitute* "configure" | |
758 | (("guile-2.0") "guile")) | |
759 | ;; Puts together some test files with /bin/bash hardcoded | |
760 | (substitute* "Makefile.in" | |
761 | (("/bin/bash") | |
762 | (string-append bash "/bin/bash") )) | |
763 | #t))) | |
764 | ||
765 | ;; auto compilation breaks, but if we set HOME to /tmp, | |
766 | ;; that works ok | |
767 | (add-before | |
768 | 'check 'auto-compile-hacky-workaround | |
769 | (lambda _ | |
770 | (setenv "HOME" "/tmp") | |
771 | #t)) | |
772 | (replace | |
773 | 'install | |
774 | (lambda* (#:key outputs inputs #:allow-other-keys) | |
775 | (let* ((out (assoc-ref outputs "out")) | |
776 | (module-dir (string-append out "/share/guile/site/2.0")) | |
777 | (language-dir | |
778 | (string-append module-dir "/language/wisp")) | |
779 | (guild (string-append (assoc-ref inputs "guile") | |
780 | "/bin/guild"))) | |
781 | ;; Make installation directories. | |
782 | (mkdir-p module-dir) | |
783 | (mkdir-p language-dir) | |
784 | ||
785 | ;; copy the source | |
786 | (copy-file "wisp-scheme.scm" | |
787 | (string-append module-dir "/wisp-scheme.scm")) | |
788 | (copy-file "language/wisp/spec.scm" | |
789 | (string-append language-dir "/spec.scm")) | |
790 | ||
791 | ;; compile to the destination | |
792 | (compile-file "wisp-scheme.scm" | |
793 | #:output-file (string-append | |
794 | module-dir "/wisp-scheme.go")) | |
795 | (compile-file "language/wisp/spec.scm" | |
796 | #:output-file (string-append | |
797 | language-dir "/spec.go")) | |
798 | #t)))))) | |
799 | (home-page "http://draketo.de/english/wisp") | |
800 | (inputs | |
801 | `(("guile" ,guile-2.0) | |
802 | ("python" ,python))) | |
a124bbd2 SB |
803 | (synopsis "Whitespace to lisp syntax for Guile") |
804 | (description "Wisp is a syntax for Guile which provides a Python-like | |
9d373377 CAW |
805 | whitespace-significant language. It may be easier on the eyes for some |
806 | users and in some situations.") | |
807 | (license gpl3+))) | |
808 | ||
5649c8cd DT |
809 | (define-public guile-sly |
810 | (package | |
811 | (name "guile-sly") | |
812 | (version "0.1") | |
813 | (source (origin | |
814 | (method url-fetch) | |
815 | (uri (string-append "http://files.dthompson.us/sly/sly-" | |
816 | version ".tar.gz")) | |
817 | (sha256 | |
818 | (base32 | |
819 | "1svzlbz2vripmyq2kjh0rig16bsrnbkwbsm558pjln9l65mcl4qq")))) | |
820 | (build-system gnu-build-system) | |
821 | (arguments | |
822 | '(#:configure-flags | |
823 | (list (string-append "--with-libfreeimage-prefix=" | |
824 | (assoc-ref %build-inputs "freeimage")) | |
825 | (string-append "--with-libgslcblas-prefix=" | |
826 | (assoc-ref %build-inputs "gsl"))))) | |
827 | (native-inputs | |
828 | `(("pkg-config" ,pkg-config))) | |
829 | (propagated-inputs | |
830 | `(("guile" ,guile-2.0) | |
831 | ("guile-sdl" ,guile-sdl) | |
832 | ("guile-opengl" ,guile-opengl))) | |
833 | (inputs | |
834 | `(("gsl" ,gsl) | |
835 | ("freeimage" ,freeimage) | |
836 | ("mesa" ,mesa))) | |
837 | (synopsis "2D/3D game engine for GNU Guile") | |
838 | (description "Sly is a 2D/3D game engine written in Guile Scheme. Sly | |
839 | features a functional reactive programming interface and live coding | |
840 | capabilities.") | |
841 | (home-page "http://dthompson.us/pages/software/sly.html") | |
842 | (license gpl3+))) | |
843 | ||
1722d680 | 844 | ;;; guile.scm ends here |