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> |
6bc24063 | 4 | ;;; Copyright © 2015 Christopher Allan Webber <cwebber@dustycloud.org> |
44a2bdf8 | 5 | ;;; Copyright © 2016 Alex Sassmannshausen <alex@pompo.co> |
daeb61f7 | 6 | ;;; Copyright © 2016 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> |
bd9af610 | 9 | ;;; Copyright © 2016 Alex Kost <alezost@gmail.com> |
8a666bc5 | 10 | ;;; Copyright © 2016 Adonay "adfeno" Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno@openmailbox.org> |
3b5783fc | 11 | ;;; Copyright © 2016 Amirouche <amirouche@hypermove.net> |
1722d680 | 12 | ;;; |
233e7676 | 13 | ;;; This file is part of GNU Guix. |
1722d680 | 14 | ;;; |
233e7676 | 15 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
1722d680 LC |
16 | ;;; under the terms of the GNU General Public License as published by |
17 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
18 | ;;; your option) any later version. | |
19 | ;;; | |
233e7676 | 20 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
1722d680 LC |
21 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
22 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
23 | ;;; GNU General Public License for more details. | |
24 | ;;; | |
25 | ;;; You should have received a copy of the GNU General Public License | |
233e7676 | 26 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
1722d680 | 27 | |
1ffa7090 | 28 | (define-module (gnu packages guile) |
4a44e743 | 29 | #:use-module (guix licenses) |
59a43334 | 30 | #:use-module (gnu packages) |
472fc855 | 31 | #:use-module (gnu packages aspell) |
9c782445 | 32 | #:use-module (gnu packages bash) |
1ffa7090 LC |
33 | #:use-module (gnu packages bdw-gc) |
34 | #:use-module (gnu packages gawk) | |
35 | #:use-module (gnu packages gperf) | |
36 | #:use-module (gnu packages libffi) | |
37 | #:use-module (gnu packages autotools) | |
f906d30c | 38 | #:use-module (gnu packages flex) |
1ffa7090 | 39 | #:use-module (gnu packages libunistring) |
7119cca8 | 40 | #:use-module (gnu packages linux) |
1ffa7090 LC |
41 | #:use-module (gnu packages m4) |
42 | #:use-module (gnu packages multiprecision) | |
43 | #:use-module (gnu packages pkg-config) | |
44 | #:use-module (gnu packages readline) | |
ef02e1e9 | 45 | #:use-module (gnu packages ncurses) |
87d836b2 | 46 | #:use-module (gnu packages ed) |
ce0614dd | 47 | #:use-module (gnu packages base) |
f906d30c | 48 | #:use-module (gnu packages texinfo) |
01497dfe | 49 | #:use-module (gnu packages man) |
f906d30c | 50 | #:use-module (gnu packages gettext) |
b416aadf | 51 | #:use-module (gnu packages databases) |
9d373377 | 52 | #:use-module (gnu packages python) |
5649c8cd DT |
53 | #:use-module (gnu packages gl) |
54 | #:use-module (gnu packages sdl) | |
55 | #:use-module (gnu packages maths) | |
56 | #:use-module (gnu packages image) | |
bd9af610 AK |
57 | #:use-module (gnu packages xdisorg) |
58 | #:use-module (gnu packages xorg) | |
1722d680 | 59 | #:use-module (guix packages) |
87f5d366 | 60 | #:use-module (guix download) |
6bc24063 | 61 | #:use-module (guix git-download) |
32795fcf | 62 | #:use-module (guix build-system gnu) |
6bc24063 | 63 | #:use-module (guix build-system trivial) |
32795fcf LC |
64 | #:use-module (guix utils) |
65 | #:use-module (ice-9 match)) | |
1722d680 LC |
66 | |
67 | ;;; Commentary: | |
68 | ;;; | |
c44899a2 | 69 | ;;; GNU Guile, and modules and extensions. |
1722d680 LC |
70 | ;;; |
71 | ;;; Code: | |
72 | ||
c44899a2 LC |
73 | (define-public guile-1.8 |
74 | (package | |
75 | (name "guile") | |
76 | (version "1.8.8") | |
77 | (source (origin | |
87f5d366 | 78 | (method url-fetch) |
0db342a5 | 79 | (uri (string-append "mirror://gnu/guile/guile-" version |
c44899a2 LC |
80 | ".tar.gz")) |
81 | (sha256 | |
82 | (base32 | |
01eafd38 | 83 | "0l200a0v7h8bh0cwz6v7hc13ds39cgqsmfrks55b1rbj5vniyiy3")) |
fc1adab1 | 84 | (patches (search-patches "guile-1.8-cpp-4.5.patch")))) |
c44899a2 LC |
85 | (build-system gnu-build-system) |
86 | (arguments '(#:configure-flags '("--disable-error-on-warning") | |
c44899a2 LC |
87 | |
88 | ;; Insert a phase before `configure' to patch things up. | |
89 | #:phases (alist-cons-before | |
90 | 'configure | |
2f4fbe1c | 91 | 'patch-stuff |
c44899a2 LC |
92 | (lambda* (#:key outputs #:allow-other-keys) |
93 | ;; Add a call to `lt_dladdsearchdir' so that | |
94 | ;; `libguile-readline.so' & co. are in the | |
95 | ;; loader's search path. | |
96 | (substitute* "libguile/dynl.c" | |
2f4fbe1c LC |
97 | (("lt_dlinit.*$" match) |
98 | (format #f | |
99 | " ~a~% lt_dladdsearchdir(\"~a/lib\");~%" | |
100 | match | |
101 | (assoc-ref outputs "out")))) | |
102 | ||
103 | ;; The usual /bin/sh... | |
104 | (substitute* "ice-9/popen.scm" | |
105 | (("/bin/sh") (which "sh")))) | |
c44899a2 | 106 | %standard-phases))) |
01eafd38 | 107 | (inputs `(("gawk" ,gawk) |
c44899a2 LC |
108 | ("readline" ,readline))) |
109 | ||
110 | ;; Since `guile-1.8.pc' has "Libs: ... -lgmp -lltdl", these must be | |
111 | ;; propagated. | |
112 | (propagated-inputs `(("gmp" ,gmp) | |
be11b102 | 113 | ("libltdl" ,libltdl))) |
c44899a2 LC |
114 | |
115 | ;; When cross-compiling, a native version of Guile itself is needed. | |
116 | (self-native-input? #t) | |
117 | ||
9be8d7c8 LC |
118 | (native-search-paths |
119 | (list (search-path-specification | |
120 | (variable "GUILE_LOAD_PATH") | |
af070955 | 121 | (files '("share/guile/site"))))) |
9be8d7c8 | 122 | |
f50d2669 | 123 | (synopsis "Scheme implementation intended especially for extensions") |
c44899a2 | 124 | (description |
a22dc0c4 LC |
125 | "Guile is the GNU Ubiquitous Intelligent Language for Extensions, the |
126 | official extension language of the GNU system. It is an implementation of | |
127 | the Scheme language which can be easily embedded in other applications to | |
128 | provide a convenient means of extending the functionality of the application | |
129 | without requiring the source code to be rewritten.") | |
c44899a2 | 130 | (home-page "http://www.gnu.org/software/guile/") |
4a44e743 | 131 | (license lgpl2.0+))) |
c44899a2 LC |
132 | |
133 | (define-public guile-2.0 | |
134 | (package | |
135 | (name "guile") | |
7f9c8970 | 136 | (version "2.0.12") |
c62a31ca | 137 | (replacement guile-2.0.13) ;CVE-2016-8606 and CVE-2016-8605 |
c44899a2 | 138 | (source (origin |
87f5d366 | 139 | (method url-fetch) |
0db342a5 | 140 | (uri (string-append "mirror://gnu/guile/guile-" version |
c44899a2 LC |
141 | ".tar.xz")) |
142 | (sha256 | |
143 | (base32 | |
923d9caa | 144 | "1sdpjq0jf1h65w29q0zprj4x6kdp5jskkvbnlwphy9lvdxrqg0fy")))) |
c44899a2 LC |
145 | (build-system gnu-build-system) |
146 | (native-inputs `(("pkgconfig" ,pkg-config))) | |
147 | (inputs `(("libffi" ,libffi) | |
9c782445 | 148 | ("readline" ,readline) |
88da729f JN |
149 | ,@(libiconv-if-needed) |
150 | ,@(if (target-mingw?) '() `(("bash" ,bash))))) | |
c44899a2 LC |
151 | (propagated-inputs |
152 | `( ;; These ones aren't normally needed here, but since `libguile-2.0.la' | |
153 | ;; reads `-lltdl -lunistring', adding them here will add the needed | |
154 | ;; `-L' flags. As for why the `.la' file lacks the `-L' flags, see | |
155 | ;; <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/18903>. | |
156 | ("libunistring" ,libunistring) | |
be11b102 LC |
157 | |
158 | ;; Depend on LIBLTDL, not LIBTOOL. That way, we avoid some the extra | |
159 | ;; dependencies that LIBTOOL has, which is helpful during bootstrap. | |
160 | ("libltdl" ,libltdl) | |
c44899a2 LC |
161 | |
162 | ;; The headers and/or `guile-2.0.pc' refer to these packages, so they | |
163 | ;; must be propagated. | |
bda1bc6c | 164 | ("bdw-gc" ,libgc) |
c44899a2 LC |
165 | ("gmp" ,gmp))) |
166 | ||
167 | (self-native-input? #t) | |
168 | ||
9bf62d9b LC |
169 | (outputs '("out" "debug")) |
170 | ||
8ffaa93b | 171 | (arguments |
b5e0c870 LC |
172 | `(#:configure-flags '("--disable-static") ;saves 3MiB |
173 | #:phases (alist-cons-before | |
8ffaa93b LC |
174 | 'configure 'pre-configure |
175 | (lambda* (#:key inputs #:allow-other-keys) | |
58b4e8e8 | 176 | ;; Tell (ice-9 popen) the file name of Bash. |
8ffaa93b LC |
177 | (let ((bash (assoc-ref inputs "bash"))) |
178 | (substitute* "module/ice-9/popen.scm" | |
88da729f JN |
179 | ;; If bash is #f allow fallback for user to provide |
180 | ;; "bash" in PATH. This happens when cross-building to | |
181 | ;; MinGW for which we do not have Bash yet. | |
8ffaa93b | 182 | (("/bin/sh") |
88da729f JN |
183 | ,@(if (target-mingw?) |
184 | '((if bash | |
185 | (string-append bash "/bin/bash") | |
186 | "bash")) | |
187 | '((string-append bash "/bin/bash"))))))) | |
db619089 | 188 | %standard-phases))) |
8ffaa93b | 189 | |
9be8d7c8 LC |
190 | (native-search-paths |
191 | (list (search-path-specification | |
192 | (variable "GUILE_LOAD_PATH") | |
af070955 | 193 | (files '("share/guile/site/2.0"))) |
9be8d7c8 LC |
194 | (search-path-specification |
195 | (variable "GUILE_LOAD_COMPILED_PATH") | |
ca408580 | 196 | (files '("lib/guile/2.0/site-ccache" |
05f1e956 | 197 | "share/guile/site/2.0"))))) |
9be8d7c8 | 198 | |
f50d2669 | 199 | (synopsis "Scheme implementation intended especially for extensions") |
c44899a2 | 200 | (description |
a22dc0c4 LC |
201 | "Guile is the GNU Ubiquitous Intelligent Language for Extensions, the |
202 | official extension language of the GNU system. It is an implementation of | |
203 | the Scheme language which can be easily embedded in other applications to | |
204 | provide a convenient means of extending the functionality of the application | |
205 | without requiring the source code to be rewritten.") | |
c44899a2 | 206 | (home-page "http://www.gnu.org/software/guile/") |
4a44e743 | 207 | (license lgpl3+))) |
c44899a2 | 208 | |
fa29b199 LC |
209 | (define-public guile-2.0/fixed |
210 | ;; A package of Guile 2.0 that's rarely changed. It is the one used | |
211 | ;; in the `base' module, and thus changing it entails a full rebuild. | |
c62a31ca LC |
212 | (package |
213 | (inherit guile-2.0) | |
214 | (properties '((hidden? . #t))) ;people should install 'guile-2.0' | |
215 | (replacement #f))) | |
216 | ||
217 | (define guile-2.0.13 | |
218 | (package | |
219 | (inherit guile-2.0) | |
220 | (version "2.0.13") | |
221 | (source (origin | |
222 | (method url-fetch) | |
223 | (uri (string-append "mirror://gnu/guile/guile-" version | |
224 | ".tar.xz")) | |
225 | (sha256 | |
226 | (base32 | |
8134dc1f LC |
227 | "12yqkr974y91ylgw6jnmci2v90i90s7h9vxa4zk0sai8vjnz4i1p")) |
228 | (patches (search-patches "guile-repl-server-test.patch")))))) | |
fa29b199 | 229 | |
be3feafe | 230 | (define-public guile-next |
f906d30c | 231 | (package (inherit guile-2.0) |
be3feafe | 232 | (name "guile-next") |
4fbd0f4f | 233 | (version "2.1.5") |
c62a31ca | 234 | (replacement #f) |
4eae7980 LC |
235 | (source (origin |
236 | (method url-fetch) | |
237 | (uri (string-append "ftp://alpha.gnu.org/gnu/guile/guile-" | |
238 | version ".tar.xz")) | |
239 | (sha256 | |
240 | (base32 | |
4fbd0f4f | 241 | "0r9y4hw17dlxahik4zsccfb2f3p2a07wqndfm251bgmam9hln6gi")) |
d9f0788a LC |
242 | (modules '((guix build utils))) |
243 | ||
244 | ;; Remove the pre-built object files. Instead, build everything | |
245 | ;; from source, at the expense of significantly longer build | |
246 | ;; times (almost 3 hours on a 4-core Intel i5). | |
247 | (snippet '(for-each delete-file | |
248 | (find-files "prebuilt" "\\.go$"))))) | |
dd90ed89 | 249 | (synopsis "Snapshot of what will become version 2.2 of GNU Guile") |
4fbd0f4f LC |
250 | (properties '((timeout . 72000) ;20 hours |
251 | (upstream-name . "guile") | |
252 | (ftp-server . "alpha.gnu.org") | |
253 | (ftp-directory . "/gnu/guile"))) | |
dd90ed89 DT |
254 | (native-search-paths |
255 | (list (search-path-specification | |
256 | (variable "GUILE_LOAD_PATH") | |
257 | (files '("share/guile/site/2.2"))) | |
258 | (search-path-specification | |
259 | (variable "GUILE_LOAD_COMPILED_PATH") | |
31769b9f | 260 | (files '("lib/guile/2.2/site-ccache" |
dd90ed89 | 261 | "share/guile/site/2.2"))))))) |
4eae7980 | 262 | |
947a5d47 LC |
263 | (define (guile-2.2-package-name name) |
264 | "Return NAME with a \"guile2.2-\" prefix instead of \"guile-\", when | |
265 | applicable." | |
266 | (if (string-prefix? "guile-" name) | |
267 | (string-append "guile2.2-" | |
268 | (string-drop name | |
269 | (string-length "guile-"))) | |
270 | name)) | |
271 | ||
272 | (define package-for-guile-2.2 | |
273 | ;; A procedure that rewrites the dependency tree of the given package to use | |
274 | ;; GUILE-NEXT instead of GUILE-2.0. | |
275 | (package-input-rewriting `((,guile-2.0 . ,guile-next)) | |
276 | guile-2.2-package-name)) | |
277 | ||
4eae7980 LC |
278 | (define-public guile-for-guile-emacs |
279 | (package (inherit guile-next) | |
280 | (name "guile-for-guile-emacs") | |
281 | (version "20150510.d8d9a8d") | |
f906d30c CAW |
282 | (source (origin |
283 | (method git-fetch) | |
284 | (uri (git-reference | |
4eae7980 LC |
285 | (url "git://git.hcoop.net/git/bpt/guile.git") |
286 | (commit "d8d9a8da05ec876acba81a559798eb5eeceb5a17"))) | |
f906d30c CAW |
287 | (sha256 |
288 | (base32 | |
4eae7980 | 289 | "00sprsshy16y8pxjy126hr2adqcvvzzz96hjyjwgg8swva1qh6b0")))) |
f906d30c CAW |
290 | (arguments |
291 | (substitute-keyword-arguments `(;; Tests aren't passing for now. | |
292 | ;; Obviously we should re-enable this! | |
293 | #:tests? #f | |
4eae7980 | 294 | ,@(package-arguments guile-next)) |
f906d30c CAW |
295 | ((#:phases phases) |
296 | `(modify-phases ,phases | |
297 | (add-after 'unpack 'autogen | |
298 | (lambda _ | |
299 | (zero? (system* "sh" "autogen.sh")))) | |
300 | (add-before 'autogen 'patch-/bin/sh | |
301 | (lambda _ | |
302 | (substitute* "build-aux/git-version-gen" | |
303 | (("#!/bin/sh") (string-append "#!" (which "sh")))) | |
304 | #t)))))) | |
305 | (native-inputs | |
306 | `(("autoconf" ,autoconf) | |
307 | ("automake" ,automake) | |
308 | ("libtool" ,libtool) | |
309 | ("flex" ,flex) | |
310 | ("texinfo" ,texinfo) | |
b94a6ca0 | 311 | ("gettext" ,gettext-minimal) |
daeb61f7 RW |
312 | ,@(package-native-inputs guile-next))) |
313 | ;; Same as in guile-2.0 | |
314 | (native-search-paths | |
315 | (list (search-path-specification | |
316 | (variable "GUILE_LOAD_PATH") | |
317 | (files '("share/guile/site/2.0"))) | |
318 | (search-path-specification | |
319 | (variable "GUILE_LOAD_COMPILED_PATH") | |
31769b9f | 320 | (files '("lib/guile/2.0/site-ccache" |
daeb61f7 | 321 | "share/guile/site/2.0"))))))) |
be3feafe | 322 | |
c44899a2 LC |
323 | \f |
324 | ;;; | |
325 | ;;; Extensions. | |
326 | ;;; | |
327 | ||
7119cca8 ML |
328 | (define-public artanis |
329 | (package | |
330 | (name "artanis") | |
c84ceace | 331 | (version "0.1.2") |
7119cca8 ML |
332 | (source (origin |
333 | (method url-fetch) | |
334 | (uri (string-append "ftp://alpha.gnu.org/gnu/artanis/artanis-" | |
335 | version ".tar.gz")) | |
336 | (sha256 | |
337 | (base32 | |
8a666bc5 AFN |
338 | "19m3ak12cqk8js9d2mdg11kh4fjsq8frfpd10qw75h0zpr5cywpp")) |
339 | (patches (search-patches "artanis-fix-Makefile.in.patch")))) | |
7119cca8 ML |
340 | (build-system gnu-build-system) |
341 | ;; TODO: Add guile-dbi and guile-dbd optional dependencies. | |
342 | (inputs `(("guile" ,guile-2.0))) | |
343 | (native-inputs `(("bash" ,bash) ;for the `source' builtin | |
344 | ("pkgconfig" ,pkg-config) | |
345 | ("util-linux" ,util-linux))) ;for the `script' command | |
346 | (arguments | |
347 | '(#:make-flags | |
348 | ;; TODO: The documentation must be built with the `docs' target. | |
349 | (let* ((out (assoc-ref %outputs "out")) | |
350 | (dir (string-append out "/share/guile/site/2.0"))) | |
351 | ;; Don't use (%site-dir) for site paths. | |
352 | (list (string-append "MOD_PATH=" dir) | |
8a666bc5 | 353 | (string-append "MOD_COMPILED_PATH=" dir))) |
7119cca8 ML |
354 | #:test-target "test" |
355 | #:phases | |
356 | (modify-phases %standard-phases | |
357 | (add-before | |
358 | 'install 'substitute-root-dir | |
359 | (lambda* (#:key outputs #:allow-other-keys) | |
360 | (let ((out (assoc-ref outputs "out"))) | |
361 | (substitute* "Makefile" ;ignore the execution of bash.bashrc | |
362 | ((" /etc/bash.bashrc") " /dev/null")) | |
363 | (substitute* "Makefile" ;set the root of config files to OUT | |
364 | ((" /etc") (string-append " " out "/etc"))) | |
365 | (mkdir-p (string-append out "/bin")) ;for the `art' executable | |
366 | #t)))))) | |
367 | (synopsis "Web application framework written in Guile") | |
368 | (description "GNU Artanis is a web application framework written in Guile | |
369 | Scheme. A web application framework (WAF) is a software framework that is | |
370 | designed to support the development of dynamic websites, web applications, web | |
371 | services and web resources. The framework aims to alleviate the overhead | |
372 | associated with common activities performed in web development. Artanis | |
373 | provides several tools for web development: database access, templating | |
374 | frameworks, session management, URL-remapping for RESTful, page caching, and | |
375 | more.") | |
376 | (home-page "https://www.gnu.org/software/artanis/") | |
377 | (license (list gpl3+ lgpl3+)))) ;dual license | |
378 | ||
d6d9f1f7 | 379 | (define-public guile-reader |
1722d680 | 380 | (package |
d6d9f1f7 | 381 | (name "guile-reader") |
ad29c6f2 | 382 | (version "0.6.1") |
d6d9f1f7 LC |
383 | (source (origin |
384 | (method url-fetch) | |
385 | (uri (string-append "mirror://savannah/guile-reader/guile-reader-" | |
386 | version ".tar.gz")) | |
387 | (sha256 | |
388 | (base32 | |
ad29c6f2 | 389 | "020wz5w8z6g79nbqifg2n496wxwkcjzh8xizpv6mz0hczpl155ma")))) |
d6d9f1f7 LC |
390 | (build-system gnu-build-system) |
391 | (native-inputs `(("pkgconfig" ,pkg-config) | |
392 | ("gperf" ,gperf))) | |
393 | (inputs `(("guile" ,guile-2.0))) | |
ad29c6f2 | 394 | (arguments `(#:configure-flags |
d6d9f1f7 LC |
395 | (let ((out (assoc-ref %outputs "out"))) |
396 | (list (string-append "--with-guilemoduledir=" | |
397 | out "/share/guile/site/2.0"))))) | |
398 | (synopsis "Framework for building readers for GNU Guile") | |
399 | (description | |
400 | "Guile-Reader is a simple framework for building readers for GNU Guile. | |
1722d680 LC |
401 | |
402 | The idea is to make it easy to build procedures that extend Guile’s read | |
35b9e423 | 403 | procedure. Readers supporting various syntax variants can easily be written, |
1722d680 | 404 | possibly by re-using existing “token readers” of a standard Scheme |
35b9e423 | 405 | readers. For example, it is used to implement Skribilo’s R5RS-derived |
1722d680 LC |
406 | document syntax. |
407 | ||
408 | Guile-Reader’s approach is similar to Common Lisp’s “read table”, but | |
409 | hopefully more powerful and flexible (for instance, one may instantiate as | |
410 | many readers as needed).") | |
d6d9f1f7 LC |
411 | (home-page "http://www.nongnu.org/guile-reader/") |
412 | (license gpl3+))) | |
1722d680 | 413 | |
ef02e1e9 LC |
414 | (define-public guile-ncurses |
415 | (package | |
416 | (name "guile-ncurses") | |
d81850d4 | 417 | (version "2.1") |
ef02e1e9 LC |
418 | (source (origin |
419 | (method url-fetch) | |
420 | (uri (string-append "mirror://gnu/guile-ncurses/guile-ncurses-" | |
421 | version ".tar.gz")) | |
422 | (sha256 | |
423 | (base32 | |
d81850d4 | 424 | "1h7rnq4g7xlxxybcb3vjq6nscm9zhlmfaxb7258c8ax7him4azg6")))) |
ef02e1e9 LC |
425 | (build-system gnu-build-system) |
426 | (inputs `(("ncurses" ,ncurses) | |
427 | ("guile" ,guile-2.0))) | |
0881b616 | 428 | (native-inputs `(("pkg-config" ,pkg-config))) |
ef02e1e9 | 429 | (arguments |
2c6b7c7d | 430 | '(#:configure-flags (list "--with-ncursesw" ; Unicode support |
0881b616 | 431 | "--with-gnu-filesystem-hierarchy") |
fa37f21b EF |
432 | #:phases |
433 | (modify-phases %standard-phases | |
8c4e99cc | 434 | (add-before 'build 'fix-libguile-ncurses-file-name |
fa37f21b | 435 | (lambda* (#:key outputs #:allow-other-keys) |
8c4e99cc JD |
436 | (and (zero? (system* "make" "install" |
437 | "-C" "src/ncurses" | |
438 | "-j" (number->string | |
439 | (parallel-job-count)))) | |
440 | (let* ((out (assoc-ref outputs "out")) | |
441 | (dir "src/ncurses") | |
442 | (files (find-files dir ".scm"))) | |
443 | (substitute* files | |
444 | (("\"libguile-ncurses\"") | |
445 | (format #f "\"~a/lib/guile/2.0/libguile-ncurses\"" | |
446 | out))) | |
447 | #t))))))) | |
d81850d4 | 448 | (home-page "https://www.gnu.org/software/guile-ncurses/") |
f50d2669 | 449 | (synopsis "Guile bindings to ncurses") |
ef02e1e9 | 450 | (description |
12bcf94a | 451 | "guile-ncurses provides Guile language bindings for the ncurses |
79c311b8 | 452 | library.") |
ef02e1e9 LC |
453 | (license lgpl3+))) |
454 | ||
87d836b2 LC |
455 | (define-public mcron |
456 | (package | |
457 | (name "mcron") | |
d12c626c | 458 | (version "1.0.8") |
87d836b2 LC |
459 | (source (origin |
460 | (method url-fetch) | |
461 | (uri (string-append "mirror://gnu/mcron/mcron-" | |
462 | version ".tar.gz")) | |
463 | (sha256 | |
464 | (base32 | |
d12c626c | 465 | "0zparwgf01jgl1x53ik71ghabldq6zz18ha4dscps1i0qrzgap1b")) |
fc1adab1 | 466 | (patches (search-patches "mcron-install.patch")))) |
87d836b2 | 467 | (build-system gnu-build-system) |
b6c18d6a LC |
468 | (native-inputs `(("pkg-config" ,pkg-config))) |
469 | (inputs `(("ed" ,ed) ("which" ,which) ("guile" ,guile-2.0))) | |
87d836b2 | 470 | (home-page "http://www.gnu.org/software/mcron/") |
f50d2669 | 471 | (synopsis "Run jobs at scheduled times") |
87d836b2 | 472 | (description |
79c311b8 | 473 | "GNU Mcron is a complete replacement for Vixie cron. It is used to run |
a22dc0c4 | 474 | tasks on a schedule, such as every hour or every Monday. Mcron is written in |
79c311b8 LC |
475 | Guile, so its configuration can be written in Scheme; the original cron |
476 | format is also supported.") | |
87d836b2 LC |
477 | (license gpl3+))) |
478 | ||
01497dfe LC |
479 | (define-public mcron2 |
480 | ;; This is mthl's mcron development branch, not yet merged in mcron. | |
481 | (let ((commit "31baff1a5187d8ddc89324cbe42dbeffc309c962")) | |
482 | (package | |
483 | (inherit mcron) | |
484 | (name "mcron2") | |
485 | (version (string-append (package-version mcron) "-0." | |
486 | (string-take commit 7))) | |
487 | (source (origin | |
488 | (method git-fetch) | |
489 | (uri (git-reference | |
490 | (url "https://notabug.org/mthl/mcron/") | |
491 | (commit commit))) | |
492 | (sha256 | |
493 | (base32 | |
494 | "1h5wxy997hxi718hpx419c23q09939kbxrjbbq54lv0cgw1bb63z")) | |
495 | (file-name (string-append name "-" version "-checkout")))) | |
496 | (native-inputs | |
497 | `(("autoconf" ,autoconf) | |
498 | ("automake" ,automake) | |
499 | ("pkg-config" ,pkg-config) | |
500 | ("texinfo" ,texinfo) | |
501 | ("help2man" ,help2man))) | |
502 | (arguments | |
503 | `(#:modules ((ice-9 match) (ice-9 ftw) | |
504 | ,@%gnu-build-system-modules) | |
505 | ||
506 | #:phases (modify-phases %standard-phases | |
507 | (add-after 'unpack 'bootstrap | |
508 | (lambda _ | |
509 | (zero? (system* "autoreconf" "-vfi")))) | |
510 | (add-after 'install 'wrap-mcron | |
511 | (lambda* (#:key outputs #:allow-other-keys) | |
512 | ;; Wrap the 'mcron' command to refer to the right | |
513 | ;; modules. | |
514 | (let* ((out (assoc-ref outputs "out")) | |
515 | (bin (string-append out "/bin")) | |
516 | (site (string-append | |
517 | out "/share/guile/site"))) | |
518 | (match (scandir site) | |
519 | (("." ".." version) | |
520 | (let ((modules (string-append site "/" version))) | |
521 | (wrap-program (string-append bin "/mcron") | |
522 | `("GUILE_LOAD_PATH" ":" prefix | |
523 | (,modules)) | |
524 | `("GUILE_LOAD_COMPILED_PATH" ":" prefix | |
525 | (,modules))) | |
526 | #t)))))))))))) | |
527 | ||
814b18e5 AS |
528 | (define-public guile-ics |
529 | (package | |
530 | (name "guile-ics") | |
531 | (version "0.1.1") | |
532 | (source (origin | |
533 | (method git-fetch) | |
534 | (uri (git-reference | |
535 | (url "https://github.com/artyom-poptsov/guile-ics") | |
536 | (commit "v0.1.1"))) | |
537 | (file-name (string-append name "-" version "-checkout")) | |
538 | (sha256 | |
539 | (base32 | |
540 | "1pvg6j48inpbq47hq00yh5hhl2qd2srvrx5yjl7w7ky1jsjadp86")))) | |
541 | (build-system gnu-build-system) | |
542 | (arguments | |
543 | '(#:phases (modify-phases %standard-phases | |
544 | (add-before 'configure 'autoreconf | |
545 | (lambda _ | |
546 | ;; Repository comes with a broken symlink | |
547 | (delete-file "README") | |
548 | (symlink "README.org" "README") | |
549 | (zero? (system* "autoreconf" "-fi"))))))) | |
550 | (native-inputs | |
551 | `(("autoconf" ,(autoconf-wrapper)) | |
552 | ("automake" ,automake) | |
553 | ("texinfo" ,texinfo) | |
554 | ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'. | |
555 | ("gettext" ,gettext-minimal) | |
556 | ("pkg-config" ,pkg-config))) | |
557 | (inputs `(("guile" ,guile-2.0) ("which" ,which))) | |
558 | (propagated-inputs `(("guile-lib" ,guile-lib))) | |
559 | (home-page "https://github.com/artyom-poptsov/guile-ics") | |
560 | (synopsis "Guile parser library for the iCalendar format") | |
561 | (description | |
562 | "Guile-ICS is an iCalendar (RFC5545) format parser library written in | |
563 | pure Scheme. The library can be used to read and write iCalendar data. | |
564 | ||
565 | The library is shipped with documentation in Info format and usage examples.") | |
566 | (license gpl3+))) | |
567 | ||
3e9066fc LC |
568 | (define-public guile-lib |
569 | (package | |
570 | (name "guile-lib") | |
bf62b8ff | 571 | (version "0.2.3") |
3e9066fc LC |
572 | (source (origin |
573 | (method url-fetch) | |
574 | (uri (string-append "mirror://savannah/guile-lib/guile-lib-" | |
575 | version ".tar.gz")) | |
576 | (sha256 | |
577 | (base32 | |
bf62b8ff | 578 | "0pwdd52vakni1fabaiav8v0ad7xp3bx8x3brijbr1mpgamm9dxqc")))) |
3e9066fc LC |
579 | (build-system gnu-build-system) |
580 | (arguments | |
9d356c9c LC |
581 | '(#:phases (modify-phases %standard-phases |
582 | (add-before 'configure 'patch-module-dir | |
583 | (lambda _ | |
584 | (substitute* "src/Makefile.in" | |
bf62b8ff LC |
585 | (("^moddir = ([[:graph:]]+)") |
586 | "moddir = $(datadir)/guile/site/@GUILE_EFFECTIVE_VERSION@\n") | |
587 | (("^godir = ([[:graph:]]+)") | |
588 | "godir = \ | |
589 | $(libdir)/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n")) | |
590 | #t)) | |
591 | (replace 'check | |
592 | (lambda _ | |
593 | ;; Work around a harmless test failure involving | |
594 | ;; two-spaces-after-period rendering. | |
595 | (zero? (system* "make" "check" ;"-C" "unit-tests" | |
596 | "XFAIL_TESTS=texinfo.serialize.scm"))))))) | |
597 | (native-inputs `(("pkg-config" ,pkg-config))) | |
3e9066fc LC |
598 | (inputs `(("guile" ,guile-2.0))) |
599 | (home-page "http://www.nongnu.org/guile-lib/") | |
600 | (synopsis "Collection of useful Guile Scheme modules") | |
601 | (description | |
35b9e423 | 602 | "Guile-Lib is intended as an accumulation place for pure-scheme Guile |
3e9066fc LC |
603 | modules, allowing for people to cooperate integrating their generic Guile |
604 | modules into a coherent library. Think \"a down-scaled, limited-scope CPAN | |
605 | for Guile\".") | |
606 | ||
607 | ;; The whole is under GPLv3+, but some modules are under laxer | |
608 | ;; distribution terms such as LGPL and public domain. See `COPYING' for | |
609 | ;; details. | |
610 | (license gpl3+))) | |
611 | ||
6050a1fb CR |
612 | (define-public guile-json |
613 | (package | |
614 | (name "guile-json") | |
1644f0cd | 615 | (version "0.5.0") |
6050a1fb | 616 | (source (origin |
ffc72ec6 LC |
617 | (method url-fetch) |
618 | (uri (string-append "mirror://savannah/guile-json/guile-json-" | |
619 | version ".tar.gz")) | |
620 | (sha256 | |
621 | (base32 | |
622 | "0l8a34l92nrdszy7ykycfvr8y0n0yi5qb3ccliycvpvf9mzk5n8d")) | |
623 | (modules '((guix build utils))) | |
624 | (snippet | |
625 | ;; Make sure everything goes under .../site/X.Y, like Guile's | |
626 | ;; search paths expects. | |
627 | '(begin | |
628 | (substitute* "configure" | |
629 | (("ac_subst_vars='") | |
630 | "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n")) | |
631 | (substitute* '("Makefile.in" "json/Makefile.in") | |
632 | (("moddir =.*/share/guile/site" all) | |
633 | (string-append all "/@GUILE_EFFECTIVE_VERSION@"))))))) | |
6050a1fb | 634 | (build-system gnu-build-system) |
db5584dd | 635 | (native-inputs `(("guile" ,guile-2.0))) |
6050a1fb CR |
636 | (home-page "http://savannah.nongnu.org/projects/guile-json/") |
637 | (synopsis "JSON module for Guile") | |
638 | (description | |
639 | "Guile-json supports parsing and building JSON documents according to the | |
35b9e423 | 640 | http:://json.org specification. These are the main features: |
6050a1fb CR |
641 | - Strictly complies to http://json.org specification. |
642 | - Build JSON documents programmatically via macros. | |
643 | - Unicode support for strings. | |
644 | - Allows JSON pretty printing.") | |
645 | (license lgpl3+))) | |
646 | ||
947a5d47 LC |
647 | (define-public guile2.2-json |
648 | (package-for-guile-2.2 guile-json)) | |
649 | ||
6bc24063 CAW |
650 | (define-public guile-minikanren |
651 | (package | |
652 | (name "guile-minikanren") | |
653 | (version "20150424.e844d85") | |
654 | (source (origin | |
655 | (method git-fetch) | |
656 | (uri (git-reference | |
657 | (url "https://github.com/ijp/minikanren.git") | |
658 | (commit "e844d85512f8c055d3f96143ee506007389a25e3"))) | |
821f4dc2 | 659 | (file-name (string-append name "-" version "-checkout")) |
6bc24063 CAW |
660 | (sha256 |
661 | (base32 | |
662 | "0r50jlpzi940jlmxyy3ddqqwmj5r12gb4bcv0ssini9v8km13xz6")))) | |
663 | (build-system trivial-build-system) | |
664 | (arguments | |
4b74a29d | 665 | `(#:modules ((guix build utils)) |
6bc24063 CAW |
666 | #:builder |
667 | (begin | |
668 | (use-modules (guix build utils) | |
4b74a29d LC |
669 | (ice-9 match) |
670 | (ice-9 popen) | |
671 | (ice-9 rdelim)) | |
672 | ||
6bc24063 | 673 | (let* ((out (assoc-ref %outputs "out")) |
4b74a29d LC |
674 | (guile (assoc-ref %build-inputs "guile")) |
675 | (effective (read-line | |
676 | (open-pipe* OPEN_READ | |
677 | (string-append guile "/bin/guile") | |
678 | "-c" "(display (effective-version))"))) | |
679 | (module-dir (string-append out "/share/guile/site/" | |
680 | effective)) | |
6bc24063 | 681 | (source (assoc-ref %build-inputs "source")) |
f3d8cd79 | 682 | (doc (string-append out "/share/doc/guile-minikanren")) |
6bc24063 CAW |
683 | (scm-files '("minikanren.scm" |
684 | "minikanren/mkextraforms.scm" | |
685 | "minikanren/mkprelude.scm" | |
686 | "minikanren/mk.scm")) | |
687 | (guild (string-append (assoc-ref %build-inputs "guile") | |
688 | "/bin/guild"))) | |
689 | ;; Make installation directories. | |
690 | (mkdir-p (string-append module-dir "/minikanren")) | |
691 | (mkdir-p doc) | |
692 | ||
693 | ;; Compile .scm files and install. | |
694 | (chdir source) | |
695 | (setenv "GUILE_AUTO_COMPILE" "0") | |
696 | (for-each (lambda (file) | |
697 | (let* ((dest-file (string-append module-dir "/" | |
76e6e663 | 698 | file)) |
6bc24063 CAW |
699 | (go-file (match (string-split file #\.) |
700 | ((base _) | |
701 | (string-append module-dir "/" | |
702 | base ".go"))))) | |
703 | ;; Install source module. | |
704 | (copy-file file dest-file) | |
705 | ;; Install compiled module. | |
706 | (unless (zero? (system* guild "compile" | |
707 | "-L" source | |
708 | "-o" go-file | |
709 | file)) | |
710 | (error (format #f "Failed to compile ~s to ~s!" | |
711 | file go-file))))) | |
712 | scm-files) | |
713 | ||
714 | ;; Also copy over the README. | |
96c46210 | 715 | (install-file "README.org" doc) |
6bc24063 CAW |
716 | #t)))) |
717 | (inputs | |
718 | `(("guile" ,guile-2.0))) | |
719 | (home-page "https://github.com/ijp/minikanren") | |
e881752c | 720 | (synopsis "MiniKanren declarative logic system, packaged for Guile") |
6bc24063 CAW |
721 | (description |
722 | "MiniKanren is a relational programming extension to the Scheme | |
723 | programming Language, written as a smaller version of Kanren suitable for | |
724 | pedagogical purposes. It is featured in the book, The Reasoned Schemer, | |
725 | written by Dan Friedman, William Byrd, and Oleg Kiselyov. | |
726 | ||
e881752c | 727 | This is Ian Price's r6rs packaged version of miniKanren, which deviates |
6bc24063 CAW |
728 | slightly from miniKanren mainline. |
729 | ||
730 | See http://minikanren.org/ for more on miniKanren generally.") | |
731 | (license expat))) | |
732 | ||
947a5d47 LC |
733 | (define-public guile2.2-minikanren |
734 | (package-for-guile-2.2 guile-minikanren)) | |
735 | ||
32e14fc1 CAW |
736 | (define-public guile-irregex |
737 | (package | |
738 | (name "guile-irregex") | |
fb73f07a | 739 | (version "0.9.6") |
32e14fc1 CAW |
740 | (source (origin |
741 | (method url-fetch) | |
742 | (uri (string-append | |
743 | "http://synthcode.com/scheme/irregex/irregex-" | |
d03f9446 | 744 | version ".tar.gz")) |
32e14fc1 CAW |
745 | (sha256 |
746 | (base32 | |
fb73f07a | 747 | "1ia3m7dp3lcxa048q0gqbiwwsyvn99baw6xkhb4bhhzn4k7bwyqq")))) |
32e14fc1 CAW |
748 | (build-system gnu-build-system) |
749 | (arguments | |
750 | `(#:modules ((guix build utils) | |
751 | (ice-9 match) | |
fe447664 LC |
752 | (ice-9 rdelim) |
753 | (ice-9 popen) | |
32e14fc1 CAW |
754 | (guix build gnu-build-system)) |
755 | #:phases | |
756 | (modify-phases %standard-phases | |
32e14fc1 CAW |
757 | (delete 'configure) |
758 | (delete 'build) | |
759 | (delete 'check) | |
760 | (replace 'install | |
761 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
fe447664 LC |
762 | (let* ((out (assoc-ref outputs "out")) |
763 | (effective (read-line | |
764 | (open-pipe* OPEN_READ | |
765 | "guile" "-c" | |
766 | "(display (effective-version))"))) | |
767 | (module-dir (string-append out "/share/guile/site/" | |
768 | effective)) | |
769 | (source (assoc-ref inputs "source")) | |
770 | (doc (string-append out "/share/doc/guile-irregex/")) | |
771 | (guild (string-append (assoc-ref %build-inputs "guile") | |
772 | "/bin/guild"))) | |
773 | ;; Make installation directories. | |
774 | (mkdir-p (string-append module-dir "/rx/source")) | |
775 | (mkdir-p doc) | |
776 | ||
777 | ;; Compile .scm files and install. | |
778 | (setenv "GUILE_AUTO_COMPILE" "0") | |
779 | ||
780 | (for-each (lambda (copy-info) | |
781 | (match copy-info | |
782 | ((src-file dest-file-basis) | |
783 | (let* ((dest-file (string-append | |
32e14fc1 | 784 | module-dir dest-file-basis |
fe447664 LC |
785 | ".scm")) |
786 | (go-file (string-append | |
787 | module-dir dest-file-basis | |
788 | ".go"))) | |
789 | ;; Install source module. | |
790 | (copy-file src-file | |
791 | dest-file) | |
792 | ;; Install compiled module. | |
793 | (unless (zero? (system* guild "compile" | |
794 | "-L" (getcwd) | |
795 | "-o" go-file | |
796 | src-file)) | |
797 | (error (format #f "Failed to compile ~s to ~s!" | |
798 | src-file dest-file))))))) | |
799 | '(("irregex-guile.scm" "/rx/irregex") | |
800 | ("irregex.scm" "/rx/source/irregex") | |
801 | ;; Not really reachable via guile's packaging system, | |
802 | ;; but nice to have around | |
803 | ("irregex-utils.scm" "/rx/source/irregex-utils"))) | |
804 | ||
805 | ;; Also copy over the README. | |
806 | (install-file "irregex.html" doc) | |
807 | #t)))))) | |
32e14fc1 CAW |
808 | (inputs |
809 | `(("guile" ,guile-2.0))) | |
810 | (home-page "http://synthcode.com/scheme/irregex") | |
811 | (synopsis "S-expression based regular expressions") | |
812 | (description | |
813 | "Irregex is an s-expression based alternative to your classic | |
814 | string-based regular expressions. It implements SRFI 115 and is deeply | |
815 | inspired by the SCSH regular expression system.") | |
816 | (license bsd-3))) | |
93e7199b | 817 | |
947a5d47 LC |
818 | (define-public guile2.2-irregex |
819 | (package-for-guile-2.2 guile-irregex)) | |
820 | ||
93e7199b CAW |
821 | ;; There are two guile-gdbm packages, one using the FFI and one with |
822 | ;; direct C bindings, hence the verbose name. | |
823 | ||
824 | (define-public guile-gdbm-ffi | |
825 | (package | |
826 | (name "guile-gdbm-ffi") | |
827 | (version "20120209.fa1d5b6") | |
828 | (source (origin | |
829 | (method git-fetch) | |
830 | (uri (git-reference | |
831 | (url "https://github.com/ijp/guile-gdbm.git") | |
832 | (commit "fa1d5b6231d0e4d096687b378c025f2148c5f246"))) | |
821f4dc2 | 833 | (file-name (string-append name "-" version "-checkout")) |
93e7199b CAW |
834 | (sha256 |
835 | (base32 | |
836 | "1j8wrsw7v9w6qkl47xz0rdikg50v16nn6kbs3lgzcymjzpa7babj")))) | |
837 | (build-system trivial-build-system) | |
838 | (arguments | |
839 | `(#:modules | |
840 | ((guix build utils)) | |
841 | #:builder | |
842 | (begin | |
843 | (use-modules (guix build utils) | |
844 | (system base compile)) | |
845 | ||
846 | (let* ((out (assoc-ref %outputs "out")) | |
847 | (module-dir (string-append out "/share/guile/site/2.0")) | |
848 | (source (assoc-ref %build-inputs "source")) | |
849 | (doc (string-append out "/share/doc")) | |
850 | (guild (string-append (assoc-ref %build-inputs "guile") | |
851 | "/bin/guild")) | |
852 | (gdbm.scm-dest | |
853 | (string-append module-dir "/gdbm.scm")) | |
854 | (gdbm.go-dest | |
855 | (string-append module-dir "/gdbm.go"))) | |
856 | ;; Make installation directories. | |
857 | (mkdir-p module-dir) | |
858 | (mkdir-p doc) | |
859 | ||
860 | ;; Switch directory for compiling and installing | |
861 | (chdir source) | |
862 | ||
863 | ;; copy the source | |
864 | (copy-file "gdbm.scm" gdbm.scm-dest) | |
865 | ||
866 | ;; Patch the FFI | |
867 | (substitute* gdbm.scm-dest | |
868 | (("\\(dynamic-link \"libgdbm\"\\)") | |
869 | (format #f "(dynamic-link \"~a/lib/libgdbm.so\")" | |
870 | (assoc-ref %build-inputs "gdbm")))) | |
871 | ||
872 | ;; compile to the destination | |
873 | (compile-file gdbm.scm-dest | |
874 | #:output-file gdbm.go-dest))))) | |
875 | (inputs | |
876 | `(("guile" ,guile-2.0))) | |
877 | (propagated-inputs | |
878 | `(("gdbm" ,gdbm))) | |
879 | (home-page "https://github.com/ijp/guile-gdbm") | |
880 | (synopsis "Guile bindings to the GDBM library via Guile's FFI") | |
881 | (description | |
882 | "Guile bindings to the GDBM key-value storage system, using | |
883 | Guile's foreign function interface.") | |
884 | (license gpl3+))) | |
885 | ||
e8ac1f8f LC |
886 | (define-public guile-sqlite3 |
887 | (let ((commit "607721fe1174a299e45d457acacf94eefb964071")) | |
888 | (package | |
889 | (name "guile-sqlite3") | |
890 | (version (string-append "0.0-0." (string-take commit 7))) | |
891 | ||
892 | ;; XXX: Gitorious being dead, this is not a reliable home page. | |
893 | (home-page "https://www.gitorious.org/guile-sqlite3/guile-sqlite3.git/") | |
894 | (source (origin | |
895 | (method git-fetch) | |
896 | (uri (git-reference | |
897 | (url home-page) | |
898 | (commit commit))) | |
899 | (sha256 | |
900 | (base32 | |
901 | "09gaffhh5rawz5kdmqx2ahvj1ngvxddp469r18bmjz3sz8p0slj2")) | |
902 | (file-name (string-append name "-" version "-checkout")) | |
903 | (modules '((guix build utils))) | |
904 | (snippet | |
905 | ;; Upgrade 'Makefile.am' to the current way of doing things. | |
906 | '(substitute* "Makefile.am" | |
907 | (("TESTS_ENVIRONMENT") | |
908 | "TEST_LOG_COMPILER"))))) | |
909 | ||
910 | (build-system gnu-build-system) | |
911 | (native-inputs | |
912 | `(("autoconf" ,autoconf) | |
913 | ("automake" ,automake) | |
914 | ("pkg-config" ,pkg-config))) | |
915 | (inputs | |
916 | `(("guile" ,guile-2.0) | |
917 | ("sqlite" ,sqlite))) | |
918 | (arguments | |
919 | '(#:phases (modify-phases %standard-phases | |
920 | (add-before 'configure 'autoreconf | |
921 | (lambda _ | |
922 | (zero? (system* "autoreconf" "-vfi")))) | |
923 | (add-before 'build 'set-sqlite3-file-name | |
924 | (lambda* (#:key inputs #:allow-other-keys) | |
925 | (substitute* "sqlite3.scm" | |
926 | (("\"libsqlite3\"") | |
927 | (string-append "\"" (assoc-ref inputs "sqlite") | |
928 | "/lib/libsqlite3\""))) | |
929 | #t))))) | |
930 | (synopsis "Access SQLite databases from Guile") | |
931 | (description | |
932 | "This package provides Guile bindings to the SQLite database system.") | |
933 | (license gpl3+)))) | |
934 | ||
27f5e13e DT |
935 | (define-public haunt |
936 | (package | |
937 | (name "haunt") | |
4960beaa | 938 | (version "0.2") |
27f5e13e DT |
939 | (source (origin |
940 | (method url-fetch) | |
4960beaa | 941 | (uri (string-append "https://files.dthompson.us/haunt/haunt-" |
27f5e13e DT |
942 | version ".tar.gz")) |
943 | (sha256 | |
944 | (base32 | |
4960beaa | 945 | "1id83n8fs7jxys1d8jy70vylg8gzcvlw1y7hb41y3qxv5zi4671m")))) |
27f5e13e | 946 | (build-system gnu-build-system) |
4ecbf6d2 LC |
947 | (arguments |
948 | `(#:modules ((ice-9 match) (ice-9 ftw) | |
949 | ,@%gnu-build-system-modules) | |
950 | ||
951 | #:phases (modify-phases %standard-phases | |
952 | (add-after 'install 'wrap-haunt | |
953 | (lambda* (#:key outputs #:allow-other-keys) | |
954 | ;; Wrap the 'haunt' command to refer to the right | |
955 | ;; modules. | |
956 | (let* ((out (assoc-ref outputs "out")) | |
957 | (bin (string-append out "/bin")) | |
958 | (site (string-append | |
959 | out "/share/guile/site"))) | |
960 | (match (scandir site) | |
961 | (("." ".." version) | |
962 | (let ((modules (string-append site "/" version))) | |
963 | (wrap-program (string-append bin "/haunt") | |
964 | `("GUILE_LOAD_PATH" ":" prefix | |
965 | (,modules)) | |
966 | `("GUILE_LOAD_COMPILED_PATH" ":" prefix | |
967 | (,modules))) | |
968 | #t))))))))) | |
4960beaa DT |
969 | (native-inputs |
970 | `(("pkg-config" ,pkg-config) | |
971 | ("texinfo" ,texinfo))) | |
27f5e13e DT |
972 | (inputs |
973 | `(("guile" ,guile-2.0))) | |
4960beaa DT |
974 | (propagated-inputs |
975 | `(("guile-reader" ,guile-reader))) | |
27f5e13e DT |
976 | (synopsis "Functional static site generator") |
977 | (description "Haunt is a static site generator written in Guile | |
978 | Scheme. Haunt features a functional build system and an extensible | |
979 | interface for reading articles in any format.") | |
980 | (home-page "http://haunt.dthompson.us") | |
981 | (license gpl3+))) | |
982 | ||
44a2bdf8 AS |
983 | (define-public guile-config |
984 | (package | |
985 | (name "guile-config") | |
3c98acb7 | 986 | (version "0.1.1") |
44a2bdf8 AS |
987 | (source (origin |
988 | (method url-fetch) | |
989 | (uri (string-append | |
990 | "http://alex.pompo.co/software/" name "-" version | |
991 | ".tar.gz")) | |
992 | (sha256 | |
993 | (base32 | |
3c98acb7 | 994 | "1b719bn192f9wg24rr0zx8jpmygsvyhfi35iy778pb5p392snrn8")))) |
44a2bdf8 AS |
995 | (build-system gnu-build-system) |
996 | (inputs | |
997 | `(("guile" ,guile-2.0))) | |
998 | (synopsis "Guile application configuration parsing library") | |
999 | (description | |
1000 | "Guile Config is a library providing a declarative approach to | |
1001 | application configuration specification. The library provides clean | |
1002 | configuration declaration forms, and processors that take care of: | |
1003 | configuration file creation; configuration file parsing; command-line | |
1004 | parameter parsing using getopt-long; basic GNU command-line parameter | |
1005 | generation (--help, --usage, --version); automatic output generation for the | |
1006 | above command-line parameters.") | |
1007 | (home-page "https://github.com/a-sassmannshausen/guile-config") | |
1008 | (license agpl3+))) | |
1009 | ||
36548111 DT |
1010 | (define-public guile-redis |
1011 | (package | |
1012 | (name "guile-redis") | |
1013 | (version "0.1.0") | |
1014 | (source (origin | |
1015 | (method url-fetch) | |
1016 | (uri (string-append "mirror://savannah/guile-redis/guile-redis-" | |
1017 | version ".tar.gz")) | |
1018 | (sha256 | |
1019 | (base32 | |
1020 | "0vx6if6b4r3kwx64vzbs6vpc0cpcr85x11w9vkzq27gw8n7isv56")) | |
1021 | (modules '((guix build utils))) | |
1022 | (snippet | |
ea833d30 | 1023 | ;; Make sure everything goes under .../site/X.Y, like Guile's |
36548111 | 1024 | ;; search paths expects. |
ea833d30 RW |
1025 | '(begin |
1026 | (substitute* "configure" | |
1027 | (("ac_subst_vars='") | |
1028 | "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n")) | |
1029 | (substitute* '("Makefile.in" | |
1030 | "redis/Makefile.in" | |
1031 | "redis/commands/Makefile.in") | |
1032 | (("moddir =.*/share/guile/site" all) | |
1033 | (string-append all "/@GUILE_EFFECTIVE_VERSION@"))))))) | |
36548111 DT |
1034 | (build-system gnu-build-system) |
1035 | (native-inputs | |
1036 | `(("guile" ,guile-2.0))) | |
1037 | (home-page "http://savannah.nongnu.org/projects/guile-redis/") | |
1038 | (synopsis "Redis client library for Guile") | |
1039 | (description "Guile-redis provides a Scheme interface to the Redis | |
1040 | key-value cache and store.") | |
1041 | (license lgpl3+))) | |
1042 | ||
85313be8 RW |
1043 | (define-public guile2.2-redis |
1044 | (package-for-guile-2.2 guile-redis)) | |
1045 | ||
9d373377 CAW |
1046 | (define-public guile-wisp |
1047 | (package | |
1048 | (name "guile-wisp") | |
1049 | (version "0.9.0") | |
1050 | (source (origin | |
1051 | (method url-fetch) | |
1052 | (uri (string-append "https://bitbucket.org/ArneBab/" | |
1053 | "wisp/downloads/wisp-" | |
1054 | version ".tar.gz")) | |
1055 | (sha256 | |
1056 | (base32 | |
1057 | "0y5fxacalkgbv9s71h58vdvm2h2ln3rk024dd0vszwcf953as5fq")))) | |
1058 | (build-system gnu-build-system) | |
1059 | (arguments | |
1060 | `(#:modules ((system base compile) | |
1061 | ,@%gnu-build-system-modules) | |
1062 | #:phases | |
1063 | (modify-phases %standard-phases | |
1064 | (add-before | |
1065 | 'configure 'substitute-before-config | |
1066 | ||
1067 | (lambda* (#:key inputs #:allow-other-keys) | |
1068 | (let ((bash (assoc-ref inputs "bash"))) | |
1069 | ;; configure checks for guile-2.0, but ours is just named "guile" :) | |
1070 | (substitute* "configure" | |
1071 | (("guile-2.0") "guile")) | |
1072 | ;; Puts together some test files with /bin/bash hardcoded | |
1073 | (substitute* "Makefile.in" | |
1074 | (("/bin/bash") | |
1075 | (string-append bash "/bin/bash") )) | |
1076 | #t))) | |
1077 | ||
1078 | ;; auto compilation breaks, but if we set HOME to /tmp, | |
1079 | ;; that works ok | |
1080 | (add-before | |
1081 | 'check 'auto-compile-hacky-workaround | |
1082 | (lambda _ | |
1083 | (setenv "HOME" "/tmp") | |
1084 | #t)) | |
1085 | (replace | |
1086 | 'install | |
1087 | (lambda* (#:key outputs inputs #:allow-other-keys) | |
1088 | (let* ((out (assoc-ref outputs "out")) | |
1089 | (module-dir (string-append out "/share/guile/site/2.0")) | |
1090 | (language-dir | |
1091 | (string-append module-dir "/language/wisp")) | |
1092 | (guild (string-append (assoc-ref inputs "guile") | |
1093 | "/bin/guild"))) | |
1094 | ;; Make installation directories. | |
1095 | (mkdir-p module-dir) | |
1096 | (mkdir-p language-dir) | |
1097 | ||
1098 | ;; copy the source | |
1099 | (copy-file "wisp-scheme.scm" | |
1100 | (string-append module-dir "/wisp-scheme.scm")) | |
1101 | (copy-file "language/wisp/spec.scm" | |
1102 | (string-append language-dir "/spec.scm")) | |
1103 | ||
1104 | ;; compile to the destination | |
1105 | (compile-file "wisp-scheme.scm" | |
1106 | #:output-file (string-append | |
1107 | module-dir "/wisp-scheme.go")) | |
1108 | (compile-file "language/wisp/spec.scm" | |
1109 | #:output-file (string-append | |
1110 | language-dir "/spec.go")) | |
1111 | #t)))))) | |
1112 | (home-page "http://draketo.de/english/wisp") | |
1113 | (inputs | |
1114 | `(("guile" ,guile-2.0) | |
1115 | ("python" ,python))) | |
a124bbd2 SB |
1116 | (synopsis "Whitespace to lisp syntax for Guile") |
1117 | (description "Wisp is a syntax for Guile which provides a Python-like | |
9d373377 CAW |
1118 | whitespace-significant language. It may be easier on the eyes for some |
1119 | users and in some situations.") | |
1120 | (license gpl3+))) | |
1121 | ||
5649c8cd DT |
1122 | (define-public guile-sly |
1123 | (package | |
1124 | (name "guile-sly") | |
1125 | (version "0.1") | |
1126 | (source (origin | |
1127 | (method url-fetch) | |
8d5e7ad2 | 1128 | (uri (string-append "https://files.dthompson.us/sly/sly-" |
5649c8cd DT |
1129 | version ".tar.gz")) |
1130 | (sha256 | |
1131 | (base32 | |
1132 | "1svzlbz2vripmyq2kjh0rig16bsrnbkwbsm558pjln9l65mcl4qq")))) | |
1133 | (build-system gnu-build-system) | |
1134 | (arguments | |
1135 | '(#:configure-flags | |
1136 | (list (string-append "--with-libfreeimage-prefix=" | |
1137 | (assoc-ref %build-inputs "freeimage")) | |
1138 | (string-append "--with-libgslcblas-prefix=" | |
1139 | (assoc-ref %build-inputs "gsl"))))) | |
1140 | (native-inputs | |
1141 | `(("pkg-config" ,pkg-config))) | |
1142 | (propagated-inputs | |
1143 | `(("guile" ,guile-2.0) | |
1144 | ("guile-sdl" ,guile-sdl) | |
1145 | ("guile-opengl" ,guile-opengl))) | |
1146 | (inputs | |
1147 | `(("gsl" ,gsl) | |
1148 | ("freeimage" ,freeimage) | |
1149 | ("mesa" ,mesa))) | |
1150 | (synopsis "2D/3D game engine for GNU Guile") | |
1151 | (description "Sly is a 2D/3D game engine written in Guile Scheme. Sly | |
1152 | features a functional reactive programming interface and live coding | |
1153 | capabilities.") | |
1154 | (home-page "http://dthompson.us/pages/software/sly.html") | |
1155 | (license gpl3+))) | |
1156 | ||
dec1e2b3 AB |
1157 | (define-public g-wrap |
1158 | (package | |
1159 | (name "g-wrap") | |
1160 | (version "1.9.15") | |
1161 | (source (origin | |
1162 | (method url-fetch) | |
1163 | (uri (string-append "mirror://savannah/g-wrap/g-wrap-" | |
1164 | version ".tar.gz")) | |
1165 | (sha256 | |
1166 | (base32 | |
1167 | "0ak0bha37dfpj9kmyw1r8fj8nva639aw5xr66wr5gd3l1rqf5xhg")))) | |
1168 | (build-system gnu-build-system) | |
1169 | (native-inputs | |
1170 | `(("pkg-config" ,pkg-config))) | |
1171 | (propagated-inputs | |
1172 | `(("guile" ,guile-2.0) | |
1173 | ("guile-lib" ,guile-lib))) | |
1174 | (inputs | |
1175 | `(("libffi" ,libffi))) | |
9e8599a3 PH |
1176 | (arguments |
1177 | `(#:phases | |
1178 | (modify-phases %standard-phases | |
1179 | (add-before 'configure 'pre-configure | |
1180 | (lambda* (#:key outputs #:allow-other-keys) | |
1181 | (let ((out (assoc-ref outputs "out"))) | |
1182 | (substitute* (find-files "." "^Makefile.in$") | |
1183 | (("guilemoduledir =.*guile/site" all) | |
1184 | (string-append all "/2.0"))) | |
1185 | #t)))))) | |
dec1e2b3 AB |
1186 | (synopsis "Generate C bindings for Guile") |
1187 | (description "G-Wrap is a tool and Guile library for generating function | |
1188 | wrappers for inter-language calls. It currently only supports generating Guile | |
1189 | wrappers for C functions. Given a definition of the types and prototypes for | |
1190 | a given C interface, G-Wrap will automatically generate the C code that | |
1191 | provides access to that interface and its types from the Scheme level.") | |
1192 | (home-page "http://www.nongnu.org/g-wrap/index.html") | |
1193 | (license lgpl2.1+))) | |
1194 | ||
01497dfe LC |
1195 | (define-public guile-dbi |
1196 | (package | |
1197 | (name "guile-dbi") | |
1198 | (version "2.1.6") | |
1199 | (source (origin | |
1200 | (method url-fetch) | |
1201 | (uri (string-append | |
1202 | "http://download.gna.org/guile-dbi/guile-dbi-" | |
1203 | version ".tar.gz")) | |
1204 | (sha256 | |
1205 | (base32 | |
1206 | "116njrprhgrsv1qm904sp3b02rq01fx639r433d657gyhw3x159n")))) | |
1207 | (build-system gnu-build-system) | |
1208 | (arguments | |
1209 | '(#:configure-flags | |
1210 | (list (string-append | |
1211 | "--with-guile-site-dir=" %output "/share/guile/site/2.0")) | |
1212 | #:phases | |
1213 | (modify-phases %standard-phases | |
1214 | (add-after 'install 'patch-extension-path | |
1215 | (lambda* (#:key outputs #:allow-other-keys) | |
1216 | (let* ((out (assoc-ref outputs "out")) | |
1217 | (dbi.scm (string-append | |
1218 | out "/share/guile/site/2.0/dbi/dbi.scm")) | |
1219 | (ext (string-append out "/lib/libguile-dbi"))) | |
1220 | (substitute* dbi.scm (("libguile-dbi") ext)) | |
1221 | #t)))))) | |
1222 | (propagated-inputs | |
1223 | `(("guile" ,guile-2.0))) | |
1224 | (synopsis "Guile database abstraction layer") | |
1225 | (home-page "http://home.gna.org/guile-dbi/guile-dbi.html") | |
1226 | (description | |
1227 | "guile-dbi is a library for Guile that provides a convenient interface to | |
1228 | SQL databases. Database programming with guile-dbi is generic in that the same | |
1229 | programming interface is presented regardless of which database system is used. | |
1230 | It currently supports MySQL, Postgres and SQLite3.") | |
1231 | (license gpl2+))) | |
1232 | ||
1233 | (define-public guile-dbd-sqlite3 | |
1234 | (package | |
1235 | (name "guile-dbd-sqlite3") | |
1236 | (version "2.1.6") | |
1237 | (source (origin | |
1238 | (method url-fetch) | |
1239 | (uri (string-append | |
1240 | "http://download.gna.org/guile-dbi/guile-dbd-sqlite3-" | |
1241 | version ".tar.gz")) | |
1242 | (sha256 | |
1243 | (base32 | |
1244 | "0rg71jchxd2y8x496s8zmfmikr5g8zxi8zv2ar3f7a23pph92iw2")))) | |
1245 | (build-system gnu-build-system) | |
1246 | (native-inputs | |
1247 | `(("pkg-config" ,pkg-config))) | |
1248 | (inputs | |
1249 | `(("sqlite" ,sqlite) | |
1250 | ("zlib" ,(@ (gnu packages compression) zlib)))) | |
1251 | (propagated-inputs | |
1252 | `(("guile-dbi" ,guile-dbi))) | |
1253 | (synopsis "Guile DBI driver for SQLite") | |
1254 | (home-page "https://github.com/jkalbhenn/guile-dbd-sqlite3") | |
1255 | (description | |
1256 | "guile-dbi is a library for Guile that provides a convenient interface to | |
1257 | SQL databases. This package implements the interface for SQLite.") | |
1258 | (license gpl2+))) | |
1259 | ||
bd9af610 AK |
1260 | (define-public guile-xosd |
1261 | (package | |
1262 | (name "guile-xosd") | |
4b2b7135 | 1263 | (version "0.2.1") |
bd9af610 AK |
1264 | (source (origin |
1265 | (method url-fetch) | |
1266 | (uri (string-append "https://github.com/alezost/" name | |
1267 | "/releases/download/v" version | |
1268 | "/" name "-" version ".tar.gz")) | |
1269 | (sha256 | |
1270 | (base32 | |
4b2b7135 | 1271 | "1ri5065c16kmgrf2pysn2ymxjqi5302lhpb07wkl1jr75ym8fn8p")))) |
bd9af610 AK |
1272 | (build-system gnu-build-system) |
1273 | (native-inputs | |
1274 | `(("pkg-config" ,pkg-config))) | |
1275 | (inputs | |
1276 | `(("guile" ,guile-2.0) | |
1277 | ("libx11" ,libx11) | |
1278 | ("libxext" ,libxext) | |
1279 | ("libxinerama" ,libxinerama) | |
1280 | ("xosd" ,xosd))) | |
1281 | (home-page "https://github.com/alezost/guile-xosd") | |
1282 | (synopsis "XOSD bindings for Guile") | |
1283 | (description | |
1284 | "Guile-XOSD provides Guile bindings for @code{libxosd}, | |
1285 | @uref{http://sourceforge.net/projects/libxosd/, the X On Screen Display | |
1286 | library}.") | |
1287 | (license gpl3+))) | |
1288 | ||
07f7cc03 AK |
1289 | (define-public guile-daemon |
1290 | (package | |
1291 | (name "guile-daemon") | |
876d8f29 | 1292 | (version "0.1.1") |
07f7cc03 AK |
1293 | (source (origin |
1294 | (method url-fetch) | |
1295 | (uri (string-append "https://github.com/alezost/" name | |
1296 | "/releases/download/v" version | |
1297 | "/" name "-" version ".tar.gz")) | |
1298 | (sha256 | |
1299 | (base32 | |
876d8f29 | 1300 | "0wsq9l6a4sijq4i1r3kcddfaznsak2jc5k59gzkhs5il5d2kn5yi")))) |
07f7cc03 AK |
1301 | (build-system gnu-build-system) |
1302 | (native-inputs | |
1303 | `(("pkg-config" ,pkg-config))) | |
1304 | (inputs | |
1305 | `(("guile" ,guile-2.0))) | |
1306 | (home-page "https://github.com/alezost/guile-daemon") | |
1307 | (synopsis "Evaluate code in a running Guile process") | |
1308 | (description | |
1309 | "Guile-Daemon is a small Guile program that loads your initial | |
1310 | configuration file, and then reads and evaluates Guile expressions that | |
1311 | you send to a FIFO file.") | |
1312 | (license gpl3+))) | |
1313 | ||
e28e74a5 EE |
1314 | (define-public guile-commonmark |
1315 | (package | |
1316 | (name "guile-commonmark") | |
1317 | (version "0.1") | |
1318 | (source (origin | |
1319 | (method url-fetch) | |
1320 | (uri (string-append "https://github.com/OrangeShark/" name | |
1321 | "/releases/download/v" version | |
1322 | "/" name "-" version ".tar.gz")) | |
1323 | (sha256 | |
1324 | (base32 | |
757ce0f9 LC |
1325 | "12cb5fqvvgc87f5xp0ih5az305wnjia89l5jba83d0r2p8bfy0b0")) |
1326 | (modules '((guix build utils))) | |
1327 | (snippet | |
1328 | ;; Use the real effective version of Guile in directory names | |
1329 | ;; instead of a hard-coded "/2.0". | |
1330 | '(begin | |
1331 | (substitute* "configure" | |
1332 | (("ac_subst_vars='") | |
1333 | "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n")) | |
1334 | (substitute* "Makefile.in" | |
1335 | (("/site/2.0") | |
1336 | "/site/@GUILE_EFFECTIVE_VERSION@")))))) | |
e28e74a5 EE |
1337 | (build-system gnu-build-system) |
1338 | (inputs | |
1339 | `(("guile" ,guile-2.0))) | |
1340 | (synopsis "CommonMark parser for Guile") | |
1341 | (description | |
1342 | "guile-commonmark is a library for parsing CommonMark, a fully specified | |
1343 | variant of Markdown. The library is written in Guile Scheme and is designed | |
1344 | to transform a CommonMark document to SXML. guile-commonmark tries to closely | |
1345 | follow the @uref{http://commonmark.org/, CommonMark spec}, the main difference | |
1346 | is no support for parsing block and inline level HTML.") | |
1347 | (home-page "https://github.com/OrangeShark/guile-commonmark") | |
1348 | (license lgpl3+))) | |
1349 | ||
947a5d47 LC |
1350 | (define-public guile2.2-commonmark |
1351 | (package-for-guile-2.2 guile-commonmark)) | |
1352 | ||
3b5783fc AB |
1353 | (define-public guile-bytestructures |
1354 | (package | |
1355 | (name "guile-bytestructures") | |
1356 | (version "20160726.53127f6") | |
1357 | (source (origin | |
1358 | (method git-fetch) | |
1359 | (uri (git-reference | |
1360 | (url "https://github.com/TaylanUB/scheme-bytestructures") | |
1361 | (commit "53127f608caf64b34fa41c389b2743b546fbe9da"))) | |
1362 | (file-name (string-append name "-" version "-checkout")) | |
1363 | (sha256 | |
1364 | (base32 | |
1365 | "0l4nx1vp9fkrgrgwjiycj7nx6wfjfd39rqamv4pmq7issi8mrywq")))) | |
1366 | (build-system trivial-build-system) | |
1367 | (arguments | |
1368 | `(#:modules ((guix build utils)) | |
1369 | #:builder | |
1370 | (begin | |
1371 | (use-modules (guix build utils) | |
1372 | (ice-9 match) | |
1373 | (ice-9 popen) | |
1374 | (ice-9 rdelim)) | |
1375 | (let* ((out (assoc-ref %outputs "out")) | |
1376 | (guile (assoc-ref %build-inputs "guile")) | |
1377 | (effective (read-line | |
1378 | (open-pipe* OPEN_READ | |
1379 | (string-append guile "/bin/guile") | |
1380 | "-c" "(display (effective-version))"))) | |
1381 | (module-dir (string-append out "/share/guile/site/" | |
1382 | effective)) | |
1383 | (source (assoc-ref %build-inputs "source")) | |
1384 | (doc (string-append out "/share/doc/scheme-bytestructures")) | |
1385 | (scm-files (filter (lambda (path) | |
1386 | (not (string-prefix? "bytestructures/r7" path))) | |
1387 | (with-directory-excursion source | |
1388 | (find-files "bytestructures" "\\.scm$")))) | |
1389 | (guild (string-append (assoc-ref %build-inputs "guile") | |
1390 | "/bin/guild"))) | |
1391 | ;; Make installation directories. | |
1392 | (mkdir-p doc) | |
1393 | ||
1394 | ;; Compile .scm files and install. | |
1395 | (chdir source) | |
1396 | (setenv "GUILE_AUTO_COMPILE" "0") | |
1397 | (for-each (lambda (file) | |
1398 | (let* ((dest-file (string-append module-dir "/" | |
1399 | file)) | |
1400 | (go-file (string-append module-dir "/" | |
1401 | (substring file 0 | |
1402 | (string-rindex file #\.)) | |
1403 | ".go"))) | |
1404 | ;; Install source module. | |
1405 | (mkdir-p (dirname dest-file)) | |
1406 | (copy-file file dest-file) | |
1407 | ||
1408 | ;; Install compiled module. | |
1409 | (mkdir-p (dirname go-file)) | |
1410 | (unless (zero? (system* guild "compile" | |
1411 | "-L" source | |
1412 | "-o" go-file | |
1413 | file)) | |
1414 | (error (format #f "Failed to compile ~s to ~s!" | |
1415 | file go-file))))) | |
1416 | scm-files) | |
1417 | ||
1418 | ;; Also copy over the README. | |
1419 | (install-file "README.md" doc) | |
1420 | #t)))) | |
1421 | (inputs | |
1422 | `(("guile" ,guile-2.0))) | |
1423 | (home-page "https://github.com/TaylanUB/scheme-bytestructures") | |
1424 | (synopsis "Structured access to bytevector contents for Guile") | |
1425 | (description | |
1426 | "Guile bytestructures offers a system imitating the type system | |
1427 | of the C programming language, to be used on bytevectors. C's type | |
1428 | system works on raw memory, and Guile works on bytevectors which are | |
1429 | an abstraction over raw memory. It's also more powerful than the C | |
1430 | type system, elevating types to first-class status.") | |
1431 | (license gpl3+))) | |
1432 | ||
472fc855 LC |
1433 | (define-public guile-aspell |
1434 | (package | |
1435 | (name "guile-aspell") | |
1436 | (version "0.3") | |
1437 | (source (origin | |
1438 | (method url-fetch) | |
1439 | (uri (string-append | |
1440 | "http://lonelycactus.com/tarball/guile_aspell-" | |
1441 | version ".tar.gz")) | |
1442 | (sha256 | |
1443 | (base32 | |
1444 | "1wknn57x2qcsbn7zw6sbn1ma6fjsg8cvpnf78ak47s8jw6k6j75n")))) | |
1445 | (build-system gnu-build-system) | |
1446 | (arguments | |
1447 | '(#:configure-flags (list (string-append "--with-guilesitedir=" | |
1448 | (assoc-ref %outputs "out") | |
1449 | "/share/guile/site/2.0")) | |
1450 | #:phases (modify-phases %standard-phases | |
1451 | (add-before 'build 'set-libaspell-file-name | |
1452 | (lambda* (#:key inputs #:allow-other-keys) | |
1453 | (let ((aspell (assoc-ref inputs "aspell"))) | |
1454 | (substitute* "aspell/aspell.scm" | |
1455 | (("\"libaspell\\.so\"") | |
1456 | (string-append "\"" aspell | |
1457 | "/lib/libaspell\""))) | |
1458 | #t)))))) | |
1459 | (native-inputs `(("pkg-config" ,pkg-config))) | |
1460 | (inputs `(("guile" ,guile-2.0) | |
1461 | ("aspell" ,aspell))) | |
1462 | (home-page "https://github.com/spk121/guile-aspell") | |
1463 | (synopsis "Spell-checking from Guile") | |
1464 | (description | |
1465 | "guile-aspell is a Guile Scheme library for comparing a string against a | |
1466 | dictionary and suggesting spelling corrections.") | |
1467 | (license gpl3+))) | |
1468 | ||
a614ce38 LC |
1469 | (define-public guile-bash |
1470 | ;; This project is currently retired. It was initially announced here: | |
1471 | ;; <https://lists.gnu.org/archive/html/guile-user/2015-02/msg00003.html>. | |
1472 | (let ((commit "1eabc563ca5692b3e08d84f1f0e6fd2283284469") | |
1473 | (revision "0")) | |
1474 | (package | |
1475 | (name "guile-bash") | |
1476 | (version (string-append "0.1.6-" revision "." (string-take commit 7))) | |
1477 | (home-page | |
1478 | "https://anonscm.debian.org/cgit/users/kaction-guest/retired/dev.guile-bash.git") | |
1479 | (source (origin | |
1480 | (method git-fetch) | |
1481 | (uri (git-reference | |
1482 | (commit commit) | |
1483 | (url home-page))) | |
1484 | (sha256 | |
1485 | (base32 | |
1486 | "097vny990wp2qpjij6a5a5gwc6fxzg5wk56inhy18iki5v6pif1p")) | |
1487 | (file-name (string-append name "-" version "-checkout")))) | |
1488 | (build-system gnu-build-system) | |
1489 | (arguments | |
1490 | '(#:phases (modify-phases %standard-phases | |
1491 | (add-after 'unpack 'bootstrap | |
1492 | (lambda _ | |
1493 | (zero? (system* "sh" "bootstrap"))))) | |
1494 | ||
1495 | #:configure-flags | |
1496 | ;; Add -I to match 'bash.pc' of Bash 4.4. | |
1497 | (list (string-append "CPPFLAGS=-I" | |
1498 | (assoc-ref %build-inputs "bash:include") | |
1499 | "/include/bash/include") | |
1500 | ||
1501 | ;; The '.a' file is useless. | |
1502 | "--disable-static" | |
1503 | ||
1504 | ;; Install 'lib/bash' as Bash 4.4 expects. | |
1505 | (string-append "--libdir=" (assoc-ref %outputs "out") | |
1506 | "/lib/bash")))) | |
1507 | (native-inputs `(("pkg-config" ,pkg-config) | |
1508 | ("autoconf" ,(autoconf-wrapper)) | |
1509 | ("automake" ,automake) | |
1510 | ("libtool" ,libtool) | |
1511 | ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'. | |
1512 | ("gettext" ,gettext-minimal))) | |
1513 | (inputs `(("guile" ,guile-2.0) | |
1514 | ("bash:include" ,bash "include"))) | |
1515 | (synopsis "Extend Bash using Guile") | |
1516 | (description | |
1517 | "Guile-Bash provides a shared library and set of Guile modules, | |
1518 | allowing you to extend Bash in Scheme. Scheme interfaces allow you to access | |
1519 | the following aspects of Bash: | |
1520 | ||
1521 | @itemize | |
1522 | @item aliases; | |
1523 | @item setting and getting Bash variables; | |
1524 | @item creating dynamic variables; | |
1525 | @item creating Bash functions with a Scheme implementation; | |
1526 | @item reader macro for output capturing; | |
1527 | @item reader macro for evaluating raw Bash commands. | |
1528 | @end itemize | |
1529 | ||
1530 | To enable it, run: | |
1531 | ||
1532 | @example | |
1533 | enable -f ~/.guix-profile/lib/bash/libguile-bash.so scm | |
1534 | @end example | |
1535 | ||
1536 | and then run @command{scm example.scm}.") | |
1537 | (license gpl3+)))) | |
1538 | ||
1722d680 | 1539 | ;;; guile.scm ends here |