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