summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZheng Junjie <zhengjunjie@iscas.ac.cn>2024-12-30 15:57:33 +0800
committerLudovic Courtès <ludo@gnu.org>2025-01-11 23:36:58 +0100
commitc560a143786d24b0735c7182263319a29e7957ae (patch)
treef82c184fce664d48b0d1053b0eda3d46541e0c74
parent24a12aeb91082fc6d01de1c64a3a3bac15a02f3a (diff)
gnu: chibi-scheme: Fix cross-compilation.
* gnu/packages/scheme.scm (chibi-scheme)[arguments]: Use G-expression. <#:make-flags>:When cross-compilation, Set CHIBI. [native-inputs]: When cross-compilation. Add this-package. Change-Id: I424854d77e575f2e2aab8a5a9d32ef628c9db953 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
-rw-r--r--gnu/packages/scheme.scm27
1 files changed, 19 insertions, 8 deletions
diff --git a/gnu/packages/scheme.scm b/gnu/packages/scheme.scm
index a8647a53cce..c6d36e03361 100644
--- a/gnu/packages/scheme.scm
+++ b/gnu/packages/scheme.scm
@@ -25,6 +25,7 @@
;;; Copyright © 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2024 Skylar Hill <stellarskylark@posteo.net>
;;; Copyright © 2024 Artyom V. Poptsov <poptsov.artyom@gmail.com>
+;;; Copyright © 2024 Zheng Junjie <873216071@qq.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -607,14 +608,24 @@ mixed.")
(base32 "02zq35hdbi03rmmamx6ml4ihsigdl4mmbf6d9ysazv8ciiln5v4b"))))
(build-system gnu-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (delete 'configure)) ; no configure script
- #:make-flags (let ((out (assoc-ref %outputs "out")))
- (list (string-append "PREFIX=" out)
- (string-append "CC=" ,(cc-for-target))
- (string-append "LDFLAGS=-Wl,-rpath=" out "/lib")))
- #:test-target "test"))
+ (list #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure)) ; no configure script
+ #:make-flags
+ #~(list
+ #$@(if
+ (%current-target-system)
+ #~((string-append
+ "CHIBI=" #+(this-package-native-input "chibi-scheme")
+ "/bin/chibi-scheme"))
+ #~())
+ (string-append "PREFIX=" #$output)
+ (string-append "CC=" #$(cc-for-target))
+ (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib"))
+ #:test-target "test"))
+ (native-inputs (if (%current-target-system)
+ (list this-package)
+ (list)))
(synopsis "Small embeddable Scheme implementation")
(description
"Chibi-Scheme is a very small library with no external dependencies