diff options
Diffstat (limited to 'gnu/packages/guile.scm')
-rw-r--r-- | gnu/packages/guile.scm | 143 |
1 files changed, 75 insertions, 68 deletions
diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm index 2af6f875e9..c9497225a9 100644 --- a/gnu/packages/guile.scm +++ b/gnu/packages/guile.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org> -;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> +;;; Copyright © 2014, 2015, 2018 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2015, 2017 Christopher Allan Webber <cwebber@dustycloud.org> ;;; Copyright © 2016 Alex Sassmannshausen <alex@pompo.co> ;;; Copyright © 2016, 2017 Ricardo Wurmus <rekado@elephly.net> @@ -15,7 +15,7 @@ ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com> ;;; Copyright © 2017 Theodoros Foradis <theodoros@foradis.org> ;;; Copyright © 2017 Nils Gillmann <ng0@n0.is> -;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr> +;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2018 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; ;;; This file is part of GNU Guix. @@ -182,23 +182,24 @@ without requiring the source code to be rewritten.") (outputs '("out" "debug")) (arguments - `(#:configure-flags '("--disable-static") ;saves 3MiB - #:phases (alist-cons-before - 'configure 'pre-configure - (lambda* (#:key inputs #:allow-other-keys) - ;; Tell (ice-9 popen) the file name of Bash. - (let ((bash (assoc-ref inputs "bash"))) - (substitute* "module/ice-9/popen.scm" - ;; If bash is #f allow fallback for user to provide - ;; "bash" in PATH. This happens when cross-building to - ;; MinGW for which we do not have Bash yet. - (("/bin/sh") - ,@(if (target-mingw?) - '((if bash - (string-append bash "/bin/bash") - "bash")) - '((string-append bash "/bin/bash"))))))) - %standard-phases))) + `(#:configure-flags '("--disable-static") ; saves 3 MiB + #:phases + (modify-phases %standard-phases + (add-before 'configure 'pre-configure + (lambda* (#:key inputs #:allow-other-keys) + ;; Tell (ice-9 popen) the file name of Bash. + (let ((bash (assoc-ref inputs "bash"))) + (substitute* "module/ice-9/popen.scm" + ;; If bash is #f allow fallback for user to provide + ;; "bash" in PATH. This happens when cross-building to + ;; MinGW for which we do not have Bash yet. + (("/bin/sh") + ,@(if (target-mingw?) + '((if bash + (string-append bash "/bin/bash") + "bash")) + '((string-append bash "/bin/bash"))))) + #t)))))) (native-search-paths (list (search-path-specification @@ -238,8 +239,10 @@ without requiring the source code to be rewritten.") ;; Remove the pre-built object files. Instead, build everything ;; from source, at the expense of significantly longer build ;; times (almost 3 hours on a 4-core Intel i5). - (snippet '(for-each delete-file - (find-files "prebuilt" "\\.go$"))))) + (snippet '(begin + (for-each delete-file + (find-files "prebuilt" "\\.go$")) + #t)))) (properties '((timeout . 72000) ;20 hours (max-silent-time . 36000))) ;10 hours (needed on ARM ; when heavily loaded) @@ -275,10 +278,9 @@ without requiring the source code to be rewritten.") (package (inherit guile-2.2) (properties '((hidden? . #t) ;people should install 'guile-2.2' - (timeout . 72000) ;20 hours - (max-silent-time . 36000))) ;10 hours (needed on ARM - ; when heavily loaded) - (replacement #f))) + (timeout . 72000) ;20 hours + (max-silent-time . 36000))))) ;10 hours (needed on ARM + ; when heavily loaded) (define-public guile-2.2.2 ;; Keep it so that, when 'guix' runs on 2.2.2, 'guix pull' compiles objects @@ -523,7 +525,8 @@ program can be installed in one go.") post))) (substitute* "artanis/artanis.scm" (("[[:punct:][:space:]]+->json-string[[:punct:][:space:]]+") - "")))))) + "")) + #t)))) (build-system gnu-build-system) ;; TODO: Add guile-dbi and guile-dbd optional dependencies. (inputs `(("guile" ,guile-2.2) @@ -825,7 +828,8 @@ for Guile\".") "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n")) (substitute* '("Makefile.in" "json/Makefile.in") (("moddir =.*/share/guile/site" all) - (string-append all "/@GUILE_EFFECTIVE_VERSION@"))))))) + (string-append all "/@GUILE_EFFECTIVE_VERSION@"))) + #t)))) (build-system gnu-build-system) (native-inputs `(("guile" ,guile-2.2))) (home-page "https://savannah.nongnu.org/projects/guile-json/") @@ -904,16 +908,15 @@ specification. These are the main features: ;; Install source module. (copy-file file dest-file) ;; Install compiled module. - (unless (zero? (system* guild "compile" - "-L" source - "-o" go-file - file)) - (error (format #f "Failed to compile ~s to ~s!" - file go-file))))) + (invoke guild "compile" + "-L" source + "-o" go-file + file))) scm-files) ;; Also copy over the README. (install-file "README.org" doc) + #t)))) (inputs `(("guile" ,guile-2.0))) @@ -1059,12 +1062,10 @@ understand, extend, and port to host languages other than Scheme.") (copy-file src-file dest-file) ;; Install compiled module. - (unless (zero? (system* guild "compile" - "-L" (getcwd) - "-o" go-file - src-file)) - (error (format #f "Failed to compile ~s to ~s!" - src-file dest-file))))))) + (invoke guild "compile" + "-L" (getcwd) + "-o" go-file + src-file))))) '(("irregex-guile.scm" "/rx/irregex") ("irregex.scm" "/rx/source/irregex") ;; Not really reachable via guile's packaging system, @@ -1104,6 +1105,15 @@ inspired by the SCSH regular expression system.") (base32 "1j8wrsw7v9w6qkl47xz0rdikg50v16nn6kbs3lgzcymjzpa7babj")))) (build-system trivial-build-system) + (inputs + `(("guile" ,guile-2.2) + ;; patch-and-repack doesn't work for git checkouts, + ;; so we must apply the patch manually. + ("patch" ,patch) + ("patch-file" ,(search-patch + "guile-gdbm-ffi-support-gdbm-1.14.patch")))) + (propagated-inputs + `(("gdbm" ,gdbm))) (arguments `(#:modules ((guix build utils)) @@ -1136,7 +1146,7 @@ inspired by the SCSH regular expression system.") (string-append module-dir "/gdbm.go")) (compile-file (lambda (in-file out-file) - (system* guild "compile" "-o" out-file in-file)))) + (invoke guild "compile" "-o" out-file in-file)))) ;; Switch directory for compiling and installing (chdir source) @@ -1156,12 +1166,18 @@ inspired by the SCSH regular expression system.") (format #f "(dynamic-link \"~a/lib/libgdbm.so\")" (assoc-ref %build-inputs "gdbm")))) + ;; Apply the patch to add support for gdbm-1.14. + (let ((patch-command (string-append (assoc-ref %build-inputs "patch") + "/bin/patch")) + (patch-file (assoc-ref %build-inputs "patch-file"))) + (with-directory-excursion (dirname gdbm.scm-dest) + (format #t "applying '~a'...~%" patch-file) + (invoke patch-command "--force" "--input" patch-file))) + ;; compile to the destination - (compile-file gdbm.scm-dest gdbm.go-dest))))) - (inputs - `(("guile" ,guile-2.2))) - (propagated-inputs - `(("gdbm" ,gdbm))) + (compile-file gdbm.scm-dest gdbm.go-dest) + + #t)))) (home-page "https://github.com/ijp/guile-gdbm") (synopsis "Guile bindings to the GDBM library via Guile's FFI") (description @@ -1198,9 +1214,11 @@ Guile's foreign function interface.") (modules '((guix build utils))) (snippet ;; Upgrade 'Makefile.am' to the current way of doing things. - '(substitute* "Makefile.am" - (("TESTS_ENVIRONMENT") - "TEST_LOG_COMPILER"))))) + '(begin + (substitute* "Makefile.am" + (("TESTS_ENVIRONMENT") + "TEST_LOG_COMPILER")) + #t)))) (build-system gnu-build-system) (native-inputs @@ -1346,7 +1364,8 @@ above command-line parameters.") "redis/Makefile.in" "redis/commands/Makefile.in") (("moddir =.*/share/guile/site" all) - (string-append all "/@GUILE_EFFECTIVE_VERSION@"))))))) + (string-append all "/@GUILE_EFFECTIVE_VERSION@"))) + #t)))) (build-system gnu-build-system) (native-inputs `(("guile" ,guile-2.0))) @@ -1459,7 +1478,8 @@ users and in some situations.") (("godir = .*$") (string-append "godir = " - "$(prefix)/lib/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n"))))))) + "$(prefix)/lib/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n"))) + #t)))) (build-system gnu-build-system) (arguments '(#:configure-flags @@ -1713,7 +1733,8 @@ you send to a FIFO file.") "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n")) (substitute* "Makefile.in" (("/site/2.0") - "/site/@GUILE_EFFECTIVE_VERSION@")))))) + "/site/@GUILE_EFFECTIVE_VERSION@")) + #t)))) (build-system gnu-build-system) (inputs `(("guile" ,guile-2.2))) @@ -1823,12 +1844,7 @@ dictionary and suggesting spelling corrections.") (file-name (string-append name "-" version "-checkout")))) (build-system gnu-build-system) (arguments - '(#:phases (modify-phases %standard-phases - (add-after 'unpack 'bootstrap - (lambda _ - (zero? (system* "sh" "bootstrap"))))) - - #:configure-flags + '(#:configure-flags ;; Add -I to match 'bash.pc' of Bash 4.4. (list (string-append "CPPFLAGS=-I" (assoc-ref %build-inputs "bash:include") @@ -1958,10 +1974,6 @@ is not available for Guile 2.0.") (build-system gnu-build-system) (arguments `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'bootstrap - (lambda _ - (zero? (system* "autoreconf" "-vfi")))) - ;; FIXME: On i686, bytestructures miscalculates the offset ;; of the 'old-file' and 'new-file' fields within the ;; '%diff-delta' structure. See @@ -2011,8 +2023,8 @@ manipulate repositories of the Git version control system.") `(("pkg-config" ,pkg-config))) (inputs `(("guile" ,guile-2.2))) - (synopsis "General-purpose syntax highlighter for GNU Guile") - (description "Guile-syntax-highlight is a general-purpose syntax + (synopsis "General-purpose syntax highlighter for GNU Guile") + (description "Guile-syntax-highlight is a general-purpose syntax highlighting library for GNU Guile. It can parse code written in various programming languages into a simple s-expression that can be converted to HTML (via SXML) or any other format for rendering.") @@ -2031,11 +2043,6 @@ HTML (via SXML) or any other format for rendering.") (base32 "1mzmapln79vv10qxaggz9qwcdbag3jnrj19xx8bgkmxss8h03sv3")))) (build-system gnu-build-system) - (arguments - '(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'bootstrap - (lambda _ (zero? (system* "sh" "bootstrap.sh"))))))) (native-inputs `(("autoconf" ,autoconf) ("automake" ,automake) |