-
-
Notifications
You must be signed in to change notification settings - Fork 200
Expand file tree
/
Copy pathshell.nix
More file actions
41 lines (37 loc) · 936 Bytes
/
shell.nix
File metadata and controls
41 lines (37 loc) · 936 Bytes
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
{
flake ? import ./nix/flake-compat.nix { },
pkgs ? import flake.inputs.nixpkgs { },
toolchain ? "",
...
}@args:
let
lib = pkgs.lib;
toolchain-stdenv = pkgs.callPackage ./nix/choose-stdenv.nix {
inherit toolchain;
};
stdenv = toolchain-stdenv;
# use Catch2 v3
catch2_3 = pkgs.catch2_3.override {
inherit stdenv;
};
immer = pkgs.callPackage ./nix/immer.nix {
inherit catch2_3 stdenv;
fmt = pkgs.fmt.override { inherit stdenv; };
withTests = true;
withExamples = true;
withPersist = true;
withBenchmarks = stdenv.isLinux;
withDocs = stdenv.isLinux;
withValgrind = stdenv.isLinux;
};
in
pkgs.mkShell.override { stdenv = toolchain-stdenv; } {
inputsFrom = [ immer ];
packages = (
with pkgs;
[ ccache ]
++ lib.optionals toolchain-stdenv.cc.isClang [ lldb ]
++ lib.optionals toolchain-stdenv.cc.isGNU [ gdb ]
);
hardeningDisable = [ "fortify" ];
}