diff options
Diffstat (limited to 'gnu/packages/guile.scm')
-rw-r--r-- | gnu/packages/guile.scm | 248 |
1 files changed, 167 insertions, 81 deletions
diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm index b654bbc96e..53304bd1a4 100644 --- a/gnu/packages/guile.scm +++ b/gnu/packages/guile.scm @@ -7,12 +7,13 @@ ;;; Copyright © 2016 Erik Edrosa <erik.edrosa@gmail.com> ;;; Copyright © 2016 Eraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2016, 2017 Alex Kost <alezost@gmail.com> -;;; Copyright © 2016 Adonay "adfeno" Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno@openmailbox.org> +;;; Copyright © 2016, 2017 Adonay "adfeno" Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno@openmailbox.org> ;;; Copyright © 2016 Amirouche <amirouche@hypermove.net> ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org> ;;; Copyright © 2017 Andy Wingo <wingo@igalia.com> ;;; Copyright © 2017 David Thompson <davet@gnu.org> ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com> +;;; Copyright © 2017 Theodoros Foradis <theodoros.for@openmailbox.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -153,7 +154,11 @@ without requiring the source code to be rewritten.") (inputs `(("libffi" ,libffi) ("readline" ,readline) ,@(libiconv-if-needed) - ,@(if (target-mingw?) '() `(("bash" ,bash))))) + + ;; We need Bash when cross-compiling because some of the scripts + ;; in bin/ refer to it. Use 'bash-minimal' because we don't need + ;; an interactive Bash with Readline and all. + ,@(if (target-mingw?) '() `(("bash" ,bash-minimal))))) (propagated-inputs `( ;; These ones aren't normally needed here, but since `libguile-2.0.la' ;; reads `-lltdl -lunistring', adding them here will add the needed @@ -212,24 +217,20 @@ without requiring the source code to be rewritten.") (home-page "https://www.gnu.org/software/guile/") (license license:lgpl3+))) -(define-public guile-2.0/fixed - ;; A package of Guile 2.0 that's rarely changed. It is the one used - ;; in the `base' module, and thus changing it entails a full rebuild. - (package - (inherit guile-2.0) - (properties '((hidden? . #t))))) ;people should install 'guile-2.0' - (define-public guile-2.2 (package (inherit guile-2.0) (name "guile") (version "2.2.2") (source (origin (method url-fetch) + + ;; Note: we are limited to one of the compression formats + ;; supported by the bootstrap binaries, so no lzip here. (uri (string-append "mirror://gnu/guile/guile-" version - ".tar.lz")) + ".tar.xz")) (sha256 (base32 - "1dnh75h4rkx1zflpsngznkwcd6afn6zrc5x3xq7n946pm5bnx5bq")) + "1azm25zcmxif0skxfrp11d2wc89nrzpjaann9yxdw6pvjxhs948w")) (modules '((guix build utils))) ;; Remove the pre-built object files. Instead, build everything @@ -249,6 +250,17 @@ without requiring the source code to be rewritten.") (files '("lib/guile/2.2/site-ccache" "share/guile/site/2.2"))))))) +(define-public guile-2.2/fixed + ;; A package of Guile 2.2 that's rarely changed. It is the one used + ;; in the `base' module, and thus changing it entails a full rebuild. + (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))) + (define-public guile-next (deprecated-package "guile-next" guile-2.2)) @@ -383,55 +395,81 @@ program can be installed in one go.") ;;; (define-public artanis - (package - (name "artanis") - (version "0.2.1") - (source (origin - (method url-fetch) - (uri (string-append "mirror://gnu/artanis/artanis-" - version ".tar.gz")) - (sha256 - (base32 - "041ajcg2pz918kd9iqcj4inpzddc3impvz3r2nhlpbv8zrz011hn")))) - (build-system gnu-build-system) - ;; TODO: Add guile-dbi and guile-dbd optional dependencies. - (inputs `(("guile" ,guile-2.2))) - (native-inputs `(("bash" ,bash) ;for the `source' builtin - ("pkgconfig" ,pkg-config) - ("util-linux" ,util-linux))) ;for the `script' command - (arguments - '(#:make-flags - ;; TODO: The documentation must be built with the `docs' target. - (let* ((out (assoc-ref %outputs "out")) - (scm (string-append out "/share/guile/site/2.2")) - (go (string-append out "/lib/guile/2.2/site-ccache"))) - ;; Don't use (%site-dir) for site paths. - (list (string-append "MOD_PATH=" scm) - (string-append "MOD_COMPILED_PATH=" go))) - #:test-target "test" - #:phases - (modify-phases %standard-phases - (add-before 'install 'substitute-root-dir - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (substitute* "Makefile" ;ignore the execution of bash.bashrc - ((" /etc/bash.bashrc") " /dev/null")) - (substitute* "Makefile" ;set the root of config files to OUT - ((" /etc") (string-append " " out "/etc"))) - (mkdir-p (string-append out "/bin")) ;for the `art' executable - #t))) - (add-after 'install 'wrap-art - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (bin (string-append out "/bin")) - (scm (string-append out "/share/guile/site/2.2")) - (go (string-append out "/lib/guile/2.2/site-ccache"))) - (wrap-program (string-append bin "/art") - `("GUILE_LOAD_PATH" ":" prefix (,scm)) - `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,go))) - #t)))))) - (synopsis "Web application framework written in Guile") - (description "GNU Artanis is a web application framework written in Guile + (let ((release "0.2.1") + (revision 3)) + (package + (name "artanis") + (version (if (zero? revision) + release + (string-append release "-" + (number->string revision)))) + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/artanis/artanis-" + release ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "041ajcg2pz918kd9iqcj4inpzddc3impvz3r2nhlpbv8zrz011hn")) + (modules '((guix build utils))) + (snippet + '(begin + (delete-file-recursively "artanis/third-party/json.scm") + (delete-file-recursively "artanis/third-party/json") + (substitute* '("artanis/artanis.scm" + "artanis/oht.scm") + (("(#:use-module \\()artanis third-party (json\\))" _ + use-module json) + (string-append use-module json))) + (substitute* "artanis/oht.scm" + (("([[:punct:][:space:]]+)(->json-string)([[:punct:][:space:]]+)" + _ pre json-string post) + (string-append pre + "scm" json-string + post))) + (substitute* "artanis/artanis.scm" + (("[[:punct:][:space:]]+->json-string[[:punct:][:space:]]+") + "")))))) + (build-system gnu-build-system) + ;; TODO: Add guile-dbi and guile-dbd optional dependencies. + (inputs `(("guile" ,guile-2.2) + ("guile-json" ,guile-json))) + (native-inputs `(("bash" ,bash) ;for the `source' builtin + ("pkgconfig" ,pkg-config) + ("util-linux" ,util-linux))) ;for the `script' command + (arguments + '(#:make-flags + ;; TODO: The documentation must be built with the `docs' target. + (let* ((out (assoc-ref %outputs "out")) + (scm (string-append out "/share/guile/site/2.2")) + (go (string-append out "/lib/guile/2.2/site-ccache"))) + ;; Don't use (%site-dir) for site paths. + (list (string-append "MOD_PATH=" scm) + (string-append "MOD_COMPILED_PATH=" go))) + #:test-target "test" + #:phases + (modify-phases %standard-phases + (add-before 'install 'substitute-root-dir + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (substitute* "Makefile" ;ignore the execution of bash.bashrc + ((" /etc/bash.bashrc") " /dev/null")) + (substitute* "Makefile" ;set the root of config files to OUT + ((" /etc") (string-append " " out "/etc"))) + (mkdir-p (string-append out "/bin")) ;for the `art' executable + #t))) + (add-after 'install 'wrap-art + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (scm (string-append out "/share/guile/site/2.2")) + (go (string-append out "/lib/guile/2.2/site-ccache"))) + (wrap-program (string-append bin "/art") + `("GUILE_LOAD_PATH" ":" prefix (,scm)) + `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,go))) + #t)))))) + (synopsis "Web application framework written in Guile") + (description "GNU Artanis is a web application framework written in Guile Scheme. A web application framework (WAF) is a software framework that is designed to support the development of dynamic websites, web applications, web services and web resources. The framework aims to alleviate the overhead @@ -439,8 +477,8 @@ associated with common activities performed in web development. Artanis provides several tools for web development: database access, templating frameworks, session management, URL-remapping for RESTful, page caching, and more.") - (home-page "https://www.gnu.org/software/artanis/") - (license (list license:gpl3+ license:lgpl3+)))) ;dual license + (home-page "https://www.gnu.org/software/artanis/") + (license (list license:gpl3+ license:lgpl3+))))) ;dual license (define-public guile-reader (package @@ -519,6 +557,13 @@ many readers as needed).") library.") (license license:lgpl3+))) +(define-public guile-ncurses/gpm + (package + (inherit guile-ncurses) + (name "guile-ncurses-with-gpm") + (inputs `(("ncurses" ,ncurses/gpm) + ("guile" ,guile-2.2))))) + (define-public mcron (package (name "mcron") @@ -1339,20 +1384,21 @@ capabilities.") (native-inputs `(("pkg-config" ,pkg-config))) (propagated-inputs - `(("guile" ,guile-2.0) + `(("guile" ,guile-2.2) ("guile-lib" ,guile-lib))) (inputs `(("libffi" ,libffi))) (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'configure 'pre-configure - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (substitute* (find-files "." "^Makefile.in$") - (("guilemoduledir =.*guile/site" all) - (string-append all "/2.0"))) - #t)))))) + `(#:configure-flags '("--disable-Werror") + #:phases + (modify-phases %standard-phases + (add-before 'configure 'pre-configure + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (substitute* (find-files "." "^Makefile.in$") + (("guilemoduledir =.*guile/site" all) + (string-append all "/@GUILE_EFFECTIVE_VERSION@"))) + #t)))))) (synopsis "Generate C bindings for Guile") (description "G-Wrap is a tool and Guile library for generating function wrappers for inter-language calls. It currently only supports generating Guile @@ -1534,16 +1580,28 @@ is no support for parsing block and inline level HTML.") (file-name (string-append name "-" version "-checkout")) (sha256 (base32 - "04lgh0nk6ddnwgh20hnz4pyhczaik0xbd50kikjsxcwcl46shavb")))) + "04lgh0nk6ddnwgh20hnz4pyhczaik0xbd50kikjsxcwcl46shavb")) + (patches (search-patches "guile-bytestructures-name-clash.patch")))) (build-system trivial-build-system) (arguments `(#:modules ((guix build utils)) #:builder (begin (use-modules (guix build utils) + (ice-9 ftw) (ice-9 match) (ice-9 popen) (ice-9 rdelim)) + ;; Unpack. + (setenv "PATH" + (string-join (list (assoc-ref %build-inputs "tar") + (assoc-ref %build-inputs "xz")) + "/bin:" 'suffix)) + (system* "tar" "xf" (assoc-ref %build-inputs "source")) + (match (scandir ".") + (("." ".." directory) + (chdir directory))) + (let* ((out (assoc-ref %outputs "out")) (guile (assoc-ref %build-inputs "guile")) (effective (read-line @@ -1552,7 +1610,9 @@ is no support for parsing block and inline level HTML.") "-c" "(display (effective-version))"))) (module-dir (string-append out "/share/guile/site/" effective)) - (source (assoc-ref %build-inputs "source")) + (object-dir (string-append out "/lib/guile/" effective + "/site-ccache")) + (source (getcwd)) (doc (string-append out "/share/doc/scheme-bytestructures")) (sld-files (with-directory-excursion source (find-files "bytestructures/r7" "\\.exports.sld$"))) @@ -1571,7 +1631,7 @@ is no support for parsing block and inline level HTML.") (for-each (lambda (file) (let* ((dest-file (string-append module-dir "/" file)) - (go-file (string-append module-dir "/" + (go-file (string-append object-dir "/" (substring file 0 (string-rindex file #\.)) ".go"))) @@ -1592,6 +1652,9 @@ is no support for parsing block and inline level HTML.") ;; Also copy over the README. (install-file "README.md" doc) #t)))) + (native-inputs + `(("tar" ,tar) + ("xz" ,xz))) (inputs `(("guile" ,guile-2.2))) (home-page "https://github.com/TaylanUB/scheme-bytestructures") @@ -1604,6 +1667,9 @@ an abstraction over raw memory. It's also more powerful than the C type system, elevating types to first-class status.") (license license:gpl3+))) +(define-public guile2.0-bytestructures + (package-for-guile-2.0 guile-bytestructures)) + (define-public guile-aspell (package (name "guile-aspell") @@ -1687,7 +1753,11 @@ dictionary and suggesting spelling corrections.") ("automake" ,automake) ("libtool" ,libtool) ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'. - ("gettext" ,gettext-minimal))) + ("gettext" ,gettext-minimal) + + ;; Bash with loadable module support, for the test + ;; suite. + ("bash-full" ,bash))) (inputs `(("guile" ,guile-2.0) ("bash:include" ,bash "include"))) (synopsis "Extend Bash using Guile") @@ -1780,8 +1850,8 @@ is not available for Guile 2.0.") (license license:lgpl3+))) (define-public guile-git - (let ((revision "2") - (commit "06f9fc3d9ac95798d4a51e6310f7b594ce5597e0")) + (let ((revision "3") + (commit "e156a1054cc1d9e58d9be82e36e8acf5c9f9ee8d")) (package (name "guile-git") (version (string-append "0.0-" revision "." (string-take commit 7))) @@ -1791,17 +1861,30 @@ is not available for Guile 2.0.") (uri (git-reference (url home-page) (commit commit))) (sha256 (base32 - "0rcq0f8dhl89ia7336bq8y279q5ada0b1kabcqw9zl3125k3cp4v")) + "1vhr2bqkljy1zzdy02dky2nk1w9bd46afj5wd4gp4kr333pz4ch6")) (file-name (git-file-name name version)))) (build-system gnu-build-system) (arguments - '(#:phases (modify-phases %standard-phases + `(#:phases (modify-phases %standard-phases (add-after 'unpack 'bootstrap (lambda _ - (zero? (system* "autoreconf" "-vfi"))))))) + (zero? (system* "autoreconf" "-vfi")))) + + ;; FIXME: On i686, bytestructures miscalculates the offset + ;; of the 'old-file' and 'new-file' fields within the + ;; '%diff-delta' structure. + ,@(if (string=? (%current-system) "x86_64-linux") + '() + '((add-before 'check 'skip-tests + (lambda _ + (substitute* "Makefile" + (("tests/status\\.scm") + "")) + #t))))))) (native-inputs `(("autoconf" ,autoconf) ("automake" ,automake) + ("texinfo" ,texinfo) ("pkg-config" ,pkg-config))) (inputs `(("guile" ,guile-2.2) @@ -1814,6 +1897,9 @@ is not available for Guile 2.0.") manipulate repositories of the Git version control system.") (license license:gpl3+)))) +(define-public guile2.0-git + (package-for-guile-2.0 guile-git)) + (define-public guile-syntax-highlight (let ((commit "a047675e66861b647426372aa2ba7820f749616d") (revision "0")) |