This commit is contained in:
Daniel Ziltener 2024-03-07 23:33:24 +01:00
parent 2ad1a98a44
commit 64436218a0
Signed by: zilti
GPG key ID: B38976E82C9DAE42

View file

@ -63,32 +63,29 @@ EXTENSION is the file name extension, such as '.tar.gz'."
(define private-keywords (define private-keywords
'(#:target #:chicken #:inputs #:native-inputs #:outputs)) '(#:target #:chicken #:inputs #:native-inputs #:outputs))
;; TODO: cross-compilation support
(and (not target)
(bag (bag
(name name) (name name)
(system system) (system system)
(target target) (host-inputs `(,@(if source
(build-inputs `(,@(if source
`(("source" ,source)) `(("source" ,source))
'()) '())
,@`(("chicken" ,chicken)) ,@inputs
,@native-inputs
,@(if target '() inputs) ;; Keep the standard inputs of 'gnu-build-system', since
,@(if target ;; Chicken compiles Scheme by using C as an intermediate
(standard-cross-packages target 'host) ;; language.
'()) ,@(standard-packages)))
,@standard-packages)) (build-inputs `(("chicken" ,chicken)
(host-inputs (if target inputs '())) ,@native-inputs))
(target-inputs (if target
(standard-cross-packages target 'target)
'()))
(outputs outputs) (outputs outputs)
;; TODO: Cross-build support (build chicken-build)
(build (if target '() chicken-build))
(arguments (arguments
(substitute-keyword-arguments (substitute-keyword-arguments
(strip-keyword-arguments private-keywords arguments) (strip-keyword-arguments private-keywords arguments)
((#:extra-directories extra-directories) ((#:extra-directories extra-directories)
`(list (,@(append-map `(list ,@(append-map
(lambda (name) (lambda (name)
(match (assoc name inputs) (match (assoc name inputs)
((_ pkg) ((_ pkg)