aboutsummary
aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/cran.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/cran.scm')
0 files changed, 0 insertions, 0 deletions
bind-http bind-rpc title keep-rundirs archive-url base-url) (list (shepherd-service (documentation "Run Laminar.") (provision '(laminar)) (requirement '(networking)) (start #~(make-forkexec-constructor (list #$(file-append laminar "/sbin/laminard")) #:environment-variables `(,(string-append "LAMINAR_HOME=" #$home-directory) ,(string-append "LAMINAR_BIND_HTTP=" #$bind-http) ,(string-append "LAMINAR_BIND_RPC=" #$bind-rpc) ,(string-append "LAMINAR_TITLE=" #$title) ,(string-append "LAMINAR_KEEP_RUNDIRS=" #$(number->string keep-rundirs)) ,@(if #$archive-url (list (string-append "LAMINAR_ARCHIVE_URL=" #$archive-url)) '()) ,@(if #$base-url (list (string-append "LAMINAR_BASE_URL=" #$base-url)) '())) #:user "laminar" #:group "laminar" #:supplementary-groups '#$supplementary-groups)) (stop #~(make-kill-destructor))))))) (define (laminar-account config) "Return the user accounts and user groups for CONFIG." (list (user-group (name "laminar") (system? #t)) (user-account (name "laminar") (group "laminar") (supplementary-groups (laminar-configuration-supplementary-groups config)) (system? #t) (comment "Laminar privilege separation user") (home-directory (laminar-configuration-home-directory config)) (shell #~(string-append #$shadow "/sbin/nologin"))))) (define (laminar-activation config) (let ((bind-http (laminar-configuration-bind-http config))) #~(begin ;; If listen is a unix socket, create its parent directory. (when (string-prefix? "unix:" #$bind-http) (let ((run-directory (dirname (substring #$bind-http (string-length "unix:")))) (user (getpw "laminar"))) (mkdir-p run-directory) (chown run-directory (passwd:uid user) (passwd:gid user))))))) (define laminar-service-type (service-type (name 'laminar) (extensions (list (service-extension shepherd-root-service-type laminar-shepherd-service) (service-extension account-service-type laminar-account) (service-extension activation-service-type laminar-activation))) (default-value (laminar-configuration)) (description "Run the Laminar continuous integration service.")))