diff options
Diffstat (limited to 'gnu/packages/guile.scm')
-rw-r--r-- | gnu/packages/guile.scm | 207 |
1 files changed, 98 insertions, 109 deletions
diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm index f90ea85999..fffc30f913 100644 --- a/gnu/packages/guile.scm +++ b/gnu/packages/guile.scm @@ -16,6 +16,7 @@ ;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org> ;;; Copyright © 2019 Taylan Kammer <taylan.kammer@gmail.com> ;;; Copyright © 2020, 2021 Efraim Flashner <efraim@flashner.co.il> +;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be> ;;; ;;; This file is part of GNU Guix. ;;; @@ -112,13 +113,11 @@ `(("self" ,this-package)) '())) - (inputs `(("gawk" ,gawk) - ("readline" ,readline))) + (inputs (list gawk readline)) ;; Since `guile-1.8.pc' has "Libs: ... -lgmp -lltdl", these must be ;; propagated. - (propagated-inputs `(("gmp" ,gmp) - ("libltdl" ,libltdl))) + (propagated-inputs (list gmp libltdl)) (native-search-paths (list (search-path-specification @@ -180,6 +179,11 @@ without requiring the source code to be rewritten.") (arguments `(#:configure-flags '("--disable-static") ; saves 3 MiB + + ;; Work around non-reproducible .go files as described in + ;; <https://bugs.gnu.org/20272>, which affects 2.0, 2.2, and 3.0 so far. + #:parallel-build? #f + #:phases (modify-phases %standard-phases ,@(if (hurd-system?) @@ -246,7 +250,8 @@ without requiring the source code to be rewritten.") "013mydzhfswqci6xmyc1ajzd59pfbdak15i0b090nhr9bzm7dxyd")) (modules '((guix build utils))) (patches (search-patches - "guile-2.2-skip-oom-test.patch")) + "guile-2.2-skip-oom-test.patch" + "guile-2.2-skip-so-test.patch")) ;; Remove the pre-built object files. Instead, build everything ;; from source, at the expense of significantly longer build @@ -285,21 +290,71 @@ without requiring the source code to be rewritten.") (package (inherit guile-2.2) (name "guile") - (version "3.0.2") + (version "3.0.7") (source (origin (inherit (package-source guile-2.2)) + (patches '()) ; We no longer need the patches. (uri (string-append "mirror://gnu/guile/guile-" version ".tar.xz")) (sha256 (base32 - "12lziar4j27j9whqp2n18427q45y9ghq7gdd8lqhmj1k0lr7vi2k")))) + "1dwiwsrpm4f96alfnz6wibq378242z4f16vsxgy1n9r00v3qczgm")) + ;; Replace the snippet because the oom-test still + ;; fails on some 32-bit architectures. + (snippet '(begin + (substitute* "test-suite/standalone/Makefile.in" + (("test-out-of-memory") "")) + (for-each delete-file + (find-files "prebuilt" "\\.go$")))))) + + ;; Build with the bundled mini-GMP to avoid interference with GnuTLS' own + ;; use of GMP via Nettle: <https://issues.guix.gnu.org/46330>. + (propagated-inputs + (srfi-1:fold srfi-1:alist-delete + (package-propagated-inputs guile-2.2) + '("gmp" "libltdl"))) (arguments - ;; XXX: JIT-enabled Guile crashes in obscure ways on GNU/Hurd. - (if (hurd-target?) - (substitute-keyword-arguments (package-arguments guile-2.2) - ((#:configure-flags flags ''()) - `(cons "--disable-jit" ,flags))) - (package-arguments guile-2.2))) + (substitute-keyword-arguments (package-arguments guile-2.2) + ((#:configure-flags flags ''()) + ;; XXX: JIT-enabled Guile crashes in obscure ways on GNU/Hurd. + `(cons* ,@(if (hurd-target?) + '("--disable-jit") + '()) + ;; -fexcess-precision=standard is required when compiling for + ;; i686-linux, otherwise "numbers.test" will fail + ;; (see <https://issues.guix.gnu.org/49368> and + ;; <https://issues.guix.gnu.org/49659>). + ,@(if (target-x86-32?) + '("CFLAGS=-g -O2 -fexcess-precision=standard") + '()) + "--enable-mini-gmp" + ,flags)) + ((#:phases phases) + `(modify-phases ,phases + (add-before 'check 'disable-stack-overflow-test + (lambda _ + ;; This test can invoke the "OOM killer", especially when + ;; running on emulated hardware (QEMU). Skip it. + (substitute* "test-suite/standalone/test-stack-overflow" + (("!#") + "!#\n(exit 77)\n")))) + + ,@(if (string-prefix? "powerpc-" (%current-system)) + `((add-after 'unpack 'adjust-bootstrap-flags + (lambda _ + ;; Upstream knows about suggested solution. + ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=45214 + (substitute* "bootstrap/Makefile.in" + (("^GUILE_OPTIMIZATIONS.*") + "GUILE_OPTIMIZATIONS = -O1 -Oresolve-primitives -Ocps\n")))) + (add-after 'unpack 'skip-failing-fdes-test + (lambda _ + ;; ERROR: ((system-error "seek" "~A" ("Bad file descriptor") (9))) + (substitute* "test-suite/tests/ports.test" + (("fdes not closed\"" all) (string-append all "(exit 77)"))) + #t))) + '()))))) + (native-search-paths (list (search-path-specification (variable "GUILE_LOAD_PATH") @@ -310,31 +365,7 @@ without requiring the source code to be rewritten.") "share/guile/site/3.0"))))))) (define-public guile-3.0-latest - ;; TODO: Make this 'guile-3.0' on the next rebuild cycle. - (package - (inherit guile-3.0) - (version "3.0.7") - (source (origin - (inherit (package-source guile-3.0)) ;preserve snippet - (patches '()) - (uri (string-append "mirror://gnu/guile/guile-" - version ".tar.xz")) - (sha256 - (base32 - "1dwiwsrpm4f96alfnz6wibq378242z4f16vsxgy1n9r00v3qczgm")))) - - ;; Build with the bundled mini-GMP to avoid interference with GnuTLS' own - ;; use of GMP via Nettle: <https://issues.guix.gnu.org/46330>. Use - ;; LIBGC/DISABLE-MUNMAP to work around <https://bugs.gnu.org/40525>. - ;; Remove libltdl, which is no longer used. - (propagated-inputs - `(("bdw-gc" ,libgc/disable-munmap) - ,@(srfi-1:fold srfi-1:alist-delete (package-propagated-inputs guile-3.0) - '("gmp" "libltdl" "bdw-gc")))) - (arguments - (substitute-keyword-arguments (package-arguments guile-3.0) - ((#:configure-flags flags ''()) - `(cons "--enable-mini-gmp" ,flags)))))) + guile-3.0) (define-public guile-3.0/libgc-7 ;; Using libgc-7 avoid crashes that can occur, particularly when loading @@ -386,14 +417,14 @@ without requiring the source code to be rewritten.") (delete-file "test-suite/tests/version.test") #t)))))) (native-inputs - `(("autoconf" ,autoconf) - ("automake" ,automake) - ("libtool" ,libtool) - ("flex" ,flex) - ("gettext" ,gnu-gettext) - ("texinfo" ,texinfo) - ("gperf" ,gperf) - ,@(package-native-inputs guile-3.0))) + (modify-inputs (package-native-inputs guile-3.0) + (prepend autoconf + automake + libtool + flex + gnu-gettext + texinfo + gperf))) (synopsis "Development version of GNU Guile")))) (define* (make-guile-readline guile #:optional (name "guile-readline")) @@ -403,7 +434,8 @@ without requiring the source code to be rewritten.") (source (package-source guile)) (build-system gnu-build-system) (arguments - '(#:configure-flags '("--disable-silent-rules") + '(#:configure-flags '("--disable-silent-rules" + "--enable-mini-gmp") ;for Guile >= 3.0.6 #:phases (modify-phases %standard-phases (add-before 'build 'chdir (lambda* (#:key outputs #:allow-other-keys) @@ -578,9 +610,8 @@ GNU@tie{}Guile. Use the @code{(ice-9 readline)} module and call its (build-system gnu-build-system) (arguments `(#:make-flags '("GUILE_AUTO_COMPILE=0"))) ;to prevent guild warnings - (native-inputs `(("pkg-config" ,pkg-config) - ("guile" ,guile-2.2))) - (inputs `(("guile" ,guile-2.2))) + (native-inputs (list pkg-config guile-2.2)) + (inputs (list guile-2.2)) (synopsis "JSON module for Guile") (description "Guile-JSON supports parsing and building JSON documents according to the @@ -618,9 +649,8 @@ specification. These are the main features: (sha256 (base32 "0nj0684qgh6ppkbdyxqfyjwsv2qbyairxpi8fzrhsi3xnc7jn4im")))) - (native-inputs `(("pkg-config" ,pkg-config) - ("guile" ,guile-3.0))) - (inputs `(("guile" ,guile-3.0))))) + (native-inputs (list pkg-config guile-3.0)) + (inputs (list guile-3.0)))) (define-public guile3.0-json (deprecated-package "guile3.0-json" guile-json-3)) @@ -679,10 +709,8 @@ specification. These are the main features: (format #f "(dynamic-link \"~a/lib/libgdbm.so\")" (assoc-ref inputs "gdbm")))) #t))))) - (native-inputs - `(("guile" ,guile-3.0))) - (inputs - `(("gdbm" ,gdbm))) + (native-inputs (list guile-3.0)) + (inputs (list gdbm)) (home-page "https://github.com/ijp/guile-gdbm") (synopsis "Guile bindings to the GDBM library via Guile's FFI") (description @@ -713,14 +741,8 @@ Guile's foreign function interface.") "1nryy9j3bk34i0alkmc9bmqsm0ayz92k1cdf752mvhyjjn8nr928")) (file-name (string-append name "-" version "-checkout")))) (build-system gnu-build-system) - (native-inputs - `(("autoconf" ,autoconf) - ("automake" ,automake) - ("guile" ,guile-3.0) - ("pkg-config" ,pkg-config))) - (inputs - `(("guile" ,guile-3.0) - ("sqlite" ,sqlite))) + (native-inputs (list autoconf automake guile-3.0 pkg-config)) + (inputs (list guile-3.0 sqlite)) (synopsis "Access SQLite databases from Guile") (description "This package provides Guile bindings to the SQLite database system.") @@ -760,13 +782,8 @@ Guile's foreign function interface.") (doc (string-append out "/share/doc/" package))) (install-file "README.md" doc) #t)))))) - (native-inputs - `(("autoconf" ,autoconf) - ("automake" ,automake) - ("pkg-config" ,pkg-config) - ("guile" ,guile-3.0))) - (inputs - `(("guile" ,guile-3.0))) + (native-inputs (list autoconf automake pkg-config guile-3.0)) + (inputs (list guile-3.0)) (synopsis "Structured access to bytevector contents for Guile") (description "Guile bytestructures offers a system imitating the type system @@ -803,17 +820,11 @@ type system, elevating types to first-class status.") (arguments `(#:make-flags '("GUILE_AUTO_COMPILE=0"))) ; to prevent guild warnings (native-inputs - `(("pkg-config" ,pkg-config) - ("autoconf" ,autoconf) - ("automake" ,automake) - ("texinfo" ,texinfo) - ("guile" ,guile-3.0) - ("guile-bytestructures" ,guile-bytestructures))) + (list pkg-config autoconf automake texinfo guile-3.0 guile-bytestructures)) (inputs - `(("guile" ,guile-3.0) - ("libgit2" ,libgit2))) + (list guile-3.0 libgit2)) (propagated-inputs - `(("guile-bytestructures" ,guile-bytestructures))) + (list guile-bytestructures)) (synopsis "Guile bindings for libgit2") (description "This package provides Guile bindings to libgit2, a library to @@ -850,16 +861,8 @@ manipulate repositories of the Git version control system.") (arguments '(#:make-flags '("GUILE_AUTO_COMPILE=0"))) ;to prevent guild warnings - (native-inputs - `(("autoconf" ,autoconf) - ("automake" ,automake) - ("pkg-config" ,pkg-config) - ,@(if (%current-target-system) - `(("guile" ,guile-3.0)) ;for 'guild compile' and 'guile-3.0.pc' - '()))) - (inputs - `(("guile" ,guile-3.0) - ("zlib" ,zlib))) + (native-inputs (list autoconf automake pkg-config guile-3.0)) + (inputs (list guile-3.0 zlib)) (synopsis "Guile bindings to zlib") (description "This package provides Guile bindings for zlib, a lossless @@ -889,16 +892,8 @@ Guile's foreign function interface.") (arguments '(#:make-flags '("GUILE_AUTO_COMPILE=0"))) ;to prevent guild warnings - (native-inputs - `(("autoconf" ,autoconf) - ("automake" ,automake) - ("pkg-config" ,pkg-config) - ,@(if (%current-target-system) - `(("guile" ,guile-3.0)) ;for 'guild compile' and 'guile-3.0.pc' - '()))) - (inputs - `(("guile" ,guile-3.0) - ("lzlib" ,lzlib))) + (native-inputs (list autoconf automake pkg-config guile-3.0)) + (inputs (list guile-3.0 lzlib)) (synopsis "Guile bindings to lzlib") (description "This package provides Guile bindings for lzlib, a C library for @@ -924,14 +919,8 @@ pure Scheme by using Guile's foreign function interface.") (base32 "1c8l7829b5yx8wdc0mrhzjfwb6h9hb7cd8dfxcr71a7vlsi86310")))) (build-system gnu-build-system) - (native-inputs - `(("autoconf" ,autoconf) - ("automake" ,automake) - ("pkg-config" ,pkg-config) - ("guile" ,guile-3.0))) - (inputs - `(("zstd" ,zstd "lib") - ("guile" ,guile-3.0))) + (native-inputs (list autoconf automake pkg-config guile-3.0)) + (inputs (list `(,zstd "lib") guile-3.0)) (synopsis "GNU Guile bindings to the zstd compression library") (description "This package provides a GNU Guile interface to the zstd (``zstandard'') |