[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#55248] [PATCH v2 6/9] gnu: stex: Get machine type dynamically.
From: |
Philip McGrath |
Subject: |
[bug#55248] [PATCH v2 6/9] gnu: stex: Get machine type dynamically. |
Date: |
Sun, 8 May 2022 16:07:49 -0400 |
* gnu/packages/chez.scm (stex)[arguments]: Run 'scheme' to determine
the machine type.
---
gnu/packages/chez.scm | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm
index 785b6837c1..dd485d37e1 100644
--- a/gnu/packages/chez.scm
+++ b/gnu/packages/chez.scm
@@ -602,6 +602,10 @@ (define-public stex-bootstrap
("src" "lib/stex/")
("Mf-stex" "lib/stex/")
("Makefile.template" "lib/stex/"))
+ #:modules
+ '((guix build copy-build-system)
+ (guix build utils)
+ (ice-9 popen))
#:phases
#~(modify-phases %standard-phases
(add-before 'install 'patch-sources
@@ -633,8 +637,14 @@ (define-public stex-bootstrap
(define makefile
(string-append (getcwd) "/Makefile"))
(define machine
- #$(and=> (nix-system->chez-machine)
- chez-machine->threaded))
+ (let ((pipe (open-pipe* OPEN_BOTH scheme "-q")))
+ ;; try to not be wrong for cross-compilation
+ ;; (avoid #% reader abbreviation for Guile)
+ (write '(($primitive $target-machine)) pipe)
+ (force-output pipe)
+ (let ((sym (read pipe)))
+ (close-pipe pipe)
+ (symbol->string sym))))
(with-directory-excursion
(search-input-directory outputs "/lib/stex")
(invoke "make"
--
2.32.0
- [bug#55248] [PATCH 7/7] gnu: chez-scheme-for-system: Adjust support logic., (continued)
[bug#55248] [PATCH 6/7] gnu: stex: Get machine type dynamically., Philip McGrath, 2022/05/03
[bug#55248] [PATCH v2 0/9] gnu: Update Racket to 8.5 and Chez Scheme to 9.5.8., Philip McGrath, 2022/05/08
- [bug#55248] [PATCH v2 8/9] gnu: chez-scheme-for-racket: Fix supported systems., Philip McGrath, 2022/05/08
- [bug#55248] [PATCH v2 4/9] gnu: chez-scheme: Refactor documentation phases., Philip McGrath, 2022/05/08
- [bug#55248] [PATCH v2 6/9] gnu: stex: Get machine type dynamically.,
Philip McGrath <=
- [bug#55248] [PATCH v2 2/9] gnu: racket: Fix out-of-source build., Philip McGrath, 2022/05/08
- [bug#55248] [PATCH v2 2/9] gnu: racket: Fix out-of-source build., Liliana Marie Prikler, 2022/05/08
- [bug#55248] [PATCH v3 0/9] gnu: Update Racket to 8.5 and Chez Scheme to 9.5.8., Philip McGrath, 2022/05/09
- [bug#55248] [PATCH v3 2/9] gnu: racket: Fix out-of-source build., Philip McGrath, 2022/05/09
- [bug#55248] [PATCH v3 3/9] gnu: chez-scheme: Update to 9.5.8., Philip McGrath, 2022/05/09
- [bug#55248] [PATCH v3 1/9] gnu: racket: Update to 8.5., Philip McGrath, 2022/05/09
- [bug#55248] [PATCH v3 4/9] gnu: chez-scheme: Refactor documentation phases., Philip McGrath, 2022/05/09
- [bug#55248] [PATCH v3 5/9] gnu: chez-scheme: Refactor configure phase and fix '--threads'., Philip McGrath, 2022/05/09
- [bug#55248] [PATCH v3 6/9] gnu: stex: Get machine type dynamically., Philip McGrath, 2022/05/09
- [bug#55248] [PATCH v3 7/9] gnu: chez-upstream-features-for-system: Improve implementation., Philip McGrath, 2022/05/09