Subject: [bug#37412] [PATCH 1/2] gnu: Add guix-data-service.

From: Ludovic Courtès <[email-masked]>
Date: Sun, 22 Sep 2019 23:11:16 +0200

Christopher Baines <[email-masked]> skribis:

> * gnu/packages/web.scm (guix-data-service): New variable.

[...]

> +      (native-inputs
> +       `(("autoconf" ,autoconf)
> +         ("automake" ,automake)
> +         ("emacs-with-modules" ,(directory-union
> +                                 "emacs-union"
> +                                 (list emacs-no-x
> +                                       emacs-htmlize)))

Should it be ‘emacs-minimal’?

> +      (native-search-paths
> +       ;; XXX guile-git requires this to be set, maybe there's a better way
> +       (list (search-path-specification
> +              (variable "GIT_SSL_CAINFO")
> +              (file-type 'regular)
> +              (separator #f)
> +              (files '("etc/ssl/certs/ca-certificates.crt")))))

Like I wrote, I’d rather remove the search path and add the environment
variable…

> +      (start #~(make-forkexec-constructor
> +                (list #$(file-append package
> +                                     "/bin/guix-data-service")
> +                      "--pid-file=/var/run/guix-data-service/pid"
> +                      #$(string-append "--port=" (number->string port))
> +                      #$(string-append "--host=" host)
> +                      ;; Perform any database migrations when the
> +                      ;; service is started
> +                      "--update-database")
> +
> +                #:user #$user
> +                #:group #$group
> +                #:pid-file "/var/run/guix-data-service/pid"
> +                ;; Allow time for migrations to run
> +                #:pid-file-timeout 60
> +                #:environment-variables
> +                `(,(string-append
> +                    "GUIX_LOCPATH=" #$glibc-utf8-locales "/lib/locale")
> +                  "LC_ALL=en_US.utf8")
> +                #:log-file "/var/log/guix-data-service/web.log"))

… here.           ↑

But anyway, these are details so I think you can go ahead and push as
you see fit.

Thanks!

Ludo’.