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