diff options
author | Efraim Flashner | 2021-03-16 06:48:49 -0500 |
---|---|---|
committer | Efraim Flashner | 2021-03-16 06:49:47 -0500 |
commit | 2955dd2850b81658c22f2d600805a204ef47b565 (patch) | |
tree | 97a4bb2eeb9529c4fcd72a8a8a419a3c4c45dba1 | |
parent | 1f72c16d946cec6095876e733f22dac69ecce3f3 (diff) | |
download | guix-bioinformatics-2955dd2850b81658c22f2d600805a204ef47b565.tar.gz |
gn: bnw: updates
wrap run_scripts for octave invocations with coreutils
adjust service
-rw-r--r-- | gn/packages/bnw.scm | 5 | ||||
-rw-r--r-- | gn/services/bnw-container.scm | 17 |
2 files changed, 15 insertions, 7 deletions
diff --git a/gn/packages/bnw.scm b/gn/packages/bnw.scm index 842f327..f3f46d2 100644 --- a/gn/packages/bnw.scm +++ b/gn/packages/bnw.scm @@ -14,7 +14,7 @@ (define-public bnw (let ((commit "f39cd7ba681262de5658cfe7b9b0d46c6000b4fa") - (revision "2")) + (revision "3")) (package (name "bnw") (version (git-version "genenet8_initial_1.3" revision commit)) ; Mar 4, 2021 @@ -229,6 +229,7 @@ (for-each (lambda (script) (wrap-program script + `("PATH" prefix (,(dirname (which "cp")))) `("PYTHONPATH" prefix (,(getenv "PYTHONPATH"))))) (find-files (string-append (assoc-ref outputs "out") "/sourcecodes/run_scripts") "^run")) @@ -248,7 +249,7 @@ (invoke "sh" "build.sh"))))))) (inputs `(("graphviz" ,graphviz) - ("octave" ,octave) + ("octave" ,octave-cli) ("python" ,python) ("python-plotly" ,python-plotly) ("rmath" ,rmath-standalone) diff --git a/gn/services/bnw-container.scm b/gn/services/bnw-container.scm index 4046a4f..b812652 100644 --- a/gn/services/bnw-container.scm +++ b/gn/services/bnw-container.scm @@ -2,6 +2,7 @@ (use-modules (gnu) (gn packages bnw) + (guix build utils) (guix records) (ice-9 match)) (use-service-modules networking web) @@ -20,14 +21,18 @@ (define bnw-activation (match-lambda - (($ <bnw-configuration> package deploy-directory port) + (($ <bnw-configuration> package _ port) #~(begin - (let ((genenet "/var/lib/genenet/bnw")) - ;(mkdir-p #$deploy-directory) - ;(copy-recursively #$package #$deploy-directory) + (let ((genenet "/var/lib/genenet/bnw") + (php-fpm-uid (passwd:uid (getpw "php-fpm"))) + (php-fpm-gid (passwd:gid (getpw "php-fpm")))) (mkdir-p genenet) (copy-recursively #$(file-append package "/var_lib_genenet_bnw") genenet) - (invoke #$(file-append coreutils "/bin/chmod") "a+w" genenet)))))) + (for-each (lambda (file-name) + (make-file-writable file-name) + (chown file-name php-fpm-uid php-fpm-gid)) + (find-files genenet + #:directories? #t))))))) (define bnw-nginx-config (match-lambda @@ -85,3 +90,5 @@ ;(bnw-configuration ; (port '("8888"))) )))) + +;; guix system container -L ~/workspace/guix-past/modules/ -L ~/workspace/guix-bioinformatics/ ~/workspace/guix-bioinformatics/gn/services/bnw-container.scm --network |