Add sqitch and asset related config values

This commit is contained in:
Christopher Baines 2019-06-08 10:28:03 +01:00
parent 88922d9f11
commit 64be346c8d

View file

@ -23,16 +23,24 @@
(let ((config (let ((config
;; Try to find the "assets" directory relative to the executable ;; Try to find the "assets" directory relative to the executable
;; first. This is useful when using "pre-inst-env". ;; first. This is useful when using "pre-inst-env".
`((assets-dir . ,(let ((maybe-dir `((assets-dir . ,(let ((install-dir
"@prefix@/share/guix-data-service/assets")
(dev-dir
(string-append (getcwd) "/assets"))) (string-append (getcwd) "/assets")))
(if (file-exists? maybe-dir) (if (file-exists? install-dir)
maybe-dir install-dir
;; TODO: use @assetsdir@ variable here dev-dir)))
"@prefix@/share/guix-data-service/assets")))
(host . "localhost") (host . "localhost")
(port . 8765) (port . 8765)
(sqitch . "@sqitch@") (sqitch . "@sqitch@")
(sqitch-plan . ,(let ((installed-plan
"@prefix@/share/guix-data-service/sqitch/sqitch.plan")
(dev-plan
(string-append (getcwd) "/sqitch/sqitch.plan")))
(if (file-exists? installed-plan)
installed-plan
dev-plan)))
(database-user . "guix_data_service") (database-user . "guix_data_service")
(database-host . "localhost") (database-host . "localhost")