about summary refs log tree commit diff
path: root/gn/packages/bnw.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gn/packages/bnw.scm')
-rw-r--r--gn/packages/bnw.scm12
1 files changed, 10 insertions, 2 deletions
diff --git a/gn/packages/bnw.scm b/gn/packages/bnw.scm
index f7e95e3..5b7131b 100644
--- a/gn/packages/bnw.scm
+++ b/gn/packages/bnw.scm
@@ -44,6 +44,9 @@
                (substitute* (find-files "." "\\.php")
                  (("HTTP_POST_VARS") "_POST")
                  (("HTTP_POST_FILES") "_FILES"))
+               ;; change $dir to a writable directory
+               ;(substitute* (find-files "sourcecodes" "\\.php$")
+               ;  (("\\$dir=\"./data") "$dir=\"./data/tmp"))
                #t))
            (add-after 'patch-source-shebangs 'patch-more-shebangs
              (lambda* (#:key inputs #:allow-other-keys)
@@ -84,6 +87,11 @@
                  (substitute* '("sourcecodes/build.sh"
                                 "downloads/BNW/src/build.sh")
                    (("./localscore/libRmath.so") (string-append rmath "/lib/libRmath.so")))
+                 (substitute* "sourcecodes/run.sh"
+                   (("rm ") (string-append (which "rm") " "))
+                   (("rmdir ") (string-append (which "rmdir") " "))
+                   (("mkdir ") (string-append (which "mkdir") " "))
+                   (("dirname ") (string-append (which "dirname")" ")))
                  ;(substitute* "sourcecodes/layout_cyto.php"
                  ;  (("https://cdnjs.cloudflare.com/ajax/libs/cytoscape/3.7.1/cytoscape.min.js")
                  ;   (string-append cyto js-path "cytoscape/cytoscape.min.js"))
@@ -127,8 +135,8 @@
                    (lambda (file)
                      (chmod file #o555))
                    (append (find-files out "\\.(sh|py)$")
-                           (find-files (string-append out "/sourcecodes/run_scripts" ".*"))
-                           ))
+                           (find-files (string-append out "/sourcecodes/run_scripts/" "."))))
+                 (chmod (string-append out "/sourcecodes/data") #o777) ; needs to be writable
                  #t)))
            (replace 'build
              (lambda _