about summary refs log tree commit diff
diff options
context:
space:
mode:
authorArun Isaac2025-02-17 12:22:05 +0000
committerArun Isaac2025-02-17 12:22:05 +0000
commita8ebf394d446c02dabebff698aa42d570f435624 (patch)
treefb7c4f5ebdfd86e95b44ba1bc5abf4790f1beada
parent7f86165e397252376eeb61630c572053451156cc (diff)
downloadguix-bioinformatics-a8ebf394d446c02dabebff698aa42d570f435624.tar.gz
gn: Add wfmash-0.14.
* gn/packages/bioinformatics.scm (wfmash-0.14): New variable.
-rw-r--r--gn/packages/bioinformatics.scm47
1 files changed, 47 insertions, 0 deletions
diff --git a/gn/packages/bioinformatics.scm b/gn/packages/bioinformatics.scm
index a0d9c5d..fb8cbd2 100644
--- a/gn/packages/bioinformatics.scm
+++ b/gn/packages/bioinformatics.scm
@@ -2581,6 +2581,53 @@ multiple sequence alignment.")
         license:zlib    ; deps/sonLib/externalTools/cutest
         license:boost1.0)))) ; catch.hpp
 
+(define-public wfmash-0.14
+  (package
+    (inherit wfmash)
+    (version "0.14.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/waveygang/wfmash/releases/download/v"
+                           version "/wfmash-v" version ".tar.gz"))
+       (sha256
+        (base32
+         "1mk3jschn3hdr45glds65g3hxk7v6nc3plkvxmfbd5pr4kyzlf13"))
+       (snippet
+        #~(begin
+            (use-modules (guix build utils))
+            ;; Unbundle atomic-queue.
+            (delete-file-recursively "src/common/atomic_queue")
+            (substitute* "src/align/include/computeAlignments.hpp"
+              (("\"common/atomic_queue/atomic_queue.h\"")
+               "<atomic_queue/atomic_queue.h>"))
+            ;; Remove compiler optimizations.
+            (substitute* (find-files "." "CMakeLists\\.txt")
+              (("-march=native ") ""))))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments wfmash)
+       ((#:tests? tests? #f) #f)
+       ((#:phases phases #~%standard-phases)
+        #~(modify-phases #$phases
+            (replace 'build-check-prerequisites
+              (lambda _
+                (let ((wfa2-lib #$(string-append "../wfmash-v"
+                                                 version
+                                                 "/src/common/wflign/deps/WFA2-lib")))
+                  (substitute* (string-append wfa2-lib "/Makefile")
+                    ;; Remove architecture-specific flags.
+                    (("-march=x86-64-v3") ""))
+                  (substitute* (string-append wfa2-lib "/tests/wfa.utest.sh")
+                    ;; Fix time command.
+                    (("\\\\time -v") "time"))
+                  ;; Build wfa2-lib.
+                  (invoke "make" "-C" wfa2-lib
+                          #$(string-append "CC=" (cc-for-target))))))))))
+    (inputs
+     (modify-inputs (package-inputs wfmash)
+       (prepend jemalloc)
+       (delete "libdeflate")))))
+
 (define-public pggb
   (package
     (name "pggb")