summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2021-05-26 13:42:26 +0300
committerEfraim Flashner <efraim@flashner.co.il>2021-05-26 15:22:10 +0300
commitc5f7203e3eea9453c773f7e38c4adc50f09b024c (patch)
treebf8ab2a34d7c5aeee436c145381ccdb710946e47 /gnu
parent36a90d0637bb47b113ceda5abb64c50600837436 (diff)
downloadguix-c5f7203e3eea9453c773f7e38c4adc50f09b024c.tar.gz
gnu: minimap2: Install more files.
* gnu/packages/bioinformatics.scm (minimap2)[arguments]: Add modules.
Adjust custom 'install phase to also install library, headers and a
pkg-config file.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/bioinformatics.scm27
1 files changed, 25 insertions, 2 deletions
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 46092fd589..af1010f853 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -12336,6 +12336,9 @@ version does count multisplits.")
     (build-system gnu-build-system)
     (arguments
      `(#:tests? #f                      ; there are none
+       #:modules ((guix build utils)
+                  (guix build gnu-build-system)
+                  (srfi srfi-26))
        #:make-flags
        (list (string-append "CC=" ,(cc-for-target))
              (let ((system ,(or (%current-target-system)
@@ -12358,10 +12361,30 @@ version does count multisplits.")
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
                     (bin (string-append out "/bin"))
+                    (lib (string-append out "/lib"))
+                    (inc (string-append out "/include"))
                     (man (string-append out "/share/man/man1")))
                (install-file "minimap2" bin)
-               (mkdir-p man)
-               (install-file "minimap2.1" man))
+               (install-file "libminimap2.a" lib)
+               (install-file "minimap2.1" man)
+               (map (cut install-file <> inc)
+                    (find-files "." "\\.h$"))
+               ;; Not this file.
+               (delete-file (string-append inc "/emmintrin.h"))
+               (mkdir-p (string-append lib "/pkgconfig"))
+               (with-output-to-file (string-append lib "/pkgconfig/minimap2.pc")
+                (lambda _
+                  (format #t "prefix=~a~@
+                          exec_prefix=${prefix}~@
+                          libdir=${exec_prefix}/lib~@
+                          includedir=${prefix}/include~@
+                          ~@
+                          Name: libminimap2~@
+                          Version: ~a~@
+                          Description: A versatile pairwise aligner for genomic and spliced nucleotide sequence~@
+                          Libs: -L${libdir} -lminimap2~@
+                          Cflags: -I${includedir}~%"
+                          out ,version))))
              #t)))))
     (inputs
      `(("zlib" ,zlib)))