forked from arximboldi/immer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshell.nix
52 lines (49 loc) · 1.28 KB
/
shell.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
{ compiler ? "",
nixpkgs ? (import <nixpkgs> {}).fetchFromGitHub {
owner = "NixOS";
repo = "nixpkgs";
rev = "d0d905668c010b65795b57afdf7f0360aac6245b";
sha256 = "1kqxfmsik1s1jsmim20n5l4kq6wq8743h5h17igfxxbbwwqry88l";
}}:
with import nixpkgs {};
let
compiler_pkg = if compiler != ""
then pkgs.${compiler}
else stdenv.cc;
docs = import ./nix/docs.nix { inherit nixpkgs; };
benchmarks = import ./nix/benchmarks.nix { inherit nixpkgs; };
propagate_compiler = compiler_pkg.isClang != stdenv.cc.isClang;
native_compiler = compiler_pkg.isClang == stdenv.cc.isClang;
in
stdenv.mkDerivation rec {
name = "immer-env";
buildInputs = [
git
cmake
pkgconfig
doxygen
ninja
gdb
lldb
ccache
boost
boehmgc
benchmarks.c_rrb
benchmarks.steady
benchmarks.chunkedseq
benchmarks.immutable_cpp
benchmarks.hash_trie
(python.withPackages (ps: [
ps.sphinx
docs.breathe
docs.recommonmark
]))
]
++ stdenv.lib.optionals compiler_pkg.isClang [
llvm libcxx libcxxabi
];
propagatedBuildInputs =
stdenv.lib.optional propagate_compiler compiler_pkg;
nativeBuildInputs =
stdenv.lib.optional native_compiler compiler_pkg;
}