aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--guix-data-service/jobs/load-new-guix-revision.scm23
1 files changed, 17 insertions, 6 deletions
diff --git a/guix-data-service/jobs/load-new-guix-revision.scm b/guix-data-service/jobs/load-new-guix-revision.scm
index fec3a7d..071457e 100644
--- a/guix-data-service/jobs/load-new-guix-revision.scm
+++ b/guix-data-service/jobs/load-new-guix-revision.scm
@@ -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)