diff options
| author | Frederick Muriuki Muriithi | 2026-03-16 04:36:15 -0500 |
|---|---|---|
| committer | Frederick Muriuki Muriithi | 2026-03-19 09:19:48 -0500 |
| commit | 92cbc219fbc99763f4c9ba8caf8cc393646dd809 (patch) | |
| tree | 82a96a8351950074261ffdb6dd599600e4ed5064 | |
| parent | d3c51f2c9513d2a89980de50b0d192bc5056dab6 (diff) | |
| download | gn-machines-92cbc219fbc99763f4c9ba8caf8cc393646dd809.tar.gz | |
gn-guile: Modify phases to fix load paths.
| -rw-r--r-- | guix/gn-machines/genenetwork.scm | 69 |
1 files changed, 64 insertions, 5 deletions
diff --git a/guix/gn-machines/genenetwork.scm b/guix/gn-machines/genenetwork.scm index d976e27..8dd968d 100644 --- a/guix/gn-machines/genenetwork.scm +++ b/guix/gn-machines/genenetwork.scm @@ -1,14 +1,17 @@ (define-module (gn-machines genenetwork) + #:use-module (guix) + #:use-module (guix packages) + #:use-module (guix git-download) + + #:use-module ((gnu packages ssh) #:select (openssh-sans-x)) + #:use-module ((gnu packages guile-xyz) #:select (guile-config)) + #:use-module ((gn packages genenetwork) #:select (genenetwork2 genenetwork3 gn-auth gn-uploader gn-libs) #:prefix gn:) #:use-module((gn packages guile) #:select (gn-guile guile-sheepdog) - #:prefix gng:) - #:use-module (guix git-download) - #:use-module (guix packages) - #:use-module ((gnu packages ssh) #:select (openssh-sans-x)) - #:use-module ((gnu packages guile-xyz) #:select (guile-config))) + #:prefix gng:)) (define-public genenetwork2 (let ((commit "ef4776ea476d3276f4297e39694a16712978653c") @@ -128,6 +131,62 @@ (sha256 (base32 "0ylv4psdmd442jg73sw8danv9n9wj3wi8b96jfnzx025llz9ka3m")))) + (arguments + (list + #:not-compiled-file-regexp "(guix|guix/.*)[.]scm$" + #:modules '((srfi srfi-1) + (guix build guile-build-system) + (guix build utils)) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-git + (lambda* (#:key inputs #:allow-other-keys) + (let ((git (search-input-file inputs "/bin/git"))) + (substitute* "web/view/markdown.scm" + (("\"git\"") (string-append "\"" git "\"")) + (("git -C") (string-append git " -C"))) + (substitute* "gn-guile.sh" + ((" @SHELL@") + (search-input-file inputs "/bin/bash")) + (("guile") (search-input-file inputs "/bin/guile")) + (("main web") + (string-append "main " #$output + "/share/guile/site/" + (target-guile-effective-version) + "/web")))))) + (add-after 'build 'install-scripts + (lambda* _ + (mkdir-p "bin") + (copy-file "gn-guile.sh" "bin/gn-guile") + (copy-file "scripts/lmdb-publishdata-export.scm" + "bin/lmdb-publishdata-export") + (for-each (lambda (script-path) + (install-file script-path + (string-append #$output "/bin"))) + (list "bin/gn-guile" + "bin/lmdb-publishdata-export")))) + (add-after 'install-scripts 'wrap + (lambda* (#:key inputs #:allow-other-keys) + (let((effective-version (target-guile-effective-version)) + (guile-path + (dirname (search-input-file inputs "/bin/guile")))) + (for-each (lambda (script-name) + (wrap-program + (string-append #$output "/bin/" script-name) + `("PATH" prefix (,guile-path ,(getenv "PATH"))) + `("GUILE_LOAD_PATH" prefix + (,(string-append #$output + "/share/guile/site/" + effective-version) + ,(getenv "GUILE_LOAD_PATH"))) + `("GUILE_LOAD_COMPILED_PATH" prefix + (,(string-append #$output "/lib/guile" + effective-version + "/site-ccache") + ,(getenv "GUILE_LOAD_COMPILED_PATH"))) + `("GUILE_AUTO_COMPILE" ":" = ("0")))) + (list "lmdb-publishdata-export" + "gn-guile")))))))) (propagated-inputs ;; TODO: remove openssh-sans-x on next update to newer ;; guix-bioinformatics commit, i.e. newer than commit |
