-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
59 lines (53 loc) · 1.47 KB
/
Copy pathflake.nix
File metadata and controls
59 lines (53 loc) · 1.47 KB
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
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
treefmt-nix.url = "github:numtide/treefmt-nix";
};
outputs =
inputs@{ flake-parts, treefmt-nix, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
imports = [ treefmt-nix.flakeModule ];
perSystem =
{ pkgs, config, ... }:
let
llvm = pkgs.llvmPackages_22;
in
{
devShells.default = pkgs.mkShell.override { stdenv = llvm.libcxxStdenv; } {
packages = with pkgs; [
config.treefmt.build.wrapper
llvm.clang-tools
llvm.lldb
cmake
cmake-language-server
ninja
pkg-config
just
doctest
libssh
];
CMAKE_EXPORT_COMPILE_COMMANDS = "1";
CMAKE_GENERATOR = "Ninja";
CC = "clang";
CXX = "clang++";
};
treefmt = {
projectRootFile = "flake.nix";
settings.global.excludes = [ "build/**" ];
programs = {
clang-format.enable = true;
nixfmt.enable = true;
just.enable = true;
};
};
formatter = config.treefmt.build.wrapper;
};
};
}