Commit | Line | Data |
---|---|---|
233e7676 | 1 | ;;; GNU Guix --- Functional package management for GNU |
93e6a119 | 2 | ;;; Copyright © 2012-2022 Ludovic Courtès <ludo@gnu.org> |
0791437f RW |
3 | ;;; Copyright © 2014 Cyril Roelandt <tipecaml@gmail.com> |
4 | ;;; Copyright © 2014, 2016, 2018 David Thompson <davet@gnu.org> | |
5 | ;;; Copyright © 2014, 2017, 2018 Mark H Weaver <mhw@netris.org> | |
94551439 | 6 | ;;; Copyright © 2015, 2017 Christine Lemmer-Webber <cwebber@dustycloud.org> |
c5793e7e | 7 | ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org> |
0791437f | 8 | ;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name> |
a71d3358 | 9 | ;;; Copyright © 2016, 2019, 2020 Ricardo Wurmus <rekado@elephly.net> |
aaf1bdc3 | 10 | ;;; Copyright © 2017 Andy Wingo <wingo@igalia.com> |
0791437f | 11 | ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com> |
e53bf62e | 12 | ;;; Copyright © 2017, 2019 Mathieu Othacehe <m.othacehe@gmail.com> |
b6bfe9ea | 13 | ;;; Copyright © 2017, 2022 Tobias Geerinckx-Rice <me@tobias.gr> |
0791437f RW |
14 | ;;; Copyright © 2017, 2018 Amirouche <amirouche@hypermove.net> |
15 | ;;; Copyright © 2018 Danny Milosavljevic <dannym@scratchpost.org> | |
c8e3651a | 16 | ;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org> |
0791437f | 17 | ;;; Copyright © 2019 Taylan Kammer <taylan.kammer@gmail.com> |
c835c508 | 18 | ;;; Copyright © 2020, 2021, 2022 Efraim Flashner <efraim@flashner.co.il> |
fccc0275 | 19 | ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be> |
eaa7ead4 | 20 | ;;; Copyright © 2021 Timothy Sample <samplet@ngyro.com> |
1722d680 | 21 | ;;; |
233e7676 | 22 | ;;; This file is part of GNU Guix. |
1722d680 | 23 | ;;; |
233e7676 | 24 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
1722d680 LC |
25 | ;;; under the terms of the GNU General Public License as published by |
26 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
27 | ;;; your option) any later version. | |
28 | ;;; | |
233e7676 | 29 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
1722d680 LC |
30 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
31 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
32 | ;;; GNU General Public License for more details. | |
33 | ;;; | |
34 | ;;; You should have received a copy of the GNU General Public License | |
233e7676 | 35 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
1722d680 | 36 | |
1ffa7090 | 37 | (define-module (gnu packages guile) |
71e0f217 | 38 | #:use-module ((guix licenses) #:prefix license:) |
59a43334 | 39 | #:use-module (gnu packages) |
146c6b62 RW |
40 | #:use-module (gnu packages autotools) |
41 | #:use-module (gnu packages base) | |
9c782445 | 42 | #:use-module (gnu packages bash) |
1ffa7090 | 43 | #:use-module (gnu packages bdw-gc) |
148585c2 | 44 | #:use-module (gnu packages compression) |
255d1bbe | 45 | #:use-module (gnu packages dbm) |
146c6b62 | 46 | #:use-module (gnu packages flex) |
1ffa7090 | 47 | #:use-module (gnu packages gawk) |
146c6b62 | 48 | #:use-module (gnu packages gettext) |
973c6f18 | 49 | #:use-module (gnu packages gperf) |
ee8ee748 | 50 | #:use-module (gnu packages hurd) |
1ffa7090 | 51 | #:use-module (gnu packages libffi) |
1ffa7090 | 52 | #:use-module (gnu packages libunistring) |
7119cca8 | 53 | #:use-module (gnu packages linux) |
1ffa7090 LC |
54 | #:use-module (gnu packages m4) |
55 | #:use-module (gnu packages multiprecision) | |
56 | #:use-module (gnu packages pkg-config) | |
57 | #:use-module (gnu packages readline) | |
cd0322a3 | 58 | #:use-module (gnu packages sqlite) |
f906d30c | 59 | #:use-module (gnu packages texinfo) |
bd233722 | 60 | #:use-module (gnu packages version-control) |
1722d680 | 61 | #:use-module (guix packages) |
87f5d366 | 62 | #:use-module (guix download) |
6bc24063 | 63 | #:use-module (guix git-download) |
32795fcf | 64 | #:use-module (guix build-system gnu) |
977d8666 | 65 | #:use-module (guix build-system guile) |
84af1e74 | 66 | #:use-module (guix deprecation) |
b00fbabd | 67 | #:use-module (guix utils)) |
1722d680 LC |
68 | |
69 | ;;; Commentary: | |
70 | ;;; | |
c44899a2 | 71 | ;;; GNU Guile, and modules and extensions. |
1722d680 LC |
72 | ;;; |
73 | ;;; Code: | |
74 | ||
c44899a2 LC |
75 | (define-public guile-1.8 |
76 | (package | |
77 | (name "guile") | |
78 | (version "1.8.8") | |
79 | (source (origin | |
87f5d366 | 80 | (method url-fetch) |
0db342a5 | 81 | (uri (string-append "mirror://gnu/guile/guile-" version |
c44899a2 LC |
82 | ".tar.gz")) |
83 | (sha256 | |
84 | (base32 | |
01eafd38 | 85 | "0l200a0v7h8bh0cwz6v7hc13ds39cgqsmfrks55b1rbj5vniyiy3")) |
fc1adab1 | 86 | (patches (search-patches "guile-1.8-cpp-4.5.patch")))) |
c44899a2 | 87 | (build-system gnu-build-system) |
b792bc89 LC |
88 | (arguments '(#:configure-flags '("--disable-error-on-warning" |
89 | ||
90 | ;; Build with '-O1' to work around GC | |
91 | ;; crash on x86_64: | |
92 | ;; <https://issues.guix.gnu.org/50427>. | |
93 | "CFLAGS=-O1 -g -Wall") | |
c44899a2 LC |
94 | |
95 | ;; Insert a phase before `configure' to patch things up. | |
dc1d3cde KK |
96 | #:phases |
97 | (modify-phases %standard-phases | |
98 | (add-before 'configure 'patch-stuff | |
99 | (lambda* (#:key outputs #:allow-other-keys) | |
100 | ;; Add a call to `lt_dladdsearchdir' so that | |
101 | ;; `libguile-readline.so' & co. are in the | |
102 | ;; loader's search path. | |
103 | (substitute* "libguile/dynl.c" | |
104 | (("lt_dlinit.*$" match) | |
105 | (format #f | |
106 | " ~a~% lt_dladdsearchdir(\"~a/lib\");~%" | |
107 | match | |
108 | (assoc-ref outputs "out")))) | |
2f4fbe1c | 109 | |
dc1d3cde KK |
110 | ;; The usual /bin/sh... |
111 | (substitute* "ice-9/popen.scm" | |
78dab5a6 LC |
112 | (("/bin/sh") (which "sh")))))) |
113 | ||
114 | ;; XXX: Several numerical tests and tests related to | |
115 | ;; 'inet-pton' fail on glibc 2.33/GCC 10. Disable them. | |
116 | ;; TODO: Remove this package when its dependents no longer | |
117 | ;; need it. | |
118 | #:tests? #f)) | |
528ea990 LC |
119 | |
120 | ;; When cross-compiling, a native version of Guile itself is needed. | |
121 | (native-inputs (if (%current-target-system) | |
122 | `(("self" ,this-package)) | |
123 | '())) | |
124 | ||
2f73ea34 | 125 | (inputs (list gawk readline)) |
c44899a2 LC |
126 | |
127 | ;; Since `guile-1.8.pc' has "Libs: ... -lgmp -lltdl", these must be | |
128 | ;; propagated. | |
2f73ea34 | 129 | (propagated-inputs (list gmp libltdl)) |
c44899a2 | 130 | |
9be8d7c8 LC |
131 | (native-search-paths |
132 | (list (search-path-specification | |
133 | (variable "GUILE_LOAD_PATH") | |
af070955 | 134 | (files '("share/guile/site"))))) |
9be8d7c8 | 135 | |
f50d2669 | 136 | (synopsis "Scheme implementation intended especially for extensions") |
c44899a2 | 137 | (description |
a22dc0c4 LC |
138 | "Guile is the GNU Ubiquitous Intelligent Language for Extensions, the |
139 | official extension language of the GNU system. It is an implementation of | |
140 | the Scheme language which can be easily embedded in other applications to | |
141 | provide a convenient means of extending the functionality of the application | |
142 | without requiring the source code to be rewritten.") | |
6fd52309 | 143 | (home-page "https://www.gnu.org/software/guile/") |
71e0f217 | 144 | (license license:lgpl2.0+))) |
c44899a2 LC |
145 | |
146 | (define-public guile-2.0 | |
147 | (package | |
148 | (name "guile") | |
b5efd14a | 149 | (version "2.0.14") |
c44899a2 | 150 | (source (origin |
87f5d366 | 151 | (method url-fetch) |
0db342a5 | 152 | (uri (string-append "mirror://gnu/guile/guile-" version |
c44899a2 LC |
153 | ".tar.xz")) |
154 | (sha256 | |
155 | (base32 | |
b5efd14a | 156 | "10lxc6l5alf3lzbs3ihnbfy6dfcrsyf8667wa57f26vf4mk2ai78")))) |
c44899a2 | 157 | (build-system gnu-build-system) |
528ea990 LC |
158 | |
159 | ;; When cross-compiling, a native version of Guile itself is needed. | |
160 | (native-inputs `(,@(if (%current-target-system) | |
161 | `(("self" ,this-package)) | |
162 | '()) | |
163 | ("pkgconfig" ,pkg-config))) | |
c44899a2 | 164 | (inputs `(("libffi" ,libffi) |
88da729f | 165 | ,@(libiconv-if-needed) |
baf549df LC |
166 | |
167 | ;; We need Bash when cross-compiling because some of the scripts | |
168 | ;; in bin/ refer to it. Use 'bash-minimal' because we don't need | |
169 | ;; an interactive Bash with Readline and all. | |
170 | ,@(if (target-mingw?) '() `(("bash" ,bash-minimal))))) | |
c44899a2 LC |
171 | (propagated-inputs |
172 | `( ;; These ones aren't normally needed here, but since `libguile-2.0.la' | |
173 | ;; reads `-lltdl -lunistring', adding them here will add the needed | |
174 | ;; `-L' flags. As for why the `.la' file lacks the `-L' flags, see | |
175 | ;; <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/18903>. | |
176 | ("libunistring" ,libunistring) | |
be11b102 LC |
177 | |
178 | ;; Depend on LIBLTDL, not LIBTOOL. That way, we avoid some the extra | |
179 | ;; dependencies that LIBTOOL has, which is helpful during bootstrap. | |
180 | ("libltdl" ,libltdl) | |
c44899a2 LC |
181 | |
182 | ;; The headers and/or `guile-2.0.pc' refer to these packages, so they | |
183 | ;; must be propagated. | |
bda1bc6c | 184 | ("bdw-gc" ,libgc) |
c44899a2 LC |
185 | ("gmp" ,gmp))) |
186 | ||
9bf62d9b LC |
187 | (outputs '("out" "debug")) |
188 | ||
8ffaa93b | 189 | (arguments |
c9627323 LC |
190 | `(#:configure-flags |
191 | ,(if (target-x86-32?) ;<https://issues.guix.gnu.org/49368> | |
192 | ''("--disable-static" "CFLAGS=-g -O2 -fexcess-precision=standard") | |
193 | ''("--disable-static")) ;saves 3 MiB | |
2ea52f90 LC |
194 | |
195 | ;; Work around non-reproducible .go files as described in | |
196 | ;; <https://bugs.gnu.org/20272>, which affects 2.0, 2.2, and 3.0 so far. | |
197 | #:parallel-build? #f | |
198 | ||
20897536 TGR |
199 | #:phases |
200 | (modify-phases %standard-phases | |
ba2f61bb JN |
201 | ,@(if (hurd-system?) |
202 | '((add-after 'unpack 'disable-tests | |
203 | (lambda _ | |
204 | ;; Hangs at: "Running 00-repl-server.test" | |
205 | (rename-file "test-suite/tests/00-repl-server.test" "00-repl-server.test") | |
206 | ;; Sometimes Hangs at: "Running 00-socket.test" | |
207 | (rename-file "test-suite/tests/00-socket.test" "00-socket.test") | |
208 | ;; FAIL: srfi-18.test: thread-sleep!: thread sleeps fractions of a second | |
209 | (rename-file "test-suite/tests/srfi-18.test" "srfi-18.test") | |
210 | ;; failed to remove 't-guild-compile-7215.go.tdL7yC | |
211 | (substitute* "test-suite/standalone/Makefile.in" | |
212 | (("test-guild-compile ") "")) | |
213 | #t))) | |
214 | '()) | |
20897536 TGR |
215 | (add-before 'configure 'pre-configure |
216 | (lambda* (#:key inputs #:allow-other-keys) | |
217 | ;; Tell (ice-9 popen) the file name of Bash. | |
218 | (let ((bash (assoc-ref inputs "bash"))) | |
219 | (substitute* "module/ice-9/popen.scm" | |
220 | ;; If bash is #f allow fallback for user to provide | |
221 | ;; "bash" in PATH. This happens when cross-building to | |
222 | ;; MinGW for which we do not have Bash yet. | |
223 | (("/bin/sh") | |
224 | ,@(if (target-mingw?) | |
225 | '((if bash | |
226 | (string-append bash "/bin/bash") | |
227 | "bash")) | |
228 | '((string-append bash "/bin/bash"))))) | |
229 | #t)))))) | |
8ffaa93b | 230 | |
9be8d7c8 LC |
231 | (native-search-paths |
232 | (list (search-path-specification | |
233 | (variable "GUILE_LOAD_PATH") | |
af070955 | 234 | (files '("share/guile/site/2.0"))) |
9be8d7c8 LC |
235 | (search-path-specification |
236 | (variable "GUILE_LOAD_COMPILED_PATH") | |
b03f270e | 237 | (files '("lib/guile/2.0/site-ccache"))))) |
9be8d7c8 | 238 | |
f50d2669 | 239 | (synopsis "Scheme implementation intended especially for extensions") |
c44899a2 | 240 | (description |
a22dc0c4 LC |
241 | "Guile is the GNU Ubiquitous Intelligent Language for Extensions, the |
242 | official extension language of the GNU system. It is an implementation of | |
243 | the Scheme language which can be easily embedded in other applications to | |
244 | provide a convenient means of extending the functionality of the application | |
245 | without requiring the source code to be rewritten.") | |
6fd52309 | 246 | (home-page "https://www.gnu.org/software/guile/") |
71e0f217 | 247 | (license license:lgpl3+))) |
c44899a2 | 248 | |
f6396d86 | 249 | (define-public guile-2.2 |
f906d30c | 250 | (package (inherit guile-2.0) |
f6396d86 | 251 | (name "guile") |
edc8fd2e | 252 | (version "2.2.7") |
4eae7980 LC |
253 | (source (origin |
254 | (method url-fetch) | |
34d624ce LC |
255 | |
256 | ;; Note: we are limited to one of the compression formats | |
257 | ;; supported by the bootstrap binaries, so no lzip here. | |
80a72572 | 258 | (uri (string-append "mirror://gnu/guile/guile-" version |
34d624ce | 259 | ".tar.xz")) |
4eae7980 LC |
260 | (sha256 |
261 | (base32 | |
edc8fd2e | 262 | "013mydzhfswqci6xmyc1ajzd59pfbdak15i0b090nhr9bzm7dxyd")) |
d9f0788a | 263 | (modules '((guix build utils))) |
44f07d1d | 264 | (patches (search-patches |
a8650a70 MO |
265 | "guile-2.2-skip-oom-test.patch" |
266 | "guile-2.2-skip-so-test.patch")) | |
d9f0788a LC |
267 | |
268 | ;; Remove the pre-built object files. Instead, build everything | |
269 | ;; from source, at the expense of significantly longer build | |
270 | ;; times (almost 3 hours on a 4-core Intel i5). | |
6cbee49d MW |
271 | (snippet '(begin |
272 | (for-each delete-file | |
273 | (find-files "prebuilt" "\\.go$")) | |
274 | #t)))) | |
9b09a753 LC |
275 | (arguments |
276 | (substitute-keyword-arguments (package-arguments guile-2.0) | |
277 | ((#:configure-flags flags ''()) | |
278 | (if (target-x86-32?) ;<https://issues.guix.gnu.org/49368> | |
c9627323 LC |
279 | `(append '("--disable-static") |
280 | '("CFLAGS=-g -O2 -fexcess-precision=standard")) | |
9b09a753 LC |
281 | flags)))) |
282 | ||
4fbd0f4f | 283 | (properties '((timeout . 72000) ;20 hours |
16b0f205 | 284 | (max-silent-time . 36000))) ;10 hours (needed on ARM |
1577a658 | 285 | ; when heavily loaded) |
dd90ed89 DT |
286 | (native-search-paths |
287 | (list (search-path-specification | |
288 | (variable "GUILE_LOAD_PATH") | |
289 | (files '("share/guile/site/2.2"))) | |
290 | (search-path-specification | |
291 | (variable "GUILE_LOAD_COMPILED_PATH") | |
1dcca83a | 292 | (files '("lib/guile/2.2/site-ccache"))))))) |
4eae7980 | 293 | |
edc8fd2e | 294 | (define-deprecated guile-2.2/bug-fix guile-2.2) |
4bd6f1d1 | 295 | |
8400d097 | 296 | (define-public guile-2.2.4 |
dbcf2b61 MB |
297 | (package |
298 | (inherit guile-2.2) | |
8400d097 LC |
299 | (version "2.2.4") |
300 | (source (origin | |
301 | (inherit (package-source guile-2.2)) | |
302 | (uri (string-append "mirror://gnu/guile/guile-" version | |
303 | ".tar.xz")) | |
304 | (sha256 | |
305 | (base32 | |
306 | "07p3g0v2ba2vlfbfidqzlgbhnzdx46wh2rgc5gszq1mjyx5bks6r")))))) | |
34d624ce | 307 | |
e7921d5e LC |
308 | (define-public guile-3.0 |
309 | ;; This is the latest Guile stable version. | |
2d0e802f DT |
310 | (package |
311 | (inherit guile-2.2) | |
b6bee63b | 312 | (name "guile") |
a81c898f | 313 | (version "3.0.7") |
2d0e802f | 314 | (source (origin |
9ba35475 EF |
315 | (inherit (package-source guile-2.2)) |
316 | (patches '()) ; We no longer need the patches. | |
1a30351b | 317 | (uri (string-append "mirror://gnu/guile/guile-" |
2d0e802f DT |
318 | version ".tar.xz")) |
319 | (sha256 | |
320 | (base32 | |
9ba35475 EF |
321 | "1dwiwsrpm4f96alfnz6wibq378242z4f16vsxgy1n9r00v3qczgm")) |
322 | ;; Replace the snippet because the oom-test still | |
323 | ;; fails on some 32-bit architectures. | |
324 | (snippet '(begin | |
325 | (substitute* "test-suite/standalone/Makefile.in" | |
326 | (("test-out-of-memory") "")) | |
327 | (for-each delete-file | |
777962de | 328 | (find-files "prebuilt" "\\.go$")))))) |
a81c898f LC |
329 | |
330 | ;; Build with the bundled mini-GMP to avoid interference with GnuTLS' own | |
331 | ;; use of GMP via Nettle: <https://issues.guix.gnu.org/46330>. | |
332 | (propagated-inputs | |
b00fbabd LC |
333 | (modify-inputs (package-propagated-inputs guile-2.2) |
334 | (delete "gmp" "libltdl"))) | |
916ec91f | 335 | (arguments |
9b09a753 | 336 | (substitute-keyword-arguments (package-arguments guile-2.0) |
a81c898f | 337 | ((#:configure-flags flags ''()) |
fccc0275 MD |
338 | ;; XXX: JIT-enabled Guile crashes in obscure ways on GNU/Hurd. |
339 | `(cons* ,@(if (hurd-target?) | |
340 | '("--disable-jit") | |
341 | '()) | |
342 | ;; -fexcess-precision=standard is required when compiling for | |
343 | ;; i686-linux, otherwise "numbers.test" will fail | |
344 | ;; (see <https://issues.guix.gnu.org/49368> and | |
345 | ;; <https://issues.guix.gnu.org/49659>). | |
9b09a753 LC |
346 | ;; TODO: Keep this in GUILE-2.2 and remove from here on next |
347 | ;; rebuild cycle. | |
fccc0275 MD |
348 | ,@(if (target-x86-32?) |
349 | '("CFLAGS=-g -O2 -fexcess-precision=standard") | |
350 | '()) | |
351 | "--enable-mini-gmp" | |
c9627323 | 352 | '("--disable-static"))) |
9ba35475 | 353 | ((#:phases phases) |
285f3b58 LC |
354 | `(modify-phases ,phases |
355 | (add-before 'check 'disable-stack-overflow-test | |
356 | (lambda _ | |
357 | ;; This test can invoke the "OOM killer", especially when | |
358 | ;; running on emulated hardware (QEMU). Skip it. | |
359 | (substitute* "test-suite/standalone/test-stack-overflow" | |
360 | (("!#") | |
361 | "!#\n(exit 77)\n")))) | |
362 | ||
363 | ,@(if (string-prefix? "powerpc-" (%current-system)) | |
364 | `((add-after 'unpack 'adjust-bootstrap-flags | |
365 | (lambda _ | |
366 | ;; Upstream knows about suggested solution. | |
367 | ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=45214 | |
368 | (substitute* "bootstrap/Makefile.in" | |
369 | (("^GUILE_OPTIMIZATIONS.*") | |
f9fbed01 EF |
370 | "GUILE_OPTIMIZATIONS = -O1 -Oresolve-primitives -Ocps\n"))))) |
371 | '()) | |
372 | ,@(if (or (target-ppc32?) | |
373 | (target-riscv64?)) | |
374 | `((add-after 'unpack 'skip-failing-fdes-test | |
375 | (lambda _ | |
376 | ;; ERROR: ((system-error "seek" "~A" ("Bad file descriptor") (9))) | |
377 | (substitute* "test-suite/tests/ports.test" | |
378 | (("fdes not closed\"" all) (string-append all "(exit 77)"))) | |
379 | #t))) | |
380 | '()))))) | |
9ba35475 | 381 | |
2d0e802f DT |
382 | (native-search-paths |
383 | (list (search-path-specification | |
384 | (variable "GUILE_LOAD_PATH") | |
385 | (files '("share/guile/site/3.0"))) | |
386 | (search-path-specification | |
387 | (variable "GUILE_LOAD_COMPILED_PATH") | |
388 | (files '("lib/guile/3.0/site-ccache" | |
e7921d5e LC |
389 | "share/guile/site/3.0"))))))) |
390 | ||
9e91f862 | 391 | (define-public guile-3.0-latest |
076e825d LC |
392 | (package |
393 | (inherit guile-3.0) | |
394 | (version "3.0.8") | |
395 | (source (origin | |
396 | (inherit (package-source guile-3.0)) | |
397 | (uri (string-append "mirror://gnu/guile/guile-" | |
398 | version ".tar.xz")) | |
399 | (sha256 | |
400 | (base32 | |
e9b7adde LC |
401 | "04wagg0zr0sib0w9ly5jm91jplgfigzfgmy8fjdlx07jaq50d9ys")) |
402 | (patches (search-patches "guile-cross-compilation.patch")))) | |
076e825d LC |
403 | (arguments |
404 | (substitute-keyword-arguments (package-arguments guile-3.0) | |
405 | ;; Guile 3.0.8 is bit-reproducible when built in parallel, thanks to | |
dd6b951f LC |
406 | ;; its multi-stage build process for cross-module inlining, except when |
407 | ;; cross-compiling. | |
408 | ((#:parallel-build? _ #f) | |
c835c508 EF |
409 | (not (%current-target-system))) |
410 | ((#:phases phases) | |
411 | `(modify-phases ,phases | |
412 | ,@(if (target-ppc32?) | |
413 | `((replace 'adjust-bootstrap-flags | |
414 | (lambda _ | |
415 | ;; Upstream knows about suggested solution. | |
416 | ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=45214 | |
417 | ;; https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=977223#46 | |
418 | (substitute* "stage0/Makefile.in" | |
419 | (("^GUILE_OPTIMIZATIONS.*") | |
420 | "GUILE_OPTIMIZATIONS = -O1 -Oresolve-primitives -Ocps\n"))))) | |
421 | '()))))))) | |
89ab6bfb | 422 | |
b6bee63b LC |
423 | (define-public guile-3.0/fixed |
424 | ;; A package of Guile that's rarely changed. It is the one used in the | |
425 | ;; `base' module, and thus changing it entails a full rebuild. | |
426 | (package | |
427 | (inherit guile-3.0) | |
428 | (properties '((hidden? . #t) ;people should install 'guile-2.2' | |
429 | (timeout . 72000) ;20 hours | |
430 | (max-silent-time . 36000))))) ;10 hours (needed on ARM | |
431 | ; when heavily loaded) | |
432 | ||
973c6f18 | 433 | (define-public guile-next |
93e6a119 | 434 | (let ((version "3.0.7") |
973c6f18 | 435 | (revision "0") |
93e6a119 | 436 | (commit "d70c1dbebf9ac0fd45af4578c23983ec4a7da535")) |
973c6f18 LC |
437 | (package |
438 | (inherit guile-3.0) | |
439 | (name "guile-next") | |
440 | (version (git-version version revision commit)) | |
441 | (source (origin | |
442 | ;; The main goal here is to allow for '--with-branch'. | |
443 | (method git-fetch) | |
444 | (uri (git-reference | |
445 | (url "https://git.savannah.gnu.org/git/guile.git") | |
446 | (commit commit))) | |
2bbbf673 | 447 | (file-name (git-file-name name version)) |
973c6f18 LC |
448 | (sha256 |
449 | (base32 | |
93e6a119 | 450 | "05rsk9lh5kchbav3lwfwgvgybrykqqjmkkc6689fhb3mjr5m3dqj")))) |
973c6f18 LC |
451 | (arguments |
452 | (substitute-keyword-arguments (package-arguments guile-3.0) | |
453 | ((#:phases phases '%standard-phases) | |
454 | `(modify-phases ,phases | |
455 | (add-before 'check 'skip-failing-tests | |
456 | (lambda _ | |
457 | (substitute* "test-suite/standalone/test-out-of-memory" | |
458 | (("!#") "!#\n\n(exit 77)\n")) | |
459 | (delete-file "test-suite/tests/version.test") | |
460 | #t)))))) | |
461 | (native-inputs | |
2f73ea34 LC |
462 | (modify-inputs (package-native-inputs guile-3.0) |
463 | (prepend autoconf | |
464 | automake | |
465 | libtool | |
466 | flex | |
467 | gnu-gettext | |
468 | texinfo | |
469 | gperf))) | |
973c6f18 LC |
470 | (synopsis "Development version of GNU Guile")))) |
471 | ||
7c3b6b2e | 472 | (define* (make-guile-readline guile #:optional (name "guile-readline")) |
2ba2c98d | 473 | (package |
7c3b6b2e | 474 | (name name) |
2ba2c98d LC |
475 | (version (package-version guile)) |
476 | (source (package-source guile)) | |
477 | (build-system gnu-build-system) | |
478 | (arguments | |
7046a8ff LC |
479 | '(#:configure-flags '("--disable-silent-rules" |
480 | "--enable-mini-gmp") ;for Guile >= 3.0.6 | |
2ba2c98d LC |
481 | #:phases (modify-phases %standard-phases |
482 | (add-before 'build 'chdir | |
483 | (lambda* (#:key outputs #:allow-other-keys) | |
484 | (invoke "make" "-C" "libguile" "scmconfig.h") | |
485 | (invoke "make" "-C" "lib") | |
486 | (chdir "guile-readline") | |
487 | ||
488 | (substitute* "Makefile" | |
489 | (("../libguile/libguile-[[:graph:]]+\\.la") | |
490 | ;; Remove dependency on libguile-X.Y.la. | |
491 | "") | |
492 | (("^READLINE_LIBS = (.*)$" _ libs) | |
493 | ;; Link against the provided libguile. | |
494 | (string-append "READLINE_LIBS = " | |
495 | "-lguile-$(GUILE_EFFECTIVE_VERSION) " | |
496 | libs "\n")) | |
497 | (("\\$\\(top_builddir\\)/meta/build-env") | |
498 | ;; Use the provided Guile, not the one from | |
499 | ;; $(builddir). | |
500 | "") | |
501 | ||
502 | ;; Install modules to the 'site' directories. | |
503 | (("^moddir = .*$") | |
504 | "moddir = $(pkgdatadir)/site/$(GUILE_EFFECTIVE_VERSION)\n") | |
505 | (("^ccachedir = .*$") | |
506 | "ccachedir = $(pkglibdir)/$(GUILE_EFFECTIVE_VERSION)/site-ccache\n")) | |
507 | ||
508 | ;; Load 'guile-readline.so' from the right place. | |
509 | (substitute* "ice-9/readline.scm" | |
510 | (("load-extension \"guile-readline\"") | |
511 | (format #f "load-extension \ | |
512 | (string-append ~s \"/lib/guile/\" (effective-version) \"/extensions/guile-readline\")" | |
513 | (assoc-ref outputs "out")))) | |
514 | #t))))) | |
515 | (home-page (package-home-page guile)) | |
516 | (native-inputs (package-native-inputs guile)) | |
517 | (inputs | |
518 | `(,@(package-inputs guile) ;to placate 'configure' | |
519 | ,@(package-propagated-inputs guile) | |
520 | ("guile" ,guile) | |
521 | ("readline" ,readline))) | |
522 | (synopsis "Line editing support for GNU Guile") | |
523 | (description | |
524 | "This module provides line editing support via the Readline library for | |
525 | GNU@tie{}Guile. Use the @code{(ice-9 readline)} module and call its | |
526 | @code{activate-readline} procedure to enable it.") | |
527 | (license license:gpl3+))) | |
528 | ||
529 | (define-public guile-readline | |
142cd4dc | 530 | (make-guile-readline guile-3.0)) |
2ba2c98d | 531 | |
142cd4dc MB |
532 | (define-public guile2.2-readline |
533 | (make-guile-readline guile-2.2 "guile2.2-readline")) | |
7c3b6b2e | 534 | |
8f4acad7 LC |
535 | (define (guile-variant-package-name prefix) |
536 | (lambda (name) | |
537 | "Return NAME with PREFIX instead of \"guile-\", when applicable." | |
538 | (if (string-prefix? "guile-" name) | |
539 | (string-append prefix "-" | |
540 | (string-drop name | |
541 | (string-length "guile-"))) | |
542 | name))) | |
947a5d47 | 543 | |
8f4acad7 | 544 | (define package-for-guile-2.0 |
10b507b2 | 545 | ;; A procedure that rewrites the dependency tree of the given package to use |
e8bc2a01 MB |
546 | ;; GUILE-2.0 instead of GUILE-3.0. |
547 | (package-input-rewriting `((,guile-3.0 . ,guile-2.0)) | |
8819551c LC |
548 | (guile-variant-package-name "guile2.0") |
549 | #:deep? #f)) | |
947a5d47 | 550 | |
b6bee63b LC |
551 | (define package-for-guile-2.2 |
552 | (package-input-rewriting `((,guile-3.0 . ,guile-2.2)) | |
8819551c LC |
553 | (guile-variant-package-name "guile2.2") |
554 | #:deep? #f)) | |
b6bee63b | 555 | |
4eae7980 | 556 | (define-public guile-for-guile-emacs |
a71d3358 RW |
557 | (let ((commit "15ca78482ac0dd2e3eb36dcb31765d8652d7106d") |
558 | (revision "1")) | |
559 | (package (inherit guile-2.2) | |
560 | (name "guile-for-guile-emacs") | |
561 | (version (git-version "2.1.2" revision commit)) | |
562 | (source (origin | |
563 | (method git-fetch) | |
564 | (uri (git-reference | |
565 | (url "git://git.savannah.gnu.org/guile.git") | |
566 | (commit commit))) | |
567 | (file-name (git-file-name name version)) | |
568 | (sha256 | |
569 | (base32 | |
570 | "1l7ik4q4zk7vq4m3gnwizc0b64b1mdr31hxqlzxs94xaf2lvi7s2")))) | |
571 | (arguments | |
572 | (substitute-keyword-arguments (package-arguments guile-2.2) | |
573 | ((#:phases phases '%standard-phases) | |
574 | `(modify-phases ,phases | |
575 | (replace 'bootstrap | |
576 | (lambda _ | |
577 | ;; Disable broken tests. | |
578 | ;; TODO: Fix them! | |
579 | (substitute* "test-suite/tests/gc.test" | |
580 | (("\\(pass-if \"after-gc-hook gets called\"" m) | |
581 | (string-append "#;" m))) | |
582 | (substitute* "test-suite/tests/version.test" | |
583 | (("\\(pass-if \"version reporting works\"" m) | |
584 | (string-append "#;" m))) | |
585 | ;; Warning: Unwind-only `out-of-memory' exception; skipping pre-unwind handler. | |
586 | ;; FAIL: test-out-of-memory | |
587 | (substitute* "test-suite/standalone/Makefile.am" | |
588 | (("(check_SCRIPTS|TESTS) \\+= test-out-of-memory") "")) | |
b00fbabd | 589 | |
a71d3358 RW |
590 | (patch-shebang "build-aux/git-version-gen") |
591 | (invoke "sh" "autogen.sh") | |
592 | #t)))))) | |
593 | (native-inputs | |
b00fbabd LC |
594 | (modify-inputs (package-native-inputs guile-2.2) |
595 | (prepend autoconf | |
596 | automake | |
597 | libtool | |
598 | flex | |
599 | texinfo | |
600 | gettext-minimal)))))) | |
be3feafe | 601 | |
c44899a2 LC |
602 | \f |
603 | ;;; | |
604 | ;;; Extensions. | |
605 | ;;; | |
606 | ||
84af1e74 | 607 | (define-public guile-json-1 |
6050a1fb CR |
608 | (package |
609 | (name "guile-json") | |
327ebd55 | 610 | (version "1.3.2") |
f52ef55e | 611 | (home-page "https://github.com/aconchillo/guile-json") |
6050a1fb | 612 | (source (origin |
ffc72ec6 | 613 | (method url-fetch) |
28123c01 LC |
614 | (uri (string-append "mirror://savannah/guile-json/guile-json-" |
615 | version ".tar.gz")) | |
ffc72ec6 LC |
616 | (sha256 |
617 | (base32 | |
327ebd55 | 618 | "0m6yzb169r6iz56k3nkncjaiijwi4p0x9ijn1p5ax3s77jklxy9k")))) |
6050a1fb | 619 | (build-system gnu-build-system) |
327ebd55 EF |
620 | (arguments |
621 | `(#:make-flags '("GUILE_AUTO_COMPILE=0"))) ;to prevent guild warnings | |
2f73ea34 LC |
622 | (native-inputs (list pkg-config guile-2.2)) |
623 | (inputs (list guile-2.2)) | |
6050a1fb CR |
624 | (synopsis "JSON module for Guile") |
625 | (description | |
0f31d4f0 LC |
626 | "Guile-JSON supports parsing and building JSON documents according to the |
627 | specification. These are the main features: | |
628 | ||
629 | @itemize | |
630 | @item Strictly complies to @uref{http://json.org, specification}. | |
631 | @item Build JSON documents programmatically via macros. | |
632 | @item Unicode support for strings. | |
633 | @item Allows JSON pretty printing. | |
634 | @end itemize\n") | |
15214828 LC |
635 | |
636 | ;; Version 1.2.0 switched to GPLv3+ (from LGPLv3+). | |
637 | (license license:gpl3+))) | |
6050a1fb | 638 | |
84af1e74 LC |
639 | ;; Deprecate the 'guile-json' alias to force the use 'guile-json-1' or |
640 | ;; 'guile-json-3'. In the future, we may reuse 'guile-json' as an alias for | |
641 | ;; 'guile-json-3'. | |
9b65dea8 | 642 | (define-deprecated guile-json guile-json-1) |
7f81cce3 | 643 | (export guile-json) |
584a3ca3 | 644 | |
2252f087 | 645 | (define-public guile2.0-json |
84af1e74 | 646 | (package-for-guile-2.0 guile-json-1)) |
947a5d47 | 647 | |
152d4076 LC |
648 | (define-public guile-json-3 |
649 | ;; This version is incompatible with 1.x; see the 'NEWS' file. | |
650 | (package | |
84af1e74 | 651 | (inherit guile-json-1) |
152d4076 | 652 | (name "guile-json") |
5d9e2187 | 653 | (version "3.5.0") |
152d4076 LC |
654 | (source (origin |
655 | (method url-fetch) | |
28123c01 LC |
656 | (uri (string-append "mirror://savannah/guile-json/guile-json-" |
657 | version ".tar.gz")) | |
152d4076 LC |
658 | (sha256 |
659 | (base32 | |
5d9e2187 | 660 | "0nj0684qgh6ppkbdyxqfyjwsv2qbyairxpi8fzrhsi3xnc7jn4im")))) |
2f73ea34 LC |
661 | (native-inputs (list pkg-config guile-3.0)) |
662 | (inputs (list guile-3.0)))) | |
b6bee63b | 663 | |
793a48ed LC |
664 | (define-public guile-json-4 |
665 | (package | |
666 | (inherit guile-json-3) | |
667 | (name "guile-json") | |
00576330 | 668 | (version "4.7.1") |
793a48ed LC |
669 | (source (origin |
670 | (method url-fetch) | |
671 | (uri (string-append "mirror://savannah/guile-json/guile-json-" | |
672 | version ".tar.gz")) | |
673 | (sha256 | |
674 | (base32 | |
00576330 | 675 | "0hv8jjb6wdhvfrprwdi36125sci1ip4zfflv79hqlz7nh0irld65")))))) |
793a48ed LC |
676 | |
677 | (define-public guile2.2-json | |
678 | (package-for-guile-2.2 guile-json-4)) | |
679 | ||
93e7199b CAW |
680 | ;; There are two guile-gdbm packages, one using the FFI and one with |
681 | ;; direct C bindings, hence the verbose name. | |
682 | ||
683 | (define-public guile-gdbm-ffi | |
684 | (package | |
685 | (name "guile-gdbm-ffi") | |
686 | (version "20120209.fa1d5b6") | |
687 | (source (origin | |
688 | (method git-fetch) | |
689 | (uri (git-reference | |
b0e7b699 | 690 | (url "https://github.com/ijp/guile-gdbm") |
93e7199b | 691 | (commit "fa1d5b6231d0e4d096687b378c025f2148c5f246"))) |
821f4dc2 | 692 | (file-name (string-append name "-" version "-checkout")) |
977d8666 LC |
693 | (patches (search-patches |
694 | "guile-gdbm-ffi-support-gdbm-1.14.patch")) | |
93e7199b CAW |
695 | (sha256 |
696 | (base32 | |
697 | "1j8wrsw7v9w6qkl47xz0rdikg50v16nn6kbs3lgzcymjzpa7babj")))) | |
977d8666 LC |
698 | (build-system guile-build-system) |
699 | (arguments | |
700 | '(#:phases (modify-phases %standard-phases | |
701 | (add-after 'unpack 'move-examples | |
702 | (lambda* (#:key outputs #:allow-other-keys) | |
703 | ;; Move examples where they belong. | |
704 | (let* ((out (assoc-ref outputs "out")) | |
705 | (doc (string-append out "/share/doc/" | |
706 | (strip-store-file-name out) | |
707 | "/examples"))) | |
708 | (copy-recursively "examples" doc) | |
709 | (delete-file-recursively "examples") | |
710 | #t))) | |
711 | (add-after 'unpack 'set-libgdbm-file-name | |
712 | (lambda* (#:key inputs #:allow-other-keys) | |
713 | (substitute* "gdbm.scm" | |
714 | (("\\(dynamic-link \"libgdbm\"\\)") | |
715 | (format #f "(dynamic-link \"~a/lib/libgdbm.so\")" | |
716 | (assoc-ref inputs "gdbm")))) | |
717 | #t))))) | |
2f73ea34 LC |
718 | (native-inputs (list guile-3.0)) |
719 | (inputs (list gdbm)) | |
93e7199b CAW |
720 | (home-page "https://github.com/ijp/guile-gdbm") |
721 | (synopsis "Guile bindings to the GDBM library via Guile's FFI") | |
722 | (description | |
723 | "Guile bindings to the GDBM key-value storage system, using | |
724 | Guile's foreign function interface.") | |
71e0f217 | 725 | (license license:gpl3+))) |
93e7199b | 726 | |
5bd3a841 LC |
727 | (define-public guile2.0-gdbm-ffi |
728 | (package-for-guile-2.0 guile-gdbm-ffi)) | |
729 | ||
b6bee63b LC |
730 | (define-public guile2.2-gdbm-ffi |
731 | (package-for-guile-2.2 guile-gdbm-ffi)) | |
732 | ||
e8ac1f8f | 733 | (define-public guile-sqlite3 |
319e26e4 LC |
734 | (package |
735 | (name "guile-sqlite3") | |
120d8f85 | 736 | (version "0.1.3") |
3527f600 | 737 | (home-page "https://notabug.org/guile-sqlite3/guile-sqlite3.git") |
319e26e4 LC |
738 | (source (origin |
739 | (method git-fetch) | |
740 | (uri (git-reference | |
741 | (url home-page) | |
742 | (commit (string-append "v" version)))) | |
743 | (sha256 | |
744 | (base32 | |
120d8f85 | 745 | "0qqygvlpz63phdi2p5p8ncp80dci230qfa3pwds8yfxqqaablmhb")) |
29e4d3ea | 746 | (file-name (string-append name "-" version "-checkout")))) |
319e26e4 | 747 | (build-system gnu-build-system) |
2f73ea34 LC |
748 | (native-inputs (list autoconf automake guile-3.0 pkg-config)) |
749 | (inputs (list guile-3.0 sqlite)) | |
319e26e4 LC |
750 | (synopsis "Access SQLite databases from Guile") |
751 | (description | |
752 | "This package provides Guile bindings to the SQLite database system.") | |
753 | (license license:gpl3+))) | |
e8ac1f8f | 754 | |
c8e3651a EB |
755 | (define-public guile2.0-sqlite3 |
756 | (package-for-guile-2.0 guile-sqlite3)) | |
757 | ||
b6bee63b LC |
758 | (define-public guile2.2-sqlite3 |
759 | (package-for-guile-2.2 guile-sqlite3)) | |
760 | ||
3b5783fc AB |
761 | (define-public guile-bytestructures |
762 | (package | |
763 | (name "guile-bytestructures") | |
b1eb7448 | 764 | (version "1.0.10") |
16e42db0 | 765 | (home-page "https://github.com/TaylanUB/scheme-bytestructures") |
3b5783fc | 766 | (source (origin |
16e42db0 MO |
767 | (method git-fetch) |
768 | (uri (git-reference | |
769 | (url home-page) | |
0a1da465 | 770 | (commit version))) |
43476625 | 771 | (file-name (git-file-name name version)) |
3b5783fc AB |
772 | (sha256 |
773 | (base32 | |
b1eb7448 | 774 | "14k50jln32kkxv41hvsdgjkkfj6xlv06vc1caz01qkgk1fzh72nk")))) |
4f85f7f7 | 775 | (build-system gnu-build-system) |
9a78e181 | 776 | (arguments |
7ed9c312 LC |
777 | `(#:make-flags '("GUILE_AUTO_COMPILE=0") ;to prevent guild warnings |
778 | ||
779 | #:phases (modify-phases %standard-phases | |
780 | (add-after 'install 'install-doc | |
781 | (lambda* (#:key outputs #:allow-other-keys) | |
782 | (let* ((out (assoc-ref outputs "out")) | |
783 | (package ,(package-full-name this-package "-")) | |
784 | (doc (string-append out "/share/doc/" package))) | |
785 | (install-file "README.md" doc) | |
786 | #t)))))) | |
2f73ea34 LC |
787 | (native-inputs (list autoconf automake pkg-config guile-3.0)) |
788 | (inputs (list guile-3.0)) | |
3b5783fc AB |
789 | (synopsis "Structured access to bytevector contents for Guile") |
790 | (description | |
791 | "Guile bytestructures offers a system imitating the type system | |
792 | of the C programming language, to be used on bytevectors. C's type | |
793 | system works on raw memory, and Guile works on bytevectors which are | |
794 | an abstraction over raw memory. It's also more powerful than the C | |
795 | type system, elevating types to first-class status.") | |
abba4073 LC |
796 | (license license:gpl3+) |
797 | (properties '((upstream-name . "bytestructures"))))) | |
3b5783fc | 798 | |
726ecfeb LC |
799 | (define-public guile2.0-bytestructures |
800 | (package-for-guile-2.0 guile-bytestructures)) | |
801 | ||
b6bee63b LC |
802 | (define-public guile2.2-bytestructures |
803 | (package-for-guile-2.2 guile-bytestructures)) | |
804 | ||
bd233722 | 805 | (define-public guile-git |
e85035c9 LC |
806 | (package |
807 | (name "guile-git") | |
de1ae961 | 808 | (version "0.5.2") |
e85035c9 LC |
809 | (home-page "https://gitlab.com/guile-git/guile-git.git") |
810 | (source (origin | |
7a6625e8 XC |
811 | (method git-fetch) |
812 | (uri (git-reference | |
813 | (url home-page) | |
814 | (commit (string-append "v" version)))) | |
815 | (file-name (git-file-name name version)) | |
e85035c9 LC |
816 | (sha256 |
817 | (base32 | |
f42bc604 MC |
818 | "11a51acibwi2hpaygmrpn6nwbr4lqalc87ihrgj3mhz6swbsk9n7")) |
819 | (patches (search-patches | |
820 | "guile-git-adjust-for-libgit2-1.2.0.patch")))) | |
e85035c9 | 821 | (build-system gnu-build-system) |
3d867fea | 822 | (arguments |
276a767e EF |
823 | `(#:make-flags '("GUILE_AUTO_COMPILE=0") ; to prevent guild warnings |
824 | ;; https://gitlab.com/guile-git/guile-git/-/issues/20 | |
825 | ,@(if (target-ppc32?) | |
826 | `(#:phases | |
827 | (modify-phases %standard-phases | |
828 | (add-after 'unpack 'skip-failing-test | |
829 | (lambda _ | |
830 | (substitute* "Makefile.am" | |
831 | ((".*tests/blob\\.scm.*") "")))))) | |
832 | '()))) | |
e85035c9 | 833 | (native-inputs |
2f73ea34 | 834 | (list pkg-config autoconf automake texinfo guile-3.0 guile-bytestructures)) |
e85035c9 | 835 | (inputs |
b6bfe9ea TGR |
836 | ;; libgit2@1.4.3 ‘fixed’ a git CVE it never shared, breaking Guix. Use |
837 | ;; 1.3 for now; see <https://issues.guix.gnu.org/55399> for alternatives. | |
838 | (list guile-3.0 libgit2-1.3)) | |
e85035c9 | 839 | (propagated-inputs |
2f73ea34 | 840 | (list guile-bytestructures)) |
e85035c9 LC |
841 | (synopsis "Guile bindings for libgit2") |
842 | (description | |
843 | "This package provides Guile bindings to libgit2, a library to | |
bd233722 | 844 | manipulate repositories of the Git version control system.") |
e85035c9 | 845 | (license license:gpl3+))) |
c5793e7e | 846 | |
b6bee63b LC |
847 | (define-public guile2.2-git |
848 | (package-for-guile-2.2 guile-git)) | |
01c11aeb | 849 | |
70bc6085 | 850 | (define-public guile2.0-git |
2bd60ca1 | 851 | (package-for-guile-2.0 guile-git)) |
70bc6085 | 852 | |
e5758aeb MO |
853 | (define-public guile-zlib |
854 | (package | |
855 | (name "guile-zlib") | |
97b45977 | 856 | (version "0.1.0") |
44241391 MO |
857 | (source |
858 | (origin | |
4aa7dfe4 MO |
859 | ;; XXX: Do not use "git-fetch" method here that would create and |
860 | ;; endless inclusion loop, because this package is used as an extension | |
861 | ;; in the same method. | |
44241391 MO |
862 | (method url-fetch) |
863 | (uri | |
97b45977 | 864 | (string-append "https://notabug.org/guile-zlib/guile-zlib/archive/v" |
44241391 | 865 | version ".tar.gz")) |
b4d6e378 | 866 | (file-name (string-append name "-" version ".tar.gz")) |
44241391 | 867 | (sha256 |
97b45977 | 868 | ;; content hash: 1ip18nzwnczqyhn9cpzxkm9vzpi5fz5sy96cgjhmp7cwhnkmv6zv |
44241391 | 869 | (base32 |
97b45977 | 870 | "1safz7rrbdf1d98x3lgx5v74kivpyf9n1v6pdyy22vd0f2sjdir5")))) |
e5758aeb MO |
871 | (build-system gnu-build-system) |
872 | (arguments | |
873 | '(#:make-flags | |
874 | '("GUILE_AUTO_COMPILE=0"))) ;to prevent guild warnings | |
2f73ea34 LC |
875 | (native-inputs (list autoconf automake pkg-config guile-3.0)) |
876 | (inputs (list guile-3.0 zlib)) | |
e5758aeb MO |
877 | (synopsis "Guile bindings to zlib") |
878 | (description | |
879 | "This package provides Guile bindings for zlib, a lossless | |
880 | data-compression library. The bindings are written in pure Scheme by using | |
881 | Guile's foreign function interface.") | |
882 | (home-page "https://notabug.org/guile-zlib/guile-zlib") | |
883 | (license license:gpl3+))) | |
a8307a17 | 884 | |
2a9af225 LC |
885 | (define-public guile2.2-zlib |
886 | (package-for-guile-2.2 guile-zlib)) | |
887 | ||
e5758aeb MO |
888 | (define-public guile-lzlib |
889 | (package | |
890 | (name "guile-lzlib") | |
af56f60e | 891 | (version "0.0.2") |
69361e88 MO |
892 | (source |
893 | (origin | |
894 | (method url-fetch) | |
895 | (uri | |
896 | (string-append "https://notabug.org/guile-lzlib/guile-lzlib/archive/" | |
897 | version ".tar.gz")) | |
90748666 | 898 | (file-name (string-append name "-" version ".tar.gz")) |
69361e88 MO |
899 | (sha256 |
900 | (base32 | |
af56f60e | 901 | "11sggvncyx08ssp1s5xii4d6nskh1qwqihnbpzzvkrs7sivxn8w6")))) |
e5758aeb MO |
902 | (build-system gnu-build-system) |
903 | (arguments | |
904 | '(#:make-flags | |
905 | '("GUILE_AUTO_COMPILE=0"))) ;to prevent guild warnings | |
2f73ea34 LC |
906 | (native-inputs (list autoconf automake pkg-config guile-3.0)) |
907 | (inputs (list guile-3.0 lzlib)) | |
e5758aeb MO |
908 | (synopsis "Guile bindings to lzlib") |
909 | (description | |
910 | "This package provides Guile bindings for lzlib, a C library for | |
911 | in-memory LZMA compression and decompression. The bindings are written in | |
912 | pure Scheme by using Guile's foreign function interface.") | |
913 | (home-page "https://notabug.org/guile-lzlib/guile-lzlib") | |
914 | (license license:gpl3+))) | |
915 | ||
2238bd8d LC |
916 | (define-public guile2.2-lzlib |
917 | (package-for-guile-2.2 guile-lzlib)) | |
918 | ||
32568f5b LC |
919 | (define-public guile-zstd |
920 | (package | |
921 | (name "guile-zstd") | |
922 | (version "0.1.1") | |
923 | (home-page "https://notabug.org/guile-zstd/guile-zstd") | |
924 | (source (origin | |
925 | (method git-fetch) | |
926 | (uri (git-reference (url home-page) | |
927 | (commit (string-append "v" version)))) | |
928 | (file-name (git-file-name name version)) | |
929 | (sha256 | |
930 | (base32 | |
931 | "1c8l7829b5yx8wdc0mrhzjfwb6h9hb7cd8dfxcr71a7vlsi86310")))) | |
932 | (build-system gnu-build-system) | |
2f73ea34 LC |
933 | (native-inputs (list autoconf automake pkg-config guile-3.0)) |
934 | (inputs (list `(,zstd "lib") guile-3.0)) | |
32568f5b LC |
935 | (synopsis "GNU Guile bindings to the zstd compression library") |
936 | (description | |
937 | "This package provides a GNU Guile interface to the zstd (``zstandard'') | |
938 | compression library.") | |
939 | (license license:gpl3+))) | |
940 | ||
eaa7ead4 TS |
941 | (define-public guile-lzma |
942 | (package | |
943 | (name "guile-lzma") | |
9f6532c7 | 944 | (version "0.1.1") |
eaa7ead4 TS |
945 | (source |
946 | (origin | |
947 | (method url-fetch) | |
948 | (uri (string-append "https://files.ngyro.com/guile-lzma/guile-lzma-" | |
949 | version ".tar.gz")) | |
950 | (sha256 | |
9f6532c7 | 951 | (base32 "0pnfzk92p9y5ymjq6rq619b9fy0dflv56jwg00wlvvbjssb6i1ib")))) |
eaa7ead4 TS |
952 | (build-system gnu-build-system) |
953 | (native-inputs | |
954 | (list autoconf automake guile-3.0 guile-bytestructures pkg-config)) | |
955 | (inputs (list guile-3.0 xz)) | |
956 | (propagated-inputs (list guile-bytestructures)) | |
957 | (home-page "https://ngyro.com/software/guile-lzma.html") | |
958 | (synopsis "Guile bindings for liblzma (XZ)") | |
959 | (description "Guile-LZMA is a Guile wrapper for the liblzma (XZ) | |
960 | library. It exposes an interface similar to other Guile compression | |
961 | libraries, like Guile-zlib.") | |
962 | (license license:gpl3+))) | |
963 | ||
e5758aeb | 964 | ;;; guile.scm ends here |