aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorJade Lovelace <lix@jade.fyi>2024-03-17 19:54:58 -0700
committerJade Lovelace <lix@jade.fyi>2024-03-18 16:10:29 -0700
commit6b0020749d4b1711b669ba68fe74474f8241f084 (patch)
tree2dc3b3c61350187d299b689571653fd1ca35e131 /flake.nix
parent61e21b25576f7f3491f6a837bf59d8b44c6897a0 (diff)
clang-tidy check infrastructure
This brings in infrastructure for developing new custom clang-tidy lints and refactors for Lix. Change-Id: I3df5f5855712ab4f97d4e84d771e5e818f81f881
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix9
1 files changed, 8 insertions, 1 deletions
diff --git a/flake.nix b/flake.nix
index 11c461896..3ee9a4994 100644
--- a/flake.nix
+++ b/flake.nix
@@ -317,11 +317,18 @@
};
in
nix.overrideAttrs (prev: {
+ # Required for clang-tidy checks
+ buildInputs = prev.buildInputs ++ lib.optionals (stdenv.cc.isClang) [ pkgs.llvmPackages.llvm pkgs.llvmPackages.clang-unwrapped.dev ];
nativeBuildInputs = prev.nativeBuildInputs
++ lib.optional (stdenv.cc.isClang && !stdenv.buildPlatform.isDarwin) pkgs.buildPackages.bear
+ # Required for clang-tidy checks
+ ++ lib.optionals (stdenv.cc.isClang) [ pkgs.buildPackages.cmake pkgs.buildPackages.ninja pkgs.buildPackages.llvmPackages.llvm.dev ]
++ lib.optional
(stdenv.cc.isClang && stdenv.hostPlatform == stdenv.buildPlatform)
- pkgs.buildPackages.clang-tools;
+ # for some reason that seems accidental and was changed in
+ # NixOS 24.05-pre, clang-tools is pinned to LLVM 14 when
+ # default LLVM is newer.
+ (pkgs.buildPackages.clang-tools.override { inherit (pkgs.buildPackages) llvmPackages; });
src = null;