forked from arximboldi/immer
-
Notifications
You must be signed in to change notification settings - Fork 2
/
shell.nix
61 lines (58 loc) · 1.62 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
53
54
55
56
57
58
59
60
61
{ compiler ? "",
nixpkgs ? (import <nixpkgs> {}).fetchFromGitHub {
owner = "NixOS";
repo = "nixpkgs";
rev = "73392e79aa62e406683d6a732eb4f4101f4732be";
sha256 = "049fq37sxdn5iis7ni407j2jsfrxbb41pgv5zawi02qj47f74az9";
}}:
with import nixpkgs {};
let
# For the documentation tools we use an older Nixpkgs since the
# newer versions seem to be not working great...
oldNixpkgsSrc = fetchFromGitHub {
owner = "NixOS";
repo = "nixpkgs";
rev = "d0d905668c010b65795b57afdf7f0360aac6245b";
sha256 = "1kqxfmsik1s1jsmim20n5l4kq6wq8743h5h17igfxxbbwwqry88l";
};
oldNixpkgs = import oldNixpkgsSrc {};
docs = import ./nix/docs.nix { nixpkgs = oldNixpkgsSrc; };
benchmarks = import ./nix/benchmarks.nix { inherit nixpkgs; };
compilerPkg = if compiler != ""
then pkgs.${compiler}
else stdenv.cc;
theStdenv = if compilerPkg.isClang
then clangStdenv
else stdenv;
in
theStdenv.mkDerivation rec {
name = "immer-env";
buildInputs = [
compilerPkg
git
cmake
pkgconfig
ninja
gdb
lldb
ccache
boost
boehmgc
benchmarks.c_rrb
benchmarks.steady
benchmarks.chunkedseq
benchmarks.immutable_cpp
benchmarks.hash_trie
oldNixpkgs.doxygen
(oldNixpkgs.python.withPackages (ps: [
ps.sphinx
docs.breathe
docs.recommonmark
]))
];
shellHook = ''
export CC=${compilerPkg}/bin/cc
export CXX=${compilerPkg}/bin/c++
'';
hardeningDisable = [ "fortify" ];
}