aboutsummaryrefslogtreecommitdiff
path: root/gn/packages
diff options
context:
space:
mode:
authorArun Isaac2022-04-01 16:12:33 +0530
committerArun Isaac2022-04-01 16:23:02 +0530
commit74a445eec91c7294769f0233d62588f4a179e983 (patch)
tree61db638a6bc77c72cdd8bcbdb04dbccb8db0ae03 /gn/packages
parent05c78cacdd65d81344ab7ab4d0392d5fa67d0777 (diff)
downloadguix-bioinformatics-74a445eec91c7294769f0233d62588f4a179e983.tar.gz
gn: Add wfmash-static.
* gn/packages/static.scm: Import (gnu packages bioinformatics), (gnu packages compression), (gnu packages cpp), (gnu packages jemalloc), (gnu packages maths), (guix gexp) and (guix utils). (htslib-minimal, wfmash-static): New variables.
Diffstat (limited to 'gn/packages')
-rw-r--r--gn/packages/static.scm54
1 files changed, 53 insertions, 1 deletions
diff --git a/gn/packages/static.scm b/gn/packages/static.scm
index 7ce1a9c..3b0d913 100644
--- a/gn/packages/static.scm
+++ b/gn/packages/static.scm
@@ -11,11 +11,63 @@
(define-module (gn packages static)
#:use-module (gnu packages base)
+ #:use-module (gnu packages bioinformatics)
+ #:use-module (gnu packages compression)
+ #:use-module (gnu packages cpp)
+ #:use-module (gnu packages jemalloc)
+ #:use-module (gnu packages maths)
#:use-module (guix build-system gnu)
- #:use-module (guix packages))
+ #:use-module (guix gexp)
+ #:use-module (guix packages)
+ #:use-module (guix utils))
;; Static hello, for testing
(define-public hello-static
(package
(inherit (static-package hello))
(name "hello-static")))
+
+;; A minimal version of htslib that does not depend on curl and openssl. This
+;; reduces the number of higher order dependencies in static linking.
+(define htslib-minimal
+ (package
+ (inherit htslib)
+ (arguments
+ (substitute-keyword-arguments (package-arguments htslib)
+ ((#:configure-flags flags ''())
+ ''())))
+ (inputs
+ (list bzip2 xz))))
+
+(define-public wfmash-static
+ (package
+ (inherit wfmash)
+ (arguments
+ (substitute-keyword-arguments (package-arguments wfmash)
+ ((#:configure-flags flags ''())
+ `(cons* "-DCMAKE_EXE_LINKER_FLAGS=-static"
+ "-DCMAKE_SKIP_RPATH=TRUE"
+ ,flags))
+ ((#:phases phases ''())
+ #~(modify-phases #$phases
+ ;; When static linking, we need to link against the entire
+ ;; dependency tree, not just the direct first-order dependencies.
+ (add-after 'unpack 'add-higher-order-dependencies
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("hts" all)
+ (string-append all " bz2 dl lzma"))
+ (("jemalloc" all)
+ ;; We add atomic because riscv64 has no lock-free atomic
+ ;; instructions.
+ (string-append all " atomic pthread")))))))))
+ (inputs
+ (list atomic-queue
+ gsl-static
+ htslib-minimal
+ jemalloc
+ (list zlib "static")
+
+ ;; Second-order dependencies from htslib
+ (list bzip2 "static")
+ (list xz "static")))))