-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
97 lines (86 loc) · 1.7 KB
/
default.nix
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
with import <nixpkgs> {};
let
rlibs = with rPackages; [
# base
R
# Imports
# R
data_table
Matrix
parallelly
stringfish
# Rcpp
Rcpp
RcppArmadillo
RcppProgress
RcppSpdlog
# Suggests
biscuiteer
bsseq
DelayedArray
GenomicRanges
# dev dependencies
DT
RcppClock
bench
covr
covr
devtools
htmltools
lobstr
pkgbuild
pkgdown
rhub
roxygen2
styler
testthat
usethis
# RCMD check
V8
rhub
];
_libs = with pkgs; [
# pkg deps
htslib
# R CMD check
html-tidy
texlive.combined.scheme-full
checkbashisms
# dev
ccls
pkg-config
];
in mkShell {
nativeBuildInputs = [
rlibs
_libs
];
shellHook = ''
export I_R=${pkgs.R}/lib/R/include/
export I_RCPP=${rPackages.Rcpp}/library/Rcpp/include/
export I_ARMA=${rPackages.RcppArmadillo}/library/RcppArmadillo/include/
export I_CLOCK=${rPackages.RcppClock}/library/RcppClock/include/
export I_PROGRESS=${rPackages.RcppProgress}/library/RcppProgress/include/
export I_LOG=${rPackages.RcppSpdlog}/library/RcppSpdlog/include/
export I_STRINGFISH=${rPackages.stringfish}/library/stringfish/include/
export I_HTSLIB=${pkgs.htslib}/include/
export L_HTSLIB=${pkgs.htslib}/lib/libhts.a
export L_CURL=${pkgs.curl.out}/lib/libcurl.so
mkdir -p "$HOME/.R"
export R_LIBS_USER="$HOME/.R"
cat > .ccls << EOF
clang
%c -std=c11
%cpp -std=c++2a
-I$I_R
-I$I_RCPP
-I$I_ARMA
-I$I_HTSLIB
-I$I_CLOCK
-I$I_PROGRESS
-I$I_LOG
-I$I_STRINGFISH
EOF
'';
}
# vim:set et sw=2 ts=2: