diff options
Diffstat (limited to 'gn')
-rw-r--r-- | gn/packages/bioinformatics.scm | 30 | ||||
-rw-r--r-- | gn/packages/bnw.scm | 140 | ||||
-rw-r--r-- | gn/packages/maths.scm | 1 | ||||
-rw-r--r-- | gn/packages/ratspub.scm | 5 | ||||
-rw-r--r-- | gn/services/archive-pubmed.service | 13 | ||||
-rw-r--r-- | gn/services/archive-pubmed.timer | 9 | ||||
-rw-r--r-- | gn/services/bnw-container.scm | 4 |
7 files changed, 131 insertions, 71 deletions
diff --git a/gn/packages/bioinformatics.scm b/gn/packages/bioinformatics.scm index 8897752..66d4d2d 100644 --- a/gn/packages/bioinformatics.scm +++ b/gn/packages/bioinformatics.scm @@ -427,20 +427,12 @@ reads.") ; (let ((go (string-append (assoc-ref inputs "go") "/bin/go"))) ; (invoke go "build" "xtract.go")))) (add-after 'unpack 'patch-programs - (lambda* (#:key inputs #:allow-other-keys) - (let ((gzip (assoc-ref inputs "gzip"))) - (substitute* '("index-bioc" - "pm-index" - "pm-invert" - "pm-stash" - "rchive.go" - "run-ncbi-converter") - (("gunzip") (string-append gzip "/bin/gunzip"))) - (substitute* (find-files "." "^e") - (("exec perl") "exec")) - (substitute* '("xtract" "rchive") - ;; or add current directory to PATH - ((".*PATH.*") ""))) + (lambda _ + (substitute* (find-files "." "^e") + (("exec perl") "exec")) + (substitute* '("xtract" "rchive") + ;; or add current directory to PATH + ((".*PATH.*") "")) #t)) (replace 'install (lambda* (#:key inputs outputs #:allow-other-keys) @@ -466,9 +458,13 @@ reads.") (path (getenv "PERL5LIB"))) (for-each (lambda (file) - (wrap-program (string-append out "/bin/" file) - `("PERL5LIB" ":" prefix (,path)))) - '("edirect.pl" "asp-ls" "ftp-cp" "ftp-ls"))) + (wrap-program file + `("PERL5LIB" ":" prefix (,path))) + (wrap-program file + `("PATH" ":" prefix (,(dirname (which "sed")) + ,(dirname (which "gzip")) + ,(dirname (which "uname")))))) + (find-files out "."))) #t)))))) (inputs `(("gzip" ,gzip) diff --git a/gn/packages/bnw.scm b/gn/packages/bnw.scm index 5c97eab..043077d 100644 --- a/gn/packages/bnw.scm +++ b/gn/packages/bnw.scm @@ -14,7 +14,7 @@ (define-public bnw (let ((commit "eb6b002b924694808384f1a8d7c6d1121806ae04") - (revision "5")) + (revision "6")) (package (name "bnw") (version (git-version "1.22" revision commit)) ; June 28, 2019 @@ -86,59 +86,101 @@ (("rmdir ") (string-append (which "rmdir") " ")) (("wc ") (string-append (which "wc") " "))) #t))) - ;(add-after 'patch-source-shebangs 'replace-javascript - ; (lambda* (#:key inputs #:allow-other-keys) - ; (let ( - ; (jquery (assoc-ref inputs "jquery")) - ; (awesome (assoc-ref inputs "awesome")) - ; (cyto (assoc-ref inputs "cytoscape")) - ; (cyto2 (assoc-ref inputs "cytoscape-2")) - ; (cs-dagre (assoc-ref inputs "cyto-dagre")) - ; (d3js (assoc-ref inputs "d3js")) - ; (d3js-multi (assoc-ref inputs "d3js-multi")) - ; (dagre (assoc-ref inputs "dagre")) - ; (lodash (assoc-ref inputs "lodash")) - ; (canvas-toblob (assoc-ref inputs "canvas-toblob")) - ; (filesaver (assoc-ref inputs "filesaver")) - ; (panzoom (assoc-ref inputs "panzoom")) - ; (js-path "/share/genenetwork2/javascript/") - ; ) - ;(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")) - ; (("https://cdnjs.cloudflare.com/ajax/libs/cytoscape/2.7.29/cytoscape.min.js") - ; (string-append cyto2 js-path "cytoscape/cytoscape.min.js")) - ; (("http://spades.bioinf.spbau.ru/~alla/graph_viewer/js/cytoscape-dagre.js") - ; (string-append cs-dagre js-path "cytoscape-dagre/cytoscape-dagre.js")) - ; (("https://unpkg.com/dagre@0.7.4/dist/dagre.js") - ; (string-append dagre js-path "dagre/dagre.js")) - ; (("https://cdnjs.cloudflare.com/ajax/libs/cytoscape-panzoom/2.5.3/cytoscape.js-panzoom.css") - ; (string-append panzoom js-path "cytoscape-panzoom/cytoscape.js-panzoom.css")) - ; (("https://cdnjs.cloudflare.com/ajax/libs/cytoscape-panzoom/2.5.3/cytoscape-panzoom.js") - ; (string-append panzoom js-path "cytoscape-panzoom/cytoscape-panzoom.js")) - ; (("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.0.3/css/font-awesome.css") - ; (string-append awesome "/share/web/font-awesome/css/font-awesome.css")) - ; (("https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js") - ; (string-append jquery "/share/web/jquery/jquery.min.js")) - ; (("https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.10/lodash.js") - ; (string-append lodash js-path "lodash/lodash.js"))) - ;(substitute* '("sourcecodes/layout_svg_wt.php" - ; "sourcecodes/layout_svg_no.php") - ; (("http://d3js.org/d3.v4.min.js") - ; (string-append d3js js-path "d3js/d3.min.js")) - ; (("http://d3js.org/d3-selection-multi.v1.js") - ; (string-append d3js-multi js-path "d3js-multi/d3-selection-multi.js")) - ; (("https://cdn.rawgit.com/eligrey/canvas-toBlob.js/f1a01896135ab378aa5c0118eadd81da55e698d8/canvas-toBlob.js") - ; (string-append canvas-toblob js-path "canvas-toBlob/canvas-toBlob.js")) - ; (("https://cdn.rawgit.com/eligrey/FileSaver.js/e9d941381475b5df8b7d7691013401e171014e89/FileSaver.min.js") - ; (string-append filesaver js-path "filesaver/filesaver.js"))) - ; ) - ; #t)) + (add-after 'patch-source-shebangs 'replace-javascript + (lambda* (#:key inputs #:allow-other-keys) + (let ((jquery (assoc-ref inputs "jquery")) + (awesome (assoc-ref inputs "awesome")) + (cyto (assoc-ref inputs "cytoscape")) + (cyto2 (assoc-ref inputs "cytoscape-2")) + (cs-dagre (assoc-ref inputs "cyto-dagre")) + (d3js (assoc-ref inputs "d3js")) + (d3js-multi (assoc-ref inputs "d3js-multi")) + (dagre (assoc-ref inputs "dagre")) + (lodash (assoc-ref inputs "lodash")) + (canvas-toblob (assoc-ref inputs "canvas-toblob")) + (filesaver (assoc-ref inputs "filesaver")) + (panzoom (assoc-ref inputs "panzoom")) + (js-path "/share/genenetwork2/javascript/")) + (substitute* "sourcecodes/layout_cyto.php" + (("https://cdnjs.cloudflare.com/ajax/libs/cytoscape/3.7.1/cytoscape.min.js") + "/javascript/cytoscape.min.js") + (("https://cdnjs.cloudflare.com/ajax/libs/cytoscape/2.7.29/cytoscape.min.js") + "/javascript/cytoscape2.min.js") + (("http://spades.bioinf.spbau.ru/~alla/graph_viewer/js/cytoscape-dagre.js") + "/javascript/cytoscape-dagre.js") + (("https://unpkg.com/dagre@0.7.4/dist/dagre.js") + "/javascript/dagre.js") + (("https://cdnjs.cloudflare.com/ajax/libs/cytoscape-panzoom/2.5.3/cytoscape.js-panzoom.css") + "/javascript/cytoscape.js-panzoom.css") + (("https://cdnjs.cloudflare.com/ajax/libs/cytoscape-panzoom/2.5.3/cytoscape-panzoom.js") + "/javascript/cytoscape-panzoom.js") + (("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.0.3/css/font-awesome.css") + "/javascript/font-awesome.css") + (("https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js") + "/javascript/jquery.min.js") + (("https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.10/lodash.js") + "/javascript/lodash.js")) + (substitute* '("sourcecodes/layout_svg_wt.php" + "sourcecodes/layout_svg_no.php") + (("http://d3js.org/d3.v4.min.js") + "/javascript/d3.min.js") + (("http://d3js.org/d3-selection-multi.v1.js") + "/javascript/d3-selection-multi.js") + (("https://cdn.rawgit.com/eligrey/canvas-toBlob.js/f1a01896135ab378aa5c0118eadd81da55e698d8/canvas-toBlob.js") + "/javascript/canvas-toBlob.js") + (("https://cdn.rawgit.com/eligrey/FileSaver.js/e9d941381475b5df8b7d7691013401e171014e89/FileSaver.min.js") + "/javascript/filesaver.js"))) + #t)) (replace 'install (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (copy-recursively "." out)) #t)) + (add-after 'install 'install-javascript-libraries + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (jquery (assoc-ref inputs "jquery")) + (awesome (assoc-ref inputs "awesome")) + (cyto (assoc-ref inputs "cytoscape")) + (cyto2 (assoc-ref inputs "cytoscape-2")) + (cs-dagre (assoc-ref inputs "cyto-dagre")) + (d3js (assoc-ref inputs "d3js")) + (d3js-multi (assoc-ref inputs "d3js-multi")) + (dagre (assoc-ref inputs "dagre")) + (lodash (assoc-ref inputs "lodash")) + (canvas-toblob (assoc-ref inputs "canvas-toblob")) + (filesaver (assoc-ref inputs "filesaver")) + (panzoom (assoc-ref inputs "panzoom")) + (js-path "/share/genenetwork/javascript/") + (js-path2 "/share/genenetwork2/javascript/")) + (mkdir-p (string-append out "/javascript")) + (symlink (string-append (string-append cyto2 js-path2 "cytoscape/cytoscape.min.js")) + (string-append out "/javascript/cytoscape.min.js")) + (symlink (string-append (string-append cyto js-path2 "cytoscape/cytoscape.min.js")) + (string-append out "/javascript/cytoscape2.min.js")) + (symlink (string-append cs-dagre js-path2 "cytoscape-dagre/cytoscape-dagre.js") + (string-append out "/javascript/cytoscape-dagre.js")) + (symlink (string-append dagre js-path2 "dagre/dagre.js") + (string-append out "/javascript/dagre.js")) + (symlink (string-append panzoom js-path2 "cytoscape-panzoom/cytoscape.js-panzoom.css") + (string-append out "/javascript/cytoscape.js-panzoom.css")) + (symlink (string-append panzoom js-path2 "cytoscape-panzoom/cytoscape-panzoom.js") + (string-append out "/javascript/cytoscape-panzoom.js")) + (symlink (string-append awesome "/share/web/font-awesomecss/font-awesome.css") + (string-append out "/javascript/font-awesome.css")) + (symlink (string-append jquery "/share/web/jquery/jquery.min.js") + (string-append out "/javascript/jquery.min.js")) + (symlink (string-append lodash js-path2 "lodash/lodash.js") + (string-append out "/javascript/lodash.js")) + (symlink (string-append d3js js-path "d3js/d3.min.js") + (string-append out "/javascript/d3.min.js")) + (symlink (string-append d3js-multi js-path "d3js-multi/d3-selection-multi.js") + (string-append out "/javascript/d3-selection-multi.js")) + (symlink (string-append canvas-toblob js-path "canvas-toblob/canvas-toBlob.js") + (string-append out "/javascript/canvas-toBlob.js")) + (symlink (string-append filesaver js-path2 "filesaver/FileSaver.js") + (string-append out "/javascript/filesaver.js")) + #t))) (add-after 'install 'make-files-executable (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) diff --git a/gn/packages/maths.scm b/gn/packages/maths.scm index 9e15400..1c1c1ae 100644 --- a/gn/packages/maths.scm +++ b/gn/packages/maths.scm @@ -30,6 +30,7 @@ ((#:configure-flags cf) `(cons "--enable-docs=no" ; docs fail to build ,cf)) + ((#:tests? _ #f) #f) ; tests hang ((#:phases phases) `(modify-phases ,phases (add-after 'unpack 'patch-configure-script diff --git a/gn/packages/ratspub.scm b/gn/packages/ratspub.scm index 29e1313..290b9e2 100644 --- a/gn/packages/ratspub.scm +++ b/gn/packages/ratspub.scm @@ -65,7 +65,10 @@ (let ((out (assoc-ref outputs "out")) (path (getenv "PYTHONPATH"))) (wrap-program (string-append out "/server.py") - `("PATH" ":" prefix (,(dirname (which "edirect.pl")))) + `("PATH" ":" prefix (,(dirname (which "edirect.pl")) + ,(dirname (which "dirname")) + ,(dirname (which "grep")) + ,(dirname (which "sed")))) `("PYTHONPATH" ":" prefix (,path)))) #t))))) (inputs diff --git a/gn/services/archive-pubmed.service b/gn/services/archive-pubmed.service new file mode 100644 index 0000000..fd00b71 --- /dev/null +++ b/gn/services/archive-pubmed.service @@ -0,0 +1,13 @@ +[Unit] +Description=Download PubMed Archives +After=network-online.target +Wants=network-online.target +AssertPathExists=/export2/PubMed + +[Service] +ExecStart=/usr/local/guix-profiles/ratspub/bin/archive-pubmed +Environment="EDIRECT_PUBMED_MASTER=/export2/PubMed" "PERL_LWP_SSL_CA_FILE=/etc/ssl/certs/ca-certificates.crt" "PATH=/usr/local/guix-profiles/ratspub/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin:/usr/sbin" +User=hchen + +[Install] +WantedBy=multi-user.target diff --git a/gn/services/archive-pubmed.timer b/gn/services/archive-pubmed.timer new file mode 100644 index 0000000..4bb27ba --- /dev/null +++ b/gn/services/archive-pubmed.timer @@ -0,0 +1,9 @@ +[Unit] +Description=Daily PubMed downloads + +[Timer] +OnBootSec=5h +OnUnitInactiveSec=15h + +[Install] +WantedBy=default.target diff --git a/gn/services/bnw-container.scm b/gn/services/bnw-container.scm index 8463a75..39da38d 100644 --- a/gn/services/bnw-container.scm +++ b/gn/services/bnw-container.scm @@ -21,10 +21,6 @@ (match-lambda (($ <bnw-configuration> package deploy-directory port) #~(begin - (use-modules (guix build utils)) - (when (directory-exists? #$deploy-directory) - ;; Not 'delete-file-recursively' because the directory might be empty. - (system* "rm" "-r" #$(string-append deploy-directory "/*"))) (mkdir-p #$deploy-directory) (copy-recursively #$package #$deploy-directory) (invoke #$(file-append coreutils "/bin/chmod") "a+w" |