forked from freebayes/freebayes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathguix.scm
55 lines (50 loc) · 1.61 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
;; To use this file to build HEAD of freebayes:
;; guix build -f guix.scm
;;
;; TODO:
;; Read previous version instead of hardcoding it
;; Run the test suite
(use-modules
((guix licenses) #:prefix license:)
(guix gexp)
(guix packages)
(guix git-download)
(guix build-system cmake)
(gnu packages bioinformatics)
(gnu packages compression)
(srfi srfi-1)
(ice-9 popen)
(ice-9 rdelim))
(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 freebayes-git
(package
(inherit freebayes)
(name "freebayes-git")
(version (git-version "1.3.2" "HEAD" %git-commit))
(source (local-file %source-dir #:recursive? #t))
(build-system cmake-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'prepare-build
(lambda _
;; Set SHELL for SeqLib's configure script.
(setenv "CONFIG_SHELL" (which "sh"))
;; Stash our build version in the executable.
(substitute* "src/version_release.txt"
(("v1.0.0") ,version))
#t))
(add-before 'install 'patch-install-location
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(substitute* "Makefile"
(("/usr/local") out))
(mkdir-p (string-append out "/bin"))
#t))))
#:tests? #f
#:make-flags (list "CC=gcc")))
(native-inputs `())
(inputs `(("zlib" ,zlib)))))
freebayes-git