about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2025-10-15 10:10:04 -0500
committerFrederick Muriuki Muriithi2025-10-27 08:52:38 -0500
commitee993295592e6ea5a6bdac9b5fad05f9f1c2a560 (patch)
tree752071a969409bd7d26dacada5ef1393aef742c9
parent637a3efcb6122ebf7826415b4ee3507b038ce2e3 (diff)
downloadgn-machines-ee993295592e6ea5a6bdac9b5fad05f9f1c2a560.tar.gz
Pass in the bare repository path to the gexp
Pass in the bare repository path to the gexp and use it instead of
fetching the value from the environment. This decouples the gexp from
changes in the code, e.g. should the environment variable name be
changed, we do not have to change this gexp.
-rw-r--r--genenetwork/services/genenetwork.scm6
1 files changed, 3 insertions, 3 deletions
diff --git a/genenetwork/services/genenetwork.scm b/genenetwork/services/genenetwork.scm
index 99e78b9..f73a932 100644
--- a/genenetwork/services/genenetwork.scm
+++ b/genenetwork/services/genenetwork.scm
@@ -652,7 +652,7 @@ a @code{<genenetwork-configuration>} record."
                #$(program-file "samples-count-script-gexp"
                                (samples-count-script-gexp config)))))
 
-(define (gn-guile-gexp gn-guile-port gn-guile-pkg)
+(define (gn-guile-gexp gn-guile-port gn-guile-pkg bare-repo)
   (with-imported-modules '((guix build utils))
     #~(begin
         (use-modules (guix build utils))
@@ -672,7 +672,7 @@ a @code{<genenetwork-configuration>} record."
             (delete-file-recursively current-repo-path))
           (setenv "CURRENT_REPO_PATH" current-repo-path)
           (invoke #$(file-append git-minimal "/bin/git")
-                  "clone" "--depth" "1" (getenv "CGIT_REPO_PATH")))
+                  "clone" "--depth" "1" #$bare-repo))
         (invoke #$(file-append gn-guile "/bin/gn-guile")
                 (number->string #$gn-guile-port)))))
 
@@ -694,7 +694,7 @@ a @code{<genenetwork-configuration>} record."
         #~(make-forkexec-constructor
 	   (list #$(least-authority-wrapper
                     (program-file "gn-guile"
-                                  (gn-guile-gexp gn-guile-port gn-guile))
+                                  (gn-guile-gexp gn-guile-port gn-guile gn-doc-git-checkout))
                     #:name "gn-guile-pola-wrapper"
                     #:directory (dirname gn-doc-git-checkout)
                     #:preserved-environment-variables