2
0
Fork 0
mirror of git://git.savannah.gnu.org/guix/data-service.git synced 2023-12-14 03:23:03 +01:00

Try to handle the guix store item being garbage collected

This commit is contained in:
Christopher Baines 2019-03-28 20:41:05 +00:00
parent 0c6c413804
commit 76d6027b7c
No known key found for this signature in database
GPG key ID: 5E28A33B0B84F577

View file

@ -170,12 +170,23 @@
package
'package-transitive-supported-systems))
(define (guix-store-path store)
(let* ((guix-package (@ (gnu packages package-management)
guix))
(derivation (package-derivation store guix-package)))
(build-derivations store (list derivation))
(derivation->output-path derivation)))
(define guix-store-path
(let ((store-path #f))
(lambda (store)
(if (and store-path
(file-exists? store-path))
store-path
(begin
(invalidate-derivation-caches!)
(let* ((guix-package (@ (gnu packages package-management)
guix))
(derivation (package-derivation store guix-package)))
(build-derivations store (list derivation))
(let ((new-store-path
(derivation->output-path derivation)))
(set! store-path new-store-path)
new-store-path)))))))
(define (nss-certs-store-path store)
(let* ((nss-certs-package (@ (gnu packages certs)