2
0
Fork 0
mirror of git://git.savannah.gnu.org/guix/maintenance.git synced 2023-12-14 03:33:04 +01:00

sysadmin/web: Use new GWL with GUIX_EXTENSIONS_PATH.

* hydra/modules/sysadmin/web.scm (gwl-web-shepherd-service): Remove
inner wrapping with GUILE_LOAD_PATH and GUILE_LOAD_COMPILED_PATH; set
GUIX_EXTENSIONS_PATH instead; run "guix workflow web".
(gwl-web-service-type): Update description.
This commit is contained in:
Ricardo Wurmus 2021-01-06 22:58:57 +01:00
parent 9c9af82086
commit c4443f49fc
No known key found for this signature in database
GPG key ID: 197A5888235FACAC

View file

@ -1,7 +1,7 @@
;;; GNU Guix system administration tools.
;;;
;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2020 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
;;;
;;; This program is free software: you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
@ -191,28 +191,14 @@ taken from a Git repository.")))
;;;
(define (gwl-web-shepherd-service gwl)
(define gwl+deps
(match (package-transitive-propagated-inputs gwl)
(((labels packages) ...)
(cons gwl packages))))
(define wrapped-guix
(program-file "guix-workflow"
#~(begin
(setenv "GUILE_LOAD_PATH"
(string-join '#$gwl+deps
(string-append
"/share/guile/site/"
(effective-version) ":")
'suffix))
(setenv "GUILE_LOAD_COMPILED_PATH"
(string-join '#$gwl+deps
(string-append
"/lib/guile/"
(effective-version)
"/site-ccache:")
'suffix))
(apply execl #$(file-append guix "/bin/guix")
(setenv "GUIX_EXTENSIONS_PATH"
(string-append '#$gwl
(string-append "/share/guix/extensions")))
(apply execl
#$(file-append guix "/bin/guix")
(command-line)))))
(with-imported-modules (source-module-closure
@ -225,7 +211,7 @@ taken from a Git repository.")))
(modules '((gnu build shepherd)
(gnu system file-systems)))
(start #~(make-forkexec-constructor/container
(list #$wrapped-guix "workflow" "--web-interface")
(list #$wrapped-guix "workflow" "web")
#:user "gwl-web"
#:group "gwl-web"
#:log-file "/var/log/gwl.log"))
@ -251,6 +237,6 @@ taken from a Git repository.")))
(const %gwl-web-accounts))))
(default-value gwl)
(description
"Run @command{guix worflow --web}, which serves the Guix Workflow
"Run @command{guix worflow web}, which serves the Guix Workflow
Language (GWL) web site.")))