mirror of
git://git.savannah.gnu.org/guix/data-service.git
synced 2023-12-14 03:23:03 +01:00
Catch the guix available when built
And use it for the hosting the inferiors, rather than computing the guix package at runtime. This simplifies the behaviour when the Guix Data Service is deployed as a Guix package.
This commit is contained in:
parent
6f379c7937
commit
11144a5fe9
|
@ -35,6 +35,8 @@ guilemoduledir="${datarootdir}/guile/site/${GUILE_EFFECTIVE_VERSION}"
|
||||||
AC_SUBST([guilemoduledir])
|
AC_SUBST([guilemoduledir])
|
||||||
AC_SUBST([GUILE_EFFECTIVE_VERSION])
|
AC_SUBST([GUILE_EFFECTIVE_VERSION])
|
||||||
|
|
||||||
|
AC_PATH_PROG([guix], [guix])
|
||||||
|
|
||||||
AC_PATH_PROG([sqitch], [sqitch])
|
AC_PATH_PROG([sqitch], [sqitch])
|
||||||
AC_PATH_PROG([psql], [psql])
|
AC_PATH_PROG([psql], [psql])
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,8 @@
|
||||||
(host . "localhost")
|
(host . "localhost")
|
||||||
(port . 8765)
|
(port . 8765)
|
||||||
|
|
||||||
|
(guix . "@guix@")
|
||||||
|
|
||||||
(sqitch . "@sqitch@")
|
(sqitch . "@sqitch@")
|
||||||
(sqitch-psql . "@psql@")
|
(sqitch-psql . "@psql@")
|
||||||
(sqitch-plan . ,(let ((installed-plan
|
(sqitch-plan . ,(let ((installed-plan
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
#:use-module (guix derivations)
|
#:use-module (guix derivations)
|
||||||
#:use-module (guix build utils)
|
#:use-module (guix build utils)
|
||||||
|
#:use-module (guix-data-service config)
|
||||||
#:use-module (guix-data-service model package)
|
#:use-module (guix-data-service model package)
|
||||||
#:use-module (guix-data-service model git-repository)
|
#:use-module (guix-data-service model git-repository)
|
||||||
#:use-module (guix-data-service model guix-revision)
|
#:use-module (guix-data-service model guix-revision)
|
||||||
|
@ -245,18 +246,27 @@
|
||||||
(if (and store-path
|
(if (and store-path
|
||||||
(file-exists? store-path))
|
(file-exists? store-path))
|
||||||
store-path
|
store-path
|
||||||
(begin
|
(let ((config-guix (%config 'guix)))
|
||||||
(invalidate-derivation-caches!)
|
(if (and (file-exists? config-guix)
|
||||||
(hash-clear! (@@ (guix packages) %derivation-cache))
|
(string-prefix? "/gnu/store/" config-guix))
|
||||||
(let* ((guix-package (@ (gnu packages package-management)
|
(begin
|
||||||
guix))
|
(set! store-path
|
||||||
(derivation (package-derivation store guix-package)))
|
(dirname
|
||||||
(build-derivations store (list derivation))
|
(dirname
|
||||||
|
(%config 'guix))))
|
||||||
|
store-path)
|
||||||
|
(begin
|
||||||
|
(invalidate-derivation-caches!)
|
||||||
|
(hash-clear! (@@ (guix packages) %derivation-cache))
|
||||||
|
(let* ((guix-package (@ (gnu packages package-management)
|
||||||
|
guix))
|
||||||
|
(derivation (package-derivation store guix-package)))
|
||||||
|
(build-derivations store (list derivation))
|
||||||
|
|
||||||
(let ((new-store-path
|
(let ((new-store-path
|
||||||
(derivation->output-path derivation)))
|
(derivation->output-path derivation)))
|
||||||
(set! store-path new-store-path)
|
(set! store-path new-store-path)
|
||||||
new-store-path)))))))
|
new-store-path)))))))))
|
||||||
|
|
||||||
(define (nss-certs-store-path store)
|
(define (nss-certs-store-path store)
|
||||||
(let* ((nss-certs-package (@ (gnu packages certs)
|
(let* ((nss-certs-package (@ (gnu packages certs)
|
||||||
|
|
Loading…
Reference in a new issue