-
-
Notifications
You must be signed in to change notification settings - Fork 68
/
Copy pathflake.nix
62 lines (55 loc) · 1.58 KB
/
flake.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
{
description = "Dev environment for jank";
inputs = {
flake-parts.url = "github:hercules-ci/flake-parts";
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
};
outputs = inputs @ {flake-parts, ...}:
flake-parts.lib.mkFlake {inherit inputs;} {
systems = ["x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin"];
perSystem = {
pkgs,
...
}: {
legacyPackages = pkgs;
formatter = pkgs.alejandra;
devShells.default = (pkgs.mkShell.override { stdenv = pkgs.llvmPackages.stdenv; }) {
packages = with pkgs; [
## Required tools.
cmake
ninja
pkg-config
clang
## Required libs.
boehmgc
boost
libzip
openssl
## Dev tools.
entr
gcovr
lcov
git
nixd
shellcheck
# For clangd
llvm
llvmPackages.libclang
# For clang-tidy.
llvmPackages.clang-tools
## Dev libs.
doctest
];
shellHook =
''
export ASAN_OPTIONS=detect_leaks=0
'';
# Nix assumes fortification by default, but that fails with debug builds.
# Since this shell is used for development, we disabled fortification. It's
# still enabled for our release builds in build.nix.
# https://github.com/NixOS/nixpkgs/issues/18995
hardeningDisable = [ "fortify" ];
};
};
};
}