[ci] add build.scm script

Signed-off-by: SouthFox <master@southfox.me>
This commit is contained in:
SouthFox 2024-11-26 16:48:37 +08:00
parent 21ced433df
commit 86d0dd70fc

19
utils/build.scm Normal file
View file

@ -0,0 +1,19 @@
(use-modules (guix discovery)
(gnu packages)
(guix packages)
(ice-9 popen))
(define fox-packages
(string-join (map (lambda (p) (package-name p))
(fold-packages
(lambda (a b)
(cons a b))
'() (scheme-modules "modules")))
" "))
(define build-command
(string-join `("guix" "build" "-L" "modules" ,fox-packages) " "))
(let ((port (open-output-pipe build-command)))
(if (not (eqv? 0 (status:exit-val (close-pipe port))))
(error "Something wrong")))