forked from leanprover/lean4
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshell.nix
29 lines (29 loc) · 988 Bytes
/
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
let
flakePkgs = (import ./default.nix).packages.${builtins.currentSystem};
in { pkgs ? flakePkgs.nixpkgs, llvmPackages ? null }:
# use `shell` as default
(attribs: attribs.shell // attribs) rec {
shell = pkgs.mkShell.override {
stdenv = pkgs.overrideCC pkgs.stdenv (if llvmPackages == null
then flakePkgs.llvmPackages
else pkgs.${"llvmPackages_${llvmPackages}"}).clang;
} rec {
buildInputs = with pkgs; [ cmake gmp ccache ];
# https://github.com/NixOS/nixpkgs/issues/60919
hardeningDisable = [ "all" ];
# more convenient `ctest` output
CTEST_OUTPUT_ON_FAILURE = 1;
shellHook = ''
export LEAN_SRC_PATH="$PWD/src"
'';
};
with-temci = shell.overrideAttrs (old: {
buildInputs = old.buildInputs ++ [ flakePkgs.temci ];
});
nix = pkgs.mkShell {
buildInputs = [ flakePkgs.nix ];
shellHook = ''
export LEAN_SRC_PATH="$PWD/src"
'';
};
}