GNU bug report logs - #55248
[PATCH 0/7] gnu: Update Racket to 8.5 and Chez Scheme to 9.5.8.

Previous Next

Package: guix-patches;

Reported by: Philip McGrath <philip <at> philipmcgrath.com>

Date: Tue, 3 May 2022 18:32:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #23 received at 55248 <at> debbugs.gnu.org (full text, mbox):

From: Philip McGrath <philip <at> philipmcgrath.com>
To: 55248 <at> debbugs.gnu.org
Cc: Philip McGrath <philip <at> philipmcgrath.com>
Subject: [PATCH 6/7] gnu: stex: Get machine type dynamically.
Date: Tue,  3 May 2022 14:33:45 -0400
* gnu/packages/chez.scm (stex)[arguments]: Run 'scheme' to determine
the machine type.
---
 gnu/packages/chez.scm | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm
index 785b6837c1..ea53cf5774 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,12 @@ (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")))
+                            (write '(machine-type) 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





This bug report was last modified 3 years and 13 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.