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"))) |
821f4dc2 | 203 | (file-name (string-append name "-" version "-checkout")) |
f906d30c CAW |
204 | (sha256 |
205 | (base32 | |
9a9e143b | 206 | "0z7ywryfcargrpz8hdrz6sfs06c2h2y9baqin3mbjvvg96a5bx47")))) |
be3feafe | 207 | |
f906d30c CAW |
208 | (arguments |
209 | (substitute-keyword-arguments `(;; Tests aren't passing for now. | |
210 | ;; Obviously we should re-enable this! | |
211 | #:tests? #f | |
212 | ,@(package-arguments guile-2.0)) | |
213 | ((#:phases phases) | |
214 | `(modify-phases ,phases | |
215 | (add-after 'unpack 'autogen | |
216 | (lambda _ | |
217 | (zero? (system* "sh" "autogen.sh")))) | |
218 | (add-before 'autogen 'patch-/bin/sh | |
219 | (lambda _ | |
220 | (substitute* "build-aux/git-version-gen" | |
221 | (("#!/bin/sh") (string-append "#!" (which "sh")))) | |
222 | #t)))))) | |
be3feafe | 223 | (synopsis "Snapshot of what will become version 2.2 of GNU Guile") |
f906d30c CAW |
224 | (native-inputs |
225 | `(("autoconf" ,autoconf) | |
226 | ("automake" ,automake) | |
227 | ("libtool" ,libtool) | |
228 | ("flex" ,flex) | |
229 | ("texinfo" ,texinfo) | |
230 | ("gettext" ,gnu-gettext) | |
231 | ,@(package-native-inputs guile-2.0))))) | |
232 | ||
be3feafe CAW |
233 | (define-public guile-for-guile-emacs |
234 | (package (inherit guile-next) | |
235 | (name "guile-for-guile-emacs") | |
236 | (version "20150510.d8d9a8d") | |
237 | (source (origin | |
238 | (method git-fetch) | |
239 | (uri (git-reference | |
240 | (url "git://git.hcoop.net/git/bpt/guile.git") | |
241 | (commit "d8d9a8da05ec876acba81a559798eb5eeceb5a17"))) | |
242 | (sha256 | |
243 | (base32 | |
244 | "00sprsshy16y8pxjy126hr2adqcvvzzz96hjyjwgg8swva1qh6b0")))))) | |
245 | ||
c44899a2 LC |
246 | \f |
247 | ;;; | |
248 | ;;; Extensions. | |
249 | ;;; | |
250 | ||
7119cca8 ML |
251 | (define-public artanis |
252 | (package | |
253 | (name "artanis") | |
254 | (version "0.1.0") | |
255 | (source (origin | |
256 | (method url-fetch) | |
257 | (uri (string-append "ftp://alpha.gnu.org/gnu/artanis/artanis-" | |
258 | version ".tar.gz")) | |
259 | (sha256 | |
260 | (base32 | |
261 | "1mc2zy6n9wnn4hzi3zp3jd6b5rlr0lv7fvh800xf4fyrxg0zia4g")))) | |
262 | (build-system gnu-build-system) | |
263 | ;; TODO: Add guile-dbi and guile-dbd optional dependencies. | |
264 | (inputs `(("guile" ,guile-2.0))) | |
265 | (native-inputs `(("bash" ,bash) ;for the `source' builtin | |
266 | ("pkgconfig" ,pkg-config) | |
267 | ("util-linux" ,util-linux))) ;for the `script' command | |
268 | (arguments | |
269 | '(#:make-flags | |
270 | ;; TODO: The documentation must be built with the `docs' target. | |
271 | (let* ((out (assoc-ref %outputs "out")) | |
272 | (dir (string-append out "/share/guile/site/2.0"))) | |
273 | ;; Don't use (%site-dir) for site paths. | |
274 | (list (string-append "MOD_PATH=" dir) | |
275 | (string-append "MOD_COMPILED_PATH=" dir))) | |
276 | #:test-target "test" | |
277 | #:phases | |
278 | (modify-phases %standard-phases | |
279 | (add-before | |
280 | 'install 'substitute-root-dir | |
281 | (lambda* (#:key outputs #:allow-other-keys) | |
282 | (let ((out (assoc-ref outputs "out"))) | |
283 | (substitute* "Makefile" ;ignore the execution of bash.bashrc | |
284 | ((" /etc/bash.bashrc") " /dev/null")) | |
285 | (substitute* "Makefile" ;set the root of config files to OUT | |
286 | ((" /etc") (string-append " " out "/etc"))) | |
287 | (mkdir-p (string-append out "/bin")) ;for the `art' executable | |
288 | #t)))))) | |
289 | (synopsis "Web application framework written in Guile") | |
290 | (description "GNU Artanis is a web application framework written in Guile | |
291 | Scheme. A web application framework (WAF) is a software framework that is | |
292 | designed to support the development of dynamic websites, web applications, web | |
293 | services and web resources. The framework aims to alleviate the overhead | |
294 | associated with common activities performed in web development. Artanis | |
295 | provides several tools for web development: database access, templating | |
296 | frameworks, session management, URL-remapping for RESTful, page caching, and | |
297 | more.") | |
298 | (home-page "https://www.gnu.org/software/artanis/") | |
299 | (license (list gpl3+ lgpl3+)))) ;dual license | |
300 | ||
d6d9f1f7 | 301 | (define-public guile-reader |
1722d680 | 302 | (package |
d6d9f1f7 | 303 | (name "guile-reader") |
ad29c6f2 | 304 | (version "0.6.1") |
d6d9f1f7 LC |
305 | (source (origin |
306 | (method url-fetch) | |
307 | (uri (string-append "mirror://savannah/guile-reader/guile-reader-" | |
308 | version ".tar.gz")) | |
309 | (sha256 | |
310 | (base32 | |
ad29c6f2 | 311 | "020wz5w8z6g79nbqifg2n496wxwkcjzh8xizpv6mz0hczpl155ma")))) |
d6d9f1f7 LC |
312 | (build-system gnu-build-system) |
313 | (native-inputs `(("pkgconfig" ,pkg-config) | |
314 | ("gperf" ,gperf))) | |
315 | (inputs `(("guile" ,guile-2.0))) | |
ad29c6f2 | 316 | (arguments `(#:configure-flags |
d6d9f1f7 LC |
317 | (let ((out (assoc-ref %outputs "out"))) |
318 | (list (string-append "--with-guilemoduledir=" | |
319 | out "/share/guile/site/2.0"))))) | |
320 | (synopsis "Framework for building readers for GNU Guile") | |
321 | (description | |
322 | "Guile-Reader is a simple framework for building readers for GNU Guile. | |
1722d680 LC |
323 | |
324 | The idea is to make it easy to build procedures that extend Guile’s read | |
35b9e423 | 325 | procedure. Readers supporting various syntax variants can easily be written, |
1722d680 | 326 | possibly by re-using existing “token readers” of a standard Scheme |
35b9e423 | 327 | readers. For example, it is used to implement Skribilo’s R5RS-derived |
1722d680 LC |
328 | document syntax. |
329 | ||
330 | Guile-Reader’s approach is similar to Common Lisp’s “read table”, but | |
331 | hopefully more powerful and flexible (for instance, one may instantiate as | |
332 | many readers as needed).") | |
d6d9f1f7 LC |
333 | (home-page "http://www.nongnu.org/guile-reader/") |
334 | (license gpl3+))) | |
1722d680 | 335 | |
ef02e1e9 LC |
336 | (define-public guile-ncurses |
337 | (package | |
338 | (name "guile-ncurses") | |
31a123fe | 339 | (version "1.6") |
ef02e1e9 LC |
340 | (source (origin |
341 | (method url-fetch) | |
342 | (uri (string-append "mirror://gnu/guile-ncurses/guile-ncurses-" | |
343 | version ".tar.gz")) | |
344 | (sha256 | |
345 | (base32 | |
31a123fe | 346 | "0wmk681zzi1wxw543r2s2r84ndnzxp69kr7pc01aw4l55hg7jn73")))) |
ef02e1e9 LC |
347 | (build-system gnu-build-system) |
348 | (inputs `(("ncurses" ,ncurses) | |
349 | ("guile" ,guile-2.0))) | |
350 | (arguments | |
2c6b7c7d LC |
351 | '(#:configure-flags (list "--with-ncursesw" ; Unicode support |
352 | (string-append "--with-guilesitedir=" | |
ef02e1e9 | 353 | (assoc-ref %outputs "out") |
3f69e393 | 354 | "/share/guile/site/2.0")) |
3931607e LC |
355 | |
356 | ;; Work around <http://bugs.gnu.org/21677>. | |
357 | #:make-flags '("XFAIL_TESTS=curses_034_util.test") | |
358 | ||
afd3d931 LC |
359 | #:phases (alist-cons-after |
360 | 'install 'post-install | |
361 | (lambda* (#:key outputs #:allow-other-keys) | |
362 | (let* ((out (assoc-ref outputs "out")) | |
363 | (dir (string-append out "/share/guile/site/")) | |
364 | (files (find-files dir ".scm"))) | |
365 | (substitute* files | |
366 | (("\"libguile-ncurses\"") | |
367 | (format #f "\"~a/lib/libguile-ncurses\"" | |
368 | out))))) | |
369 | %standard-phases))) | |
ef02e1e9 | 370 | (home-page "http://www.gnu.org/software/guile-ncurses/") |
f50d2669 | 371 | (synopsis "Guile bindings to ncurses") |
ef02e1e9 | 372 | (description |
12bcf94a | 373 | "guile-ncurses provides Guile language bindings for the ncurses |
79c311b8 | 374 | library.") |
ef02e1e9 LC |
375 | (license lgpl3+))) |
376 | ||
87d836b2 LC |
377 | (define-public mcron |
378 | (package | |
379 | (name "mcron") | |
d12c626c | 380 | (version "1.0.8") |
87d836b2 LC |
381 | (source (origin |
382 | (method url-fetch) | |
383 | (uri (string-append "mirror://gnu/mcron/mcron-" | |
384 | version ".tar.gz")) | |
385 | (sha256 | |
386 | (base32 | |
d12c626c | 387 | "0zparwgf01jgl1x53ik71ghabldq6zz18ha4dscps1i0qrzgap1b")) |
01eafd38 | 388 | (patches (list (search-patch "mcron-install.patch"))))) |
87d836b2 | 389 | (build-system gnu-build-system) |
b6c18d6a LC |
390 | (native-inputs `(("pkg-config" ,pkg-config))) |
391 | (inputs `(("ed" ,ed) ("which" ,which) ("guile" ,guile-2.0))) | |
87d836b2 | 392 | (home-page "http://www.gnu.org/software/mcron/") |
f50d2669 | 393 | (synopsis "Run jobs at scheduled times") |
87d836b2 | 394 | (description |
79c311b8 | 395 | "GNU Mcron is a complete replacement for Vixie cron. It is used to run |
a22dc0c4 | 396 | tasks on a schedule, such as every hour or every Monday. Mcron is written in |
79c311b8 LC |
397 | Guile, so its configuration can be written in Scheme; the original cron |
398 | format is also supported.") | |
87d836b2 LC |
399 | (license gpl3+))) |
400 | ||
3e9066fc LC |
401 | (define-public guile-lib |
402 | (package | |
403 | (name "guile-lib") | |
404 | (version "0.2.2") | |
405 | (source (origin | |
406 | (method url-fetch) | |
407 | (uri (string-append "mirror://savannah/guile-lib/guile-lib-" | |
408 | version ".tar.gz")) | |
409 | (sha256 | |
410 | (base32 | |
411 | "1f9n2b5b5r75lzjinyk6zp6g20g60msa0jpfrk5hhg4j8cy0ih4b")))) | |
412 | (build-system gnu-build-system) | |
413 | (arguments | |
414 | '(#:phases (alist-cons-before | |
415 | 'configure 'patch-module-dir | |
416 | (lambda _ | |
417 | (substitute* "src/Makefile.in" | |
418 | (("^moddir[[:blank:]]*=[[:blank:]]*([[:graph:]]+)" _ rhs) | |
419 | (string-append "moddir = " rhs "/2.0\n")))) | |
420 | %standard-phases))) | |
421 | (inputs `(("guile" ,guile-2.0))) | |
422 | (home-page "http://www.nongnu.org/guile-lib/") | |
423 | (synopsis "Collection of useful Guile Scheme modules") | |
424 | (description | |
35b9e423 | 425 | "Guile-Lib is intended as an accumulation place for pure-scheme Guile |
3e9066fc LC |
426 | modules, allowing for people to cooperate integrating their generic Guile |
427 | modules into a coherent library. Think \"a down-scaled, limited-scope CPAN | |
428 | for Guile\".") | |
429 | ||
430 | ;; The whole is under GPLv3+, but some modules are under laxer | |
431 | ;; distribution terms such as LGPL and public domain. See `COPYING' for | |
432 | ;; details. | |
433 | (license gpl3+))) | |
434 | ||
6050a1fb CR |
435 | (define-public guile-json |
436 | (package | |
437 | (name "guile-json") | |
cdf2b286 | 438 | (version "0.4.0") |
6050a1fb CR |
439 | (source (origin |
440 | (method url-fetch) | |
441 | (uri (string-append "mirror://savannah/guile-json/guile-json-" | |
442 | version ".tar.gz")) | |
443 | (sha256 | |
444 | (base32 | |
cdf2b286 | 445 | "0v06272rw4ycwzssjf3fzpk2vhpslvl55hz94q80vc6f74j0d5h6")) |
bf6fcf54 LC |
446 | (modules '((guix build utils))) |
447 | (snippet | |
448 | ;; Make sure everything goes under .../site/2.0, like Guile's | |
449 | ;; search paths expects. | |
450 | '(substitute* '("Makefile.in" "json/Makefile.in") | |
451 | (("moddir =.*/share/guile/site" all) | |
452 | (string-append all "/2.0")))))) | |
6050a1fb | 453 | (build-system gnu-build-system) |
db5584dd | 454 | (native-inputs `(("guile" ,guile-2.0))) |
6050a1fb CR |
455 | (home-page "http://savannah.nongnu.org/projects/guile-json/") |
456 | (synopsis "JSON module for Guile") | |
457 | (description | |
458 | "Guile-json supports parsing and building JSON documents according to the | |
35b9e423 | 459 | http:://json.org specification. These are the main features: |
6050a1fb CR |
460 | - Strictly complies to http://json.org specification. |
461 | - Build JSON documents programmatically via macros. | |
462 | - Unicode support for strings. | |
463 | - Allows JSON pretty printing.") | |
464 | (license lgpl3+))) | |
465 | ||
6bc24063 CAW |
466 | (define-public guile-minikanren |
467 | (package | |
468 | (name "guile-minikanren") | |
469 | (version "20150424.e844d85") | |
470 | (source (origin | |
471 | (method git-fetch) | |
472 | (uri (git-reference | |
473 | (url "https://github.com/ijp/minikanren.git") | |
474 | (commit "e844d85512f8c055d3f96143ee506007389a25e3"))) | |
821f4dc2 | 475 | (file-name (string-append name "-" version "-checkout")) |
6bc24063 CAW |
476 | (sha256 |
477 | (base32 | |
478 | "0r50jlpzi940jlmxyy3ddqqwmj5r12gb4bcv0ssini9v8km13xz6")))) | |
479 | (build-system trivial-build-system) | |
480 | (arguments | |
481 | `(#:modules | |
482 | ((guix build utils) | |
483 | (ice-9 match)) | |
484 | #:builder | |
485 | (begin | |
486 | (use-modules (guix build utils) | |
487 | (ice-9 match)) | |
488 | (let* ((out (assoc-ref %outputs "out")) | |
489 | (module-dir (string-append out "/share/guile/site/2.0")) | |
490 | (source (assoc-ref %build-inputs "source")) | |
f3d8cd79 | 491 | (doc (string-append out "/share/doc/guile-minikanren")) |
6bc24063 CAW |
492 | (scm-files '("minikanren.scm" |
493 | "minikanren/mkextraforms.scm" | |
494 | "minikanren/mkprelude.scm" | |
495 | "minikanren/mk.scm")) | |
496 | (guild (string-append (assoc-ref %build-inputs "guile") | |
497 | "/bin/guild"))) | |
498 | ;; Make installation directories. | |
499 | (mkdir-p (string-append module-dir "/minikanren")) | |
500 | (mkdir-p doc) | |
501 | ||
502 | ;; Compile .scm files and install. | |
503 | (chdir source) | |
504 | (setenv "GUILE_AUTO_COMPILE" "0") | |
505 | (for-each (lambda (file) | |
506 | (let* ((dest-file (string-append module-dir "/" | |
507 | file ".scm")) | |
508 | (go-file (match (string-split file #\.) | |
509 | ((base _) | |
510 | (string-append module-dir "/" | |
511 | base ".go"))))) | |
512 | ;; Install source module. | |
513 | (copy-file file dest-file) | |
514 | ;; Install compiled module. | |
515 | (unless (zero? (system* guild "compile" | |
516 | "-L" source | |
517 | "-o" go-file | |
518 | file)) | |
519 | (error (format #f "Failed to compile ~s to ~s!" | |
520 | file go-file))))) | |
521 | scm-files) | |
522 | ||
523 | ;; Also copy over the README. | |
96c46210 | 524 | (install-file "README.org" doc) |
6bc24063 CAW |
525 | #t)))) |
526 | (inputs | |
527 | `(("guile" ,guile-2.0))) | |
528 | (home-page "https://github.com/ijp/minikanren") | |
e881752c | 529 | (synopsis "MiniKanren declarative logic system, packaged for Guile") |
6bc24063 CAW |
530 | (description |
531 | "MiniKanren is a relational programming extension to the Scheme | |
532 | programming Language, written as a smaller version of Kanren suitable for | |
533 | pedagogical purposes. It is featured in the book, The Reasoned Schemer, | |
534 | written by Dan Friedman, William Byrd, and Oleg Kiselyov. | |
535 | ||
e881752c | 536 | This is Ian Price's r6rs packaged version of miniKanren, which deviates |
6bc24063 CAW |
537 | slightly from miniKanren mainline. |
538 | ||
539 | See http://minikanren.org/ for more on miniKanren generally.") | |
540 | (license expat))) | |
541 | ||
32e14fc1 CAW |
542 | (define-public guile-irregex |
543 | (package | |
544 | (name "guile-irregex") | |
545 | (version "0.9.3") | |
546 | (source (origin | |
547 | (method url-fetch) | |
548 | (uri (string-append | |
549 | "http://synthcode.com/scheme/irregex/irregex-" | |
550 | version | |
551 | ".tar.gz")) | |
552 | (sha256 | |
553 | (base32 | |
554 | "1b8jl7bycyl2ssp6sb1j24pp9hvqyxm85ki9bmwd50glyyjs5zay")))) | |
555 | (build-system gnu-build-system) | |
556 | (arguments | |
557 | `(#:modules ((guix build utils) | |
558 | (ice-9 match) | |
559 | (guix build gnu-build-system)) | |
560 | #:phases | |
561 | (modify-phases %standard-phases | |
32e14fc1 CAW |
562 | (delete 'configure) |
563 | (delete 'build) | |
564 | (delete 'check) | |
565 | (replace 'install | |
566 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
567 | (begin | |
568 | (use-modules (guix build utils) | |
569 | (ice-9 match)) | |
570 | (let* ((out (assoc-ref outputs "out")) | |
571 | (module-dir (string-append out "/share/guile/site/2.0")) | |
572 | (source (assoc-ref inputs "source")) | |
573 | (doc (string-append out "/share/doc/guile-irregex/")) | |
574 | (guild (string-append (assoc-ref %build-inputs "guile") | |
575 | "/bin/guild"))) | |
576 | ;; Make installation directories. | |
577 | (mkdir-p (string-append module-dir "/rx/source")) | |
578 | (mkdir-p doc) | |
579 | ||
580 | ;; Compile .scm files and install. | |
581 | (setenv "GUILE_AUTO_COMPILE" "0") | |
582 | ||
583 | (for-each (lambda (copy-info) | |
584 | (match copy-info | |
585 | ((src-file dest-file-basis) | |
586 | (let* ((dest-file (string-append | |
587 | module-dir dest-file-basis | |
588 | ".scm")) | |
589 | (go-file (string-append | |
590 | module-dir dest-file-basis | |
591 | ".go"))) | |
592 | ;; Install source module. | |
593 | (copy-file src-file | |
594 | dest-file) | |
595 | ;; Install compiled module. | |
596 | (unless (zero? (system* guild "compile" | |
597 | "-L" (getcwd) | |
598 | "-o" go-file | |
599 | src-file)) | |
600 | (error (format #f "Failed to compile ~s to ~s!" | |
601 | src-file dest-file))))))) | |
602 | '(("irregex-guile.scm" "/rx/irregex") | |
603 | ("irregex.scm" "/rx/source/irregex") | |
604 | ;; Not really reachable via guile's packaging system, | |
605 | ;; but nice to have around | |
606 | ("irregex-utils.scm" "/rx/source/irregex-utils"))) | |
607 | ||
608 | ;; Also copy over the README. | |
609 | (install-file "irregex.html" doc) | |
610 | #t))))))) | |
611 | (inputs | |
612 | `(("guile" ,guile-2.0))) | |
613 | (home-page "http://synthcode.com/scheme/irregex") | |
614 | (synopsis "S-expression based regular expressions") | |
615 | (description | |
616 | "Irregex is an s-expression based alternative to your classic | |
617 | string-based regular expressions. It implements SRFI 115 and is deeply | |
618 | inspired by the SCSH regular expression system.") | |
619 | (license bsd-3))) | |
93e7199b CAW |
620 | |
621 | ;; There are two guile-gdbm packages, one using the FFI and one with | |
622 | ;; direct C bindings, hence the verbose name. | |
623 | ||
624 | (define-public guile-gdbm-ffi | |
625 | (package | |
626 | (name "guile-gdbm-ffi") | |
627 | (version "20120209.fa1d5b6") | |
628 | (source (origin | |
629 | (method git-fetch) | |
630 | (uri (git-reference | |
631 | (url "https://github.com/ijp/guile-gdbm.git") | |
632 | (commit "fa1d5b6231d0e4d096687b378c025f2148c5f246"))) | |
821f4dc2 | 633 | (file-name (string-append name "-" version "-checkout")) |
93e7199b CAW |
634 | (sha256 |
635 | (base32 | |
636 | "1j8wrsw7v9w6qkl47xz0rdikg50v16nn6kbs3lgzcymjzpa7babj")))) | |
637 | (build-system trivial-build-system) | |
638 | (arguments | |
639 | `(#:modules | |
640 | ((guix build utils)) | |
641 | #:builder | |
642 | (begin | |
643 | (use-modules (guix build utils) | |
644 | (system base compile)) | |
645 | ||
646 | (let* ((out (assoc-ref %outputs "out")) | |
647 | (module-dir (string-append out "/share/guile/site/2.0")) | |
648 | (source (assoc-ref %build-inputs "source")) | |
649 | (doc (string-append out "/share/doc")) | |
650 | (guild (string-append (assoc-ref %build-inputs "guile") | |
651 | "/bin/guild")) | |
652 | (gdbm.scm-dest | |
653 | (string-append module-dir "/gdbm.scm")) | |
654 | (gdbm.go-dest | |
655 | (string-append module-dir "/gdbm.go"))) | |
656 | ;; Make installation directories. | |
657 | (mkdir-p module-dir) | |
658 | (mkdir-p doc) | |
659 | ||
660 | ;; Switch directory for compiling and installing | |
661 | (chdir source) | |
662 | ||
663 | ;; copy the source | |
664 | (copy-file "gdbm.scm" gdbm.scm-dest) | |
665 | ||
666 | ;; Patch the FFI | |
667 | (substitute* gdbm.scm-dest | |
668 | (("\\(dynamic-link \"libgdbm\"\\)") | |
669 | (format #f "(dynamic-link \"~a/lib/libgdbm.so\")" | |
670 | (assoc-ref %build-inputs "gdbm")))) | |
671 | ||
672 | ;; compile to the destination | |
673 | (compile-file gdbm.scm-dest | |
674 | #:output-file gdbm.go-dest))))) | |
675 | (inputs | |
676 | `(("guile" ,guile-2.0))) | |
677 | (propagated-inputs | |
678 | `(("gdbm" ,gdbm))) | |
679 | (home-page "https://github.com/ijp/guile-gdbm") | |
680 | (synopsis "Guile bindings to the GDBM library via Guile's FFI") | |
681 | (description | |
682 | "Guile bindings to the GDBM key-value storage system, using | |
683 | Guile's foreign function interface.") | |
684 | (license gpl3+))) | |
685 | ||
27f5e13e DT |
686 | (define-public haunt |
687 | (package | |
688 | (name "haunt") | |
689 | (version "0.1") | |
690 | (source (origin | |
691 | (method url-fetch) | |
692 | (uri (string-append "http://files.dthompson.us/haunt/haunt-" | |
693 | version ".tar.gz")) | |
694 | (sha256 | |
695 | (base32 | |
696 | "15q1qwjnay7k90ppqrzqsmikvwyj61mjvf1zahyd9gm4vi2fgb3x")))) | |
697 | (build-system gnu-build-system) | |
698 | (inputs | |
699 | `(("guile" ,guile-2.0))) | |
700 | (synopsis "Functional static site generator") | |
701 | (description "Haunt is a static site generator written in Guile | |
702 | Scheme. Haunt features a functional build system and an extensible | |
703 | interface for reading articles in any format.") | |
704 | (home-page "http://haunt.dthompson.us") | |
705 | (license gpl3+))) | |
706 | ||
36548111 DT |
707 | (define-public guile-redis |
708 | (package | |
709 | (name "guile-redis") | |
710 | (version "0.1.0") | |
711 | (source (origin | |
712 | (method url-fetch) | |
713 | (uri (string-append "mirror://savannah/guile-redis/guile-redis-" | |
714 | version ".tar.gz")) | |
715 | (sha256 | |
716 | (base32 | |
717 | "0vx6if6b4r3kwx64vzbs6vpc0cpcr85x11w9vkzq27gw8n7isv56")) | |
718 | (modules '((guix build utils))) | |
719 | (snippet | |
720 | ;; Make sure everything goes under .../site/2.0, like Guile's | |
721 | ;; search paths expects. | |
722 | '(substitute* '("Makefile.in" | |
723 | "redis/Makefile.in" | |
724 | "redis/commands/Makefile.in") | |
725 | (("moddir =.*/share/guile/site" all) | |
726 | (string-append all "/2.0")))))) | |
727 | (build-system gnu-build-system) | |
728 | (native-inputs | |
729 | `(("guile" ,guile-2.0))) | |
730 | (home-page "http://savannah.nongnu.org/projects/guile-redis/") | |
731 | (synopsis "Redis client library for Guile") | |
732 | (description "Guile-redis provides a Scheme interface to the Redis | |
733 | key-value cache and store.") | |
734 | (license lgpl3+))) | |
735 | ||
9d373377 CAW |
736 | (define-public guile-wisp |
737 | (package | |
738 | (name "guile-wisp") | |
739 | (version "0.9.0") | |
740 | (source (origin | |
741 | (method url-fetch) | |
742 | (uri (string-append "https://bitbucket.org/ArneBab/" | |
743 | "wisp/downloads/wisp-" | |
744 | version ".tar.gz")) | |
745 | (sha256 | |
746 | (base32 | |
747 | "0y5fxacalkgbv9s71h58vdvm2h2ln3rk024dd0vszwcf953as5fq")))) | |
748 | (build-system gnu-build-system) | |
749 | (arguments | |
750 | `(#:modules ((system base compile) | |
751 | ,@%gnu-build-system-modules) | |
752 | #:phases | |
753 | (modify-phases %standard-phases | |
754 | (add-before | |
755 | 'configure 'substitute-before-config | |
756 | ||
757 | (lambda* (#:key inputs #:allow-other-keys) | |
758 | (let ((bash (assoc-ref inputs "bash"))) | |
759 | ;; configure checks for guile-2.0, but ours is just named "guile" :) | |
760 | (substitute* "configure" | |
761 | (("guile-2.0") "guile")) | |
762 | ;; Puts together some test files with /bin/bash hardcoded | |
763 | (substitute* "Makefile.in" | |
764 | (("/bin/bash") | |
765 | (string-append bash "/bin/bash") )) | |
766 | #t))) | |
767 | ||
768 | ;; auto compilation breaks, but if we set HOME to /tmp, | |
769 | ;; that works ok | |
770 | (add-before | |
771 | 'check 'auto-compile-hacky-workaround | |
772 | (lambda _ | |
773 | (setenv "HOME" "/tmp") | |
774 | #t)) | |
775 | (replace | |
776 | 'install | |
777 | (lambda* (#:key outputs inputs #:allow-other-keys) | |
778 | (let* ((out (assoc-ref outputs "out")) | |
779 | (module-dir (string-append out "/share/guile/site/2.0")) | |
780 | (language-dir | |
781 | (string-append module-dir "/language/wisp")) | |
782 | (guild (string-append (assoc-ref inputs "guile") | |
783 | "/bin/guild"))) | |
784 | ;; Make installation directories. | |
785 | (mkdir-p module-dir) | |
786 | (mkdir-p language-dir) | |
787 | ||
788 | ;; copy the source | |
789 | (copy-file "wisp-scheme.scm" | |
790 | (string-append module-dir "/wisp-scheme.scm")) | |
791 | (copy-file "language/wisp/spec.scm" | |
792 | (string-append language-dir "/spec.scm")) | |
793 | ||
794 | ;; compile to the destination | |
795 | (compile-file "wisp-scheme.scm" | |
796 | #:output-file (string-append | |
797 | module-dir "/wisp-scheme.go")) | |
798 | (compile-file "language/wisp/spec.scm" | |
799 | #:output-file (string-append | |
800 | language-dir "/spec.go")) | |
801 | #t)))))) | |
802 | (home-page "http://draketo.de/english/wisp") | |
803 | (inputs | |
804 | `(("guile" ,guile-2.0) | |
805 | ("python" ,python))) | |
a124bbd2 SB |
806 | (synopsis "Whitespace to lisp syntax for Guile") |
807 | (description "Wisp is a syntax for Guile which provides a Python-like | |
9d373377 CAW |
808 | whitespace-significant language. It may be easier on the eyes for some |
809 | users and in some situations.") | |
810 | (license gpl3+))) | |
811 | ||
5649c8cd DT |
812 | (define-public guile-sly |
813 | (package | |
814 | (name "guile-sly") | |
815 | (version "0.1") | |
816 | (source (origin | |
817 | (method url-fetch) | |
818 | (uri (string-append "http://files.dthompson.us/sly/sly-" | |
819 | version ".tar.gz")) | |
820 | (sha256 | |
821 | (base32 | |
822 | "1svzlbz2vripmyq2kjh0rig16bsrnbkwbsm558pjln9l65mcl4qq")))) | |
823 | (build-system gnu-build-system) | |
824 | (arguments | |
825 | '(#:configure-flags | |
826 | (list (string-append "--with-libfreeimage-prefix=" | |
827 | (assoc-ref %build-inputs "freeimage")) | |
828 | (string-append "--with-libgslcblas-prefix=" | |
829 | (assoc-ref %build-inputs "gsl"))))) | |
830 | (native-inputs | |
831 | `(("pkg-config" ,pkg-config))) | |
832 | (propagated-inputs | |
833 | `(("guile" ,guile-2.0) | |
834 | ("guile-sdl" ,guile-sdl) | |
835 | ("guile-opengl" ,guile-opengl))) | |
836 | (inputs | |
837 | `(("gsl" ,gsl) | |
838 | ("freeimage" ,freeimage) | |
839 | ("mesa" ,mesa))) | |
840 | (synopsis "2D/3D game engine for GNU Guile") | |
841 | (description "Sly is a 2D/3D game engine written in Guile Scheme. Sly | |
842 | features a functional reactive programming interface and live coding | |
843 | capabilities.") | |
844 | (home-page "http://dthompson.us/pages/software/sly.html") | |
845 | (license gpl3+))) | |
846 | ||
1722d680 | 847 | ;;; guile.scm ends here |