-
Notifications
You must be signed in to change notification settings - Fork 7
/
guix.scm
117 lines (112 loc) · 3.48 KB
/
guix.scm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
;; To use this file to build HEAD of smoothxg:
;;
;; guix build -f guix.scm
;;
;; (make sure you are running a recent guix and checked out all submodules)
;;
;; To do a cross compilation build for ARM64
;;
;; guix build -f guix.scm --target=aarch64-linux
;;
;; To get a development container (inside emacs shell will work)
;;
;; guix shell -C -D -f guix.scm -- bash --init-file <(echo "ln -s /bin/sh /bin/bash")
;;
;; and build
;;
;; find -name CMakeCache.txt|xargs rm -v
;; cd build
;; cmake -DCMAKE_BUILD_TYPE=Debug ..
;; cmake --build . --verbose -- -j 14 && ctest . --verbose
;;
;; Or for a release, something like
;;
;; cd build && rm -rf ../build/* ; cmake -DCMAKE_BUILD_TYPE=Release .. && make -j 16 VERBOSE=1 && ctest . --verbose
;;
;; For the tests you may need /usr/bin/env. In a container create it with
;;
;; mkdir -p /usr/bin ; ln -s $GUIX_ENVIRONMENT/bin/env /usr/bin/env
;;
(use-modules
(ice-9 popen)
(ice-9 rdelim)
((guix licenses) #:prefix license:)
(guix gexp)
(guix packages)
(guix download)
(guix git-download)
(guix build-system cmake)
(guix utils)
(gnu packages base)
(gnu packages compression)
(gnu packages bioinformatics)
(gnu packages build-tools)
(gnu packages commencement) ; gcc-toolchain
(gnu packages curl)
(gnu packages datastructures)
(gnu packages gdb)
(gnu packages gcc)
(gnu packages jemalloc)
(gnu packages libffi)
(gnu packages mpi)
(gnu packages python)
(gnu packages python-xyz)
(gnu packages pkg-config)
(gnu packages tls)
(gnu packages version-control)
)
(define %source-dir (dirname (current-filename)))
(define %git-commit
(read-string (open-pipe "git show HEAD | head -1 | cut -d ' ' -f 2" OPEN_READ)))
(define-public smoothxg-git
(package
(name "smoothxg-git")
(version (git-version "0.3.3" "HEAD" %git-commit))
(source (local-file %source-dir #:recursive? #t))
(build-system cmake-build-system)
(inputs
`(
("coreutils" ,coreutils)
("pybind11" ,pybind11) ;; see libstd++ note in remarks above
("jemalloc" ,jemalloc)
("gcc" ,gcc-11)
("gcc-lib" ,gcc-11 "lib")
("gcc-toolchain" , gcc-toolchain)
("gdb" ,gdb)
("git" ,git) ; pulls in perl which does not do RISV-V cross builds yet
("openmpi" ,openmpi)
("python" ,python)
("sdsl-lite" ,sdsl-lite)
("libdivsufsort" ,libdivsufsort)
("zlib-static" ,zlib "static")
("zlib" ,zlib) ; also for the static build we need the includes
("zstd-lib" ,zstd "static")
("zstd" ,zstd "lib") ; same
))
(native-inputs
`(("pkg-config" ,pkg-config)
))
(arguments
`(#:phases
(modify-phases
%standard-phases
;; This stashes our build version in the executable
(add-after 'unpack 'set-version
(lambda _
(mkdir-p "include")
(with-output-to-file "include/smoothxg_git_version.hpp"
(lambda ()
(format #t "#define ODGI_GIT_VERSION \"~a\"~%" version)))
#t))
;; (delete 'check)
)
;; #:make-flags (list ,(string-append "CC=" (cc-for-target)))))
))
(synopsis "odgi pangenome optimized dynamic sequence graph implementation")
(description
"odgi pangenome graph tooling provides an efficient, succinct dynamic
DNA sequence graph model, as well as a host of algorithms that allow
the use of such graphs.")
(home-page "https://github.com/vgteam/odgi")
(license license:expat)))
smoothxg-git