aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-07-09 19:48:01 +0100
committerChristopher Baines <mail@cbaines.net>2019-07-09 19:48:01 +0100
commit1b5db7adac298e4f0d7e6c9024fc31ebabb4a994 (patch)
tree4e6291a43ece57e750d4ecca481a22a0c366fd22
parent502dc93618eacdd66503d846e419de4be635cd4e (diff)
downloaddata-service-1b5db7adac298e4f0d7e6c9024fc31ebabb4a994.tar
data-service-1b5db7adac298e4f0d7e6c9024fc31ebabb4a994.tar.gz
Fix using defined? to check for the open-inferior/container function
It doesn't work as intended unless the module is also specified, so do that.
-rw-r--r--guix-data-service/jobs/load-new-guix-revision.scm16
1 files changed, 12 insertions, 4 deletions
diff --git a/guix-data-service/jobs/load-new-guix-revision.scm b/guix-data-service/jobs/load-new-guix-revision.scm
index 07baf1b..4990208 100644
--- a/guix-data-service/jobs/load-new-guix-revision.scm
+++ b/guix-data-service/jobs/load-new-guix-revision.scm
@@ -401,7 +401,9 @@
(derivation->output-path derivation)))
(define (channel->derivation-file-name store channel)
- (define use-container? (defined? 'open-inferior/container))
+ (define use-container? (defined?
+ 'open-inferior/container
+ (resolve-module '(guix inferior))))
(let ((inferior
(if use-container?
@@ -413,7 +415,9 @@
#:extra-environment-variables
(list (string-append
"SSL_CERT_DIR=" (nss-certs-store-path store))))
- (open-inferior (guix-store-path store)))))
+ (begin
+ (simple-format #t "debug: using open-inferior\n")
+ (open-inferior (guix-store-path store))))))
(catch
#t
@@ -511,11 +515,15 @@
(with-store store
(set-build-options store
#:fallback? #t)
- (let ((inf (if (defined? 'open-inferior/container)
+ (let ((inf (if (defined?
+ 'open-inferior/container
+ (resolve-module '(guix inferior)))
(open-inferior/container store store-path
#:extra-shared-directories
'("/gnu/store"))
- (open-inferior store-path))))
+ (begin
+ (simple-format #t "debug: using open-inferior\n")
+ (open-inferior store-path)))))
(inferior-eval '(use-modules (srfi srfi-1)
(srfi srfi-34)
(guix grafts)