diff options
Diffstat (limited to 'gnu/packages/chez.scm')
-rw-r--r-- | gnu/packages/chez.scm | 160 |
1 files changed, 94 insertions, 66 deletions
diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm index cc0326bbbd..43fba78225 100644 --- a/gnu/packages/chez.scm +++ b/gnu/packages/chez.scm @@ -25,12 +25,12 @@ (define-module (gnu packages chez) #:use-module (gnu packages) - #:use-module ((guix licenses) - #:select (gpl2+ gpl3+ lgpl2.0+ lgpl2.1+ asl2.0 bsd-3 expat - public-domain)) + #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix deprecation) #:use-module (guix download) + #:use-module (guix diagnostics) + #:use-module (guix i18n) #:use-module (guix git-download) #:use-module (guix utils) #:use-module (guix gexp) @@ -51,6 +51,7 @@ #:use-module (ice-9 match) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) + #:use-module (srfi srfi-34) #:export (chez-scheme-for-system nix-system->native-chez-machine-type nix-system->pbarch-machine-type @@ -176,7 +177,7 @@ in Chez Scheme machine types, or '#f' if none is defined." ((_ any id0 id ...) #`(define #,(datum->syntax #'id0 '%machine-types) '(id0 id ...)))))) -;; The following is copied from s/cmacros.ss, line 36, in the Chez source +;; The following is copied from s/cmacros.ss, line 376, in the Chez source (define-machine-types any pb tpb @@ -195,6 +196,7 @@ in Chez Scheme machine types, or '#f' if none is defined." i3gnu ti3gnu a6nt ta6nt a6osx ta6osx + a6ios ta6ios a6le ta6le a6fb ta6fb a6ob ta6ob @@ -211,6 +213,7 @@ in Chez Scheme machine types, or '#f' if none is defined." arm32nb tarm32nb arm64nt tarm64nt arm64osx tarm64osx + arm64ios tarm64ios arm64le tarm64le arm64fb tarm64fb arm64ob tarm64ob @@ -299,7 +302,7 @@ will name the threaded machine type unless THREADS? is provided as #f." (name "chez-scheme-for-racket") ;; The version should match `(scheme-version #t)`. ;; See s/cmacros.ss c. line 360. - (version "10.2.0-pre-release.2") + (version "10.3.0-pre-release.2") ; expect a chez-nanopass-bootstrap update (source #f) (build-system gnu-build-system) (inputs `(,@(if (nix-system->native-chez-machine-type) @@ -496,7 +499,7 @@ will name the threaded machine type unless THREADS? is provided as #f." "This is the precise pre-release version of Chez Scheme from a specific Racket release. It is used to build Racket and to bootstrap the released version of Chez Scheme.") - (license asl2.0))) + (license license:asl2.0))) (define-public chez-scheme (package @@ -504,7 +507,7 @@ version of Chez Scheme.") (name "chez-scheme") ;; The version should match `(scheme-version-number #t)`. ;; See s/cmacros.ss c. line 360. - (version "10.2.0") + (version "10.2.0") ; expect a chez-nanopass-bootstrap update (source (origin (method git-fetch) (uri (git-reference @@ -548,7 +551,7 @@ modules, and much more. Chez Scheme compiles source expressions incrementally to machine code, providing the speed of compiled code in an interactive system. The system is intended to be as reliable and efficient as possible, with reliability taking precedence over efficiency if necessary.") - (license asl2.0))) + (license license:asl2.0))) ;; ;; Bootfiles: @@ -637,7 +640,7 @@ Scheme compiler purely from source into Racket and apply the compiler to itself, thus bootstrapping Chez Scheme. Bootstrapping takes about 10 times as long as using an existing Chez Scheme, but @code{cs-bootstrap} supports Racket 7.1 and later, including the Racket BC variant.") - (license asl2.0))) + (license license:asl2.0))) (define-public chez-scheme-bootstrap-bootfiles (package @@ -691,7 +694,7 @@ This package provides boot files for the released version of Chez Scheme bootstrapped by @code{chez-scheme-for-racket}. Chez Scheme 9.5.4 or any later version can be used for bootstrapping. Guix ultimately uses the Racket package @code{cs-bootstrap} to bootstrap its initial version of Chez Scheme.") - (license asl2.0))) + (license license:asl2.0))) ;; ;; Chez's bootstrap dependencies: @@ -825,7 +828,7 @@ convert @code{stex} documents to LaTeX and HTML, respectively, plus makefile templates, style files, and other resources. The @code{stex} system is used to typeset @cite{The Scheme Programming Language} and the @cite{Chez Scheme User's Guix}, among other documents.") - (license expat))))) + (license license:expat))))) (define-public stex (package/inherit stex-bootstrap @@ -839,6 +842,7 @@ User's Guix}, among other documents.") (package (name "chez-nanopass") (version "1.9.2") + (properties `((chez-nanopass-release-date . "October 18, 2020"))) (source (origin (method git-fetch) @@ -857,10 +861,60 @@ User's Guix}, among other documents.") (("include ~/stex/Mf-stex") "include $(STEXLIB)/Mf-stex")))))) (build-system copy-build-system) + ;; TODO: cross-compilation (arguments - (list #:install-plan - #~`(("nanopass.ss" "lib/chez-scheme/") - ("nanopass" "lib/chez-scheme/")))) + (let ((base-install-plan + #~`(("nanopass.ss" "lib/chez-scheme/") + ("nanopass" "lib/chez-scheme/")))) + (cond + ((this-package-native-input "chez-scheme") + (list #:install-plan + #~`(("nanopass.so" "lib/chez-scheme/") + ("doc/user-guide.pdf" #$(string-append + "share/doc/" + (package-name this-package) + "-" + (package-version this-package) + "/")) + ,@#$base-install-plan) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-user-guide-date + (lambda args + (define release-date + #$(match (assq 'chez-nanopass-release-date (package-properties this-package)) + ((_ . (? string? date)) + date) + (bad + (raise (formatted-message + (G_ "missing or malformed '~a' property: ~a") + 'chez-nanopass-release-date + bad))))) + (substitute* "doc/user-guide.stex" + (("^\\\\author.*$" all) + (string-append all "\n" "\\date{" release-date "}"))))) + (add-before 'install 'compile-and-test + (lambda args + (invoke "scheme" + "--compile-imported-libraries" + "--program" "test-all.ss"))) + (add-after 'compile-and-test 'build-doc + (lambda* (#:key native-inputs inputs #:allow-other-keys) + (with-directory-excursion "doc" + ;; Texlive-libkpathsea attempts to create directory at + ;; '$XDG_CACHE_HOME/.texliveYYYY'. + (setenv "XDG_CACHE_HOME" "/tmp") + (invoke "make" + (string-append "Scheme=" + (search-input-file + (or native-inputs inputs) + "/bin/scheme")) + (string-append "STEXLIB=" + (search-input-directory + (or native-inputs inputs) + "/lib/stex"))))))))) + (else ; bootstrapping + (list #:install-plan base-install-plan))))) (home-page "https://nanopass.org") (synopsis "DSL for compiler development") (description "The Nanopass framework is an embedded domain-specific @@ -870,52 +924,26 @@ organization is both to simplify the understanding of each pass, because it is responsible for a single task, and to simplify the addition of new passes anywhere in the compiler. Nanopass reduces the boilerplate required to create compilers, making them easier to understand and maintain.") - (license expat)))) + (license license:expat)))) (define-public chez-nanopass - (package/inherit chez-nanopass-bootstrap - (properties '()) - ;; TODO: cross-compilation - (native-inputs (list chez-scheme stex)) - (arguments - (substitute-keyword-arguments (package-arguments chez-nanopass-bootstrap) - ((#:install-plan base-plan) - #~`(("nanopass.so" "lib/chez-scheme/") - ("doc/user-guide.pdf" #$(string-append - "share/doc/" - (package-name this-package) - "-" - (package-version this-package) - "/")) - ,@#$base-plan)) - ((#:phases base-phases #~%standard-phases) - #~(modify-phases #$base-phases - (add-after 'unpack 'fix-user-guide-date - (lambda _ - ;; Release date: Oct 18, 2020 - (substitute* "doc/user-guide.stex" - (("^\\\\author.*$" all) - (string-append all "\n" "\\date{October 18, 2020}"))))) - (add-before 'install 'compile-and-test - (lambda args - (invoke "scheme" - "--compile-imported-libraries" - "--program" "test-all.ss"))) - (add-after 'compile-and-test 'build-doc - (lambda* (#:key native-inputs inputs #:allow-other-keys) - (with-directory-excursion "doc" - ;; Texlive-libkpathsea attempts to create directory at - ;; '$XDG_CACHE_HOME/.texliveYYYY'. - (setenv "XDG_CACHE_HOME" "/tmp") - (invoke "make" - (string-append "Scheme=" - (search-input-file - (or native-inputs inputs) - "/bin/scheme")) - (string-append "STEXLIB=" - (search-input-directory - (or native-inputs inputs) - "/lib/stex")))))))))))) + (package + (inherit chez-nanopass-bootstrap) + ;; This release has a significant bug fix. Expect the next releases of + ;; chez-scheme{,-for-racket} to want this for chez-nanopass-bootstrap. + (version "1.9.3") + (properties '((chez-nanopass-release-date . "August 24, 2025"))) + (source + (let ((bootstrap-origin (package-source chez-nanopass-bootstrap))) + (origin + (inherit bootstrap-origin) + (uri (git-reference + (url (git-reference-url (origin-uri bootstrap-origin))) + (commit (string-append "v" version)))) + (sha256 + (base32 "0757x3a3b4kcd3jk52h4ikqzv7cc1mvphlw592f0r5pz99bkxiin")) + (file-name (git-file-name "nanopass-framework-scheme" version))))) + (native-inputs (list chez-scheme stex)))) ;; ;; Other Chez packages: @@ -968,7 +996,7 @@ create compilers, making them easier to understand and maintain.") (synopsis "SRFI libraries for Chez Scheme") (description "This package provides a collection of SRFI libraries for Chez Scheme.") - (license expat))) + (license license:expat))) (define-public chez-web (let ((commit "5fd177fe53f31f466bf88720d03c95a3711a8bea") @@ -1036,7 +1064,7 @@ create compilers, making them easier to understand and maintain.") (synopsis "Hygienic Literate Programming for Chez Scheme") (description "ChezWEB is a system for doing Knuthian style WEB programming in Scheme.") - (license expat)))) + (license license:expat)))) (define-public chez-sockets (let ((commit "bce96881c06bd69a6757a6bff139744153924140") @@ -1121,7 +1149,7 @@ programming in Scheme.") (synopsis "Extensible sockets library for Chez Scheme") (description "Chez-sockets is an extensible sockets library for Chez Scheme.") - (license expat)))) + (license license:expat)))) (define-public chez-matchable (package @@ -1152,7 +1180,7 @@ Chez Scheme.") (description "This package provides a superset of the popular Scheme @code{match} package by Andrew Wright, written in fully portable @code{syntax-rules} and thus preserving hygiene.") - (license public-domain))) + (license license:public-domain))) (define-public chez-irregex (package @@ -1186,7 +1214,7 @@ Chez Scheme.") R[4567]RS implementation of regular expressions, supporting both POSIX syntax with various (irregular) PCRE extensions, as well as SCSH's SRE syntax, with various aliases for commonly used patterns.") - (license bsd-3))) + (license license:bsd-3))) (define-public chez-fmt (package @@ -1225,7 +1253,7 @@ formatting Scheme objects to text in various ways, and for easily concatenating, composing and extending these formatters efficiently without resorting to capturing and manipulating intermediate strings.") - (license bsd-3))) + (license license:bsd-3))) (define-public chez-mit (package @@ -1278,7 +1306,7 @@ strings.") (description "This package provides a set of MIT/GNU Scheme compatibility libraries for Chez Scheme. The main goal was to provide the functionality required to port the program @code{Scmutils} to Chez Scheme.") - (license gpl3+))) + (license license:gpl3+))) (define-public chez-scmutils (package @@ -1344,4 +1372,4 @@ required to port the program @code{Scmutils} to Chez Scheme.") (description "This package provides a port of the MIT/GNU Scheme Scmutils program to Chez Scheme. The port consists of a set of libraries providing most of the functionality of the original.") - (license gpl3+))) + (license license:gpl3+))) |