guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: gnu: kraken2: Replace references to rsync.


From: guix-commits
Subject: branch master updated: gnu: kraken2: Replace references to rsync.
Date: Wed, 28 Apr 2021 08:51:10 -0400

This is an automated email from the git hooks/post-receive script.

rekado pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new f01b3cd  gnu: kraken2: Replace references to rsync.
f01b3cd is described below

commit f01b3cd0632d3ef7e609625e0dd32028a5c930d7
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Wed Apr 28 14:48:39 2021 +0200

    gnu: kraken2: Replace references to rsync.
    
    * gnu/packages/bioinformatics.scm (kraken2)[inputs]: Add rsync.
    [arguments]: Replace references to rsync; use WITH-DIRECTORY-EXCURSION to
    avoid repeating "scripts".
---
 gnu/packages/bioinformatics.scm | 85 +++++++++++++++++++++++------------------
 1 file changed, 47 insertions(+), 38 deletions(-)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 97f3f91..92c0692 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -130,6 +130,7 @@
   #:use-module (gnu packages qt)
   #:use-module (gnu packages rdf)
   #:use-module (gnu packages readline)
+  #:use-module (gnu packages rsync)
   #:use-module (gnu packages ruby)
   #:use-module (gnu packages serialization)
   #:use-module (gnu packages shells)
@@ -15182,50 +15183,58 @@ international community.")
          (add-before 'install 'install-scripts
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
-                    (scripts (find-files "scripts" ".*"))
                     (replacements `(("KRAKEN2_DIR" . ,bin)
                                     ("VERSION" . ,,version))))
                (mkdir-p bin)
-               (substitute* scripts
-                 (("#####=([^=]+)=#####" _ key)
-                  (or (assoc-ref replacements key)
-                      (error (format #false "unknown key: ~a~%" key)))))
-               (substitute* "scripts/kraken2"
-                 (("compression_program = \"bzip2\"")
-                  (string-append "compression_program = \""
-                                 (which "bzip2")
-                                 "\""))
-                 (("compression_program = \"gzip\"")
-                  (string-append "compression_program = \""
-                                 (which "gzip")
-                                 "\"")))
-               (substitute* '("scripts/download_genomic_library.sh"
-                              "scripts/download_taxonomy.sh"
-                              "scripts/16S_gg_installation.sh"
-                              "scripts/16S_silva_installation.sh"
-                              "scripts/16S_rdp_installation.sh")
-                 (("wget") (which "wget")))
-               (substitute* "scripts/mask_low_complexity.sh"
-                 (("which") (which "which")))
-               (substitute* '("scripts/mask_low_complexity.sh"
-                              "scripts/download_genomic_library.sh"
-                              "scripts/16S_silva_installation.sh")
-                 (("sed -e ")
-                  (string-append (which "sed") " -e ")))
-               (substitute* '("scripts/rsync_from_ncbi.pl"
-                              "scripts/16S_rdp_installation.sh"
-                              "scripts/16S_silva_installation.sh"
-                              "scripts/16S_gg_installation.sh"
-                              "scripts/download_taxonomy.sh"
-                              "scripts/download_genomic_library.sh")
-                 (("gunzip") (which "gunzip")))
-               (for-each (lambda (script)
-                           (chmod script #o555)
-                           (install-file script bin))
-                         scripts)))))))
+
+               (with-directory-excursion "scripts"
+                 (let ((scripts (find-files "." ".*")))
+                   (substitute* scripts
+                     (("#####=([^=]+)=#####" _ key)
+                      (or (assoc-ref replacements key)
+                          (error (format #false "unknown key: ~a~%" key)))))
+                   (substitute* "kraken2"
+                     (("compression_program = \"bzip2\"")
+                      (string-append "compression_program = \""
+                                     (which "bzip2")
+                                     "\""))
+                     (("compression_program = \"gzip\"")
+                      (string-append "compression_program = \""
+                                     (which "gzip")
+                                     "\"")))
+                   (substitute* '("download_genomic_library.sh"
+                                  "download_taxonomy.sh"
+                                  "16S_gg_installation.sh"
+                                  "16S_silva_installation.sh"
+                                  "16S_rdp_installation.sh")
+                     (("wget") (which "wget")))
+                   (substitute* '("download_taxonomy.sh"
+                                 "download_genomic_library.sh"
+                                 "rsync_from_ncbi.pl")
+                    (("rsync -")
+                      (string-append (which "rsync") " -")))
+                   (substitute* "mask_low_complexity.sh"
+                     (("which") (which "which")))
+                   (substitute* '("mask_low_complexity.sh"
+                                  "download_genomic_library.sh"
+                                  "16S_silva_installation.sh")
+                     (("sed -e ")
+                      (string-append (which "sed") " -e ")))
+                   (substitute* '("rsync_from_ncbi.pl"
+                                  "16S_rdp_installation.sh"
+                                  "16S_silva_installation.sh"
+                                  "16S_gg_installation.sh"
+                                  "download_taxonomy.sh"
+                                  "download_genomic_library.sh")
+                     (("gunzip") (which "gunzip")))
+                   (for-each (lambda (script)
+                               (chmod script #o555)
+                               (install-file script bin))
+                             scripts)))))))))
     (inputs
      `(("gzip" ,gzip)
        ("perl" ,perl)
+       ("rsync" ,rsync)
        ("sed" ,sed)
        ("wget" ,wget)
        ("which" ,which)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]