mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: chez-nanopass: Update to 1.9.3.
Thanks to Zhu Zihao for pursuing this update and for prompting the upstream release! * gnu/packages/chez.scm (chez-nanopass): Update to 1.9.3. [arguments]: Move to ... (chez-nanopass-bootstrap)[arguments]: ... the parent package, and dynamically adapt to whether we are compiling or bootstrapping, which simplifies defining variants. Change-Id: I6fba4f82cfd534f685121f1edd6b54749c6fa009 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
c15b239b84
commit
20a9c13092
1 changed files with 76 additions and 48 deletions
|
@ -29,6 +29,8 @@
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
#:use-module (guix deprecation)
|
#:use-module (guix deprecation)
|
||||||
#:use-module (guix download)
|
#:use-module (guix download)
|
||||||
|
#:use-module (guix diagnostics)
|
||||||
|
#:use-module (guix i18n)
|
||||||
#:use-module (guix git-download)
|
#:use-module (guix git-download)
|
||||||
#:use-module (guix utils)
|
#:use-module (guix utils)
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
|
@ -49,6 +51,7 @@
|
||||||
#:use-module (ice-9 match)
|
#:use-module (ice-9 match)
|
||||||
#:use-module (srfi srfi-1)
|
#:use-module (srfi srfi-1)
|
||||||
#:use-module (srfi srfi-26)
|
#:use-module (srfi srfi-26)
|
||||||
|
#:use-module (srfi srfi-34)
|
||||||
#:export (chez-scheme-for-system
|
#:export (chez-scheme-for-system
|
||||||
nix-system->native-chez-machine-type
|
nix-system->native-chez-machine-type
|
||||||
nix-system->pbarch-machine-type
|
nix-system->pbarch-machine-type
|
||||||
|
@ -299,7 +302,7 @@ will name the threaded machine type unless THREADS? is provided as #f."
|
||||||
(name "chez-scheme-for-racket")
|
(name "chez-scheme-for-racket")
|
||||||
;; The version should match `(scheme-version #t)`.
|
;; The version should match `(scheme-version #t)`.
|
||||||
;; See s/cmacros.ss c. line 360.
|
;; See s/cmacros.ss c. line 360.
|
||||||
(version "10.3.0-pre-release.2")
|
(version "10.3.0-pre-release.2") ; expect a chez-nanopass-bootstrap update
|
||||||
(source #f)
|
(source #f)
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(inputs `(,@(if (nix-system->native-chez-machine-type)
|
(inputs `(,@(if (nix-system->native-chez-machine-type)
|
||||||
|
@ -504,7 +507,7 @@ version of Chez Scheme.")
|
||||||
(name "chez-scheme")
|
(name "chez-scheme")
|
||||||
;; The version should match `(scheme-version-number #t)`.
|
;; The version should match `(scheme-version-number #t)`.
|
||||||
;; See s/cmacros.ss c. line 360.
|
;; See s/cmacros.ss c. line 360.
|
||||||
(version "10.2.0")
|
(version "10.2.0") ; expect a chez-nanopass-bootstrap update
|
||||||
(source (origin
|
(source (origin
|
||||||
(method git-fetch)
|
(method git-fetch)
|
||||||
(uri (git-reference
|
(uri (git-reference
|
||||||
|
@ -839,6 +842,7 @@ User's Guix}, among other documents.")
|
||||||
(package
|
(package
|
||||||
(name "chez-nanopass")
|
(name "chez-nanopass")
|
||||||
(version "1.9.2")
|
(version "1.9.2")
|
||||||
|
(properties `((chez-nanopass-release-date . "October 18, 2020")))
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method git-fetch)
|
(method git-fetch)
|
||||||
|
@ -857,29 +861,14 @@ User's Guix}, among other documents.")
|
||||||
(("include ~/stex/Mf-stex")
|
(("include ~/stex/Mf-stex")
|
||||||
"include $(STEXLIB)/Mf-stex"))))))
|
"include $(STEXLIB)/Mf-stex"))))))
|
||||||
(build-system copy-build-system)
|
(build-system copy-build-system)
|
||||||
|
;; TODO: cross-compilation
|
||||||
(arguments
|
(arguments
|
||||||
(list #:install-plan
|
(let ((base-install-plan
|
||||||
#~`(("nanopass.ss" "lib/chez-scheme/")
|
#~`(("nanopass.ss" "lib/chez-scheme/")
|
||||||
("nanopass" "lib/chez-scheme/"))))
|
("nanopass" "lib/chez-scheme/"))))
|
||||||
(home-page "https://nanopass.org")
|
(cond
|
||||||
(synopsis "DSL for compiler development")
|
((this-package-native-input "chez-scheme")
|
||||||
(description "The Nanopass framework is an embedded domain-specific
|
(list #:install-plan
|
||||||
language for writing compilers composed of several simple passes that
|
|
||||||
operate over well-defined intermediate languages. The goal of this
|
|
||||||
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 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/")
|
#~`(("nanopass.so" "lib/chez-scheme/")
|
||||||
("doc/user-guide.pdf" #$(string-append
|
("doc/user-guide.pdf" #$(string-append
|
||||||
"share/doc/"
|
"share/doc/"
|
||||||
|
@ -887,15 +876,23 @@ create compilers, making them easier to understand and maintain.")
|
||||||
"-"
|
"-"
|
||||||
(package-version this-package)
|
(package-version this-package)
|
||||||
"/"))
|
"/"))
|
||||||
,@#$base-plan))
|
,@#$base-install-plan)
|
||||||
((#:phases base-phases #~%standard-phases)
|
#:phases
|
||||||
#~(modify-phases #$base-phases
|
#~(modify-phases %standard-phases
|
||||||
(add-after 'unpack 'fix-user-guide-date
|
(add-after 'unpack 'fix-user-guide-date
|
||||||
(lambda _
|
(lambda args
|
||||||
;; Release date: Oct 18, 2020
|
(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"
|
(substitute* "doc/user-guide.stex"
|
||||||
(("^\\\\author.*$" all)
|
(("^\\\\author.*$" all)
|
||||||
(string-append all "\n" "\\date{October 18, 2020}")))))
|
(string-append all "\n" "\\date{" release-date "}")))))
|
||||||
(add-before 'install 'compile-and-test
|
(add-before 'install 'compile-and-test
|
||||||
(lambda args
|
(lambda args
|
||||||
(invoke "scheme"
|
(invoke "scheme"
|
||||||
|
@ -915,7 +912,38 @@ create compilers, making them easier to understand and maintain.")
|
||||||
(string-append "STEXLIB="
|
(string-append "STEXLIB="
|
||||||
(search-input-directory
|
(search-input-directory
|
||||||
(or native-inputs inputs)
|
(or native-inputs inputs)
|
||||||
"/lib/stex"))))))))))))
|
"/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
|
||||||
|
language for writing compilers composed of several simple passes that
|
||||||
|
operate over well-defined intermediate languages. The goal of this
|
||||||
|
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 license:expat))))
|
||||||
|
|
||||||
|
(define-public chez-nanopass
|
||||||
|
(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:
|
;; Other Chez packages:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue