This commit is contained in:
Daniel Ziltener 2024-03-07 23:21:19 +01:00
parent dfc8211b6c
commit 65dedac0ec
Signed by: zilti
GPG key ID: B38976E82C9DAE42

View file

@ -54,52 +54,6 @@ EXTENSION is the file name extension, such as '.tar.gz'."
(let ((chicken (resolve-interface '(gnu packages chicken))))
(module-ref chicken 'chicken)))
(define* (chicken-build name inputs
#:key source
(tests? #t)
(parallel-build? #f)
(build-flags ''())
(configure-flags ''())
(extra-directories ''())
(phases '%standard-phases)
(outputs '("out" "static"))
(search-paths '())
(egg-name "")
(unpack-path "")
(system (%current-system))
(guile #f)
(imported-modules %chicken-build-system-modules)
(modules '((zilti build chicken-build-system)
(guix build union)
(guix build utils))))
(define builder
(with-imported-modules imported-modules
#~(begin
(use-modules #$@(sexp->gexp modules))
(chicken-build
#:name #$name
#:source #+source
#:system #$system
#:phases #$phases
#:configure-flags #$configure-flags
#:extra-directories #$extra-directories
#:parallel-build? #$parallel-build?
#:outputs #$(outputs->gexp outputs)
#:search-paths '#$(sexp->gexp
(map search-path-specification->sexp
search-paths))
#:egg-name #$egg-name
#:unpack-path #$unpack-path
#:build-flags #$build-flags
#:tests? #$tests?
#:inputs #$(input-tuples->gexp inputs)))))
(mlet %store-monad ((guile (package->derivation (or guile (default-guile))
system #:graft? #f)))
(gexp->derivation name builder
#:system system
#:guile-for-build guile)))
(define* (lower name
#:key source inputs native-inputs outputs system target
(chicken (default-chicken))
@ -143,6 +97,51 @@ EXTENSION is the file name extension, such as '.tar.gz'."
(cons name propagated-names))))))
extra-directories))))))))
(define* (chicken-build name inputs
#:key source
(tests? #t)
(parallel-build? #f)
(build-flags ''())
(configure-flags ''())
(extra-directories ''())
(phases '%standard-phases)
(outputs '("out" "static"))
(search-paths '())
(egg-name "")
(unpack-path "")
(system (%current-system))
(guile #f)
(imported-modules %chicken-build-system-modules)
(modules '((guix build chicken-build-system)
(guix build union)
(guix build utils))))
(define builder
(with-imported-modules imported-modules
#~(begin
(use-modules #$@(sexp->gexp modules))
(chicken-build #:name #$name
#:source #+source
#:system #$system
#:phases #$phases
#:configure-flags #$configure-flags
#:extra-directories #$extra-directories
#:parallel-build? #$parallel-build?
#:outputs #$(outputs->gexp outputs)
#:search-paths '#$(sexp->gexp
(map search-path-specification->sexp
search-paths))
#:egg-name #$egg-name
#:unpack-path #$unpack-path
#:build-flags #$build-flags
#:tests? #$tests?
#:inputs #$(input-tuples->gexp inputs)))))
(mlet %store-monad ((guile (package->derivation (or guile (default-guile))
system #:graft? #f)))
(gexp->derivation name builder
#:system system
#:guile-for-build guile)))
(define chicken-build-system
(build-system
(name 'chicken)