aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorjade <lix@jade.fyi>2024-03-21 12:28:13 -0600
committerGerrit Code Review <gerrit@lix>2024-03-21 12:28:13 -0600
commita7161b6c0f6f9640acc065f0bd18579babacb0cf (patch)
tree70a36d9773d8ab28f29fdc88135ddc589098b8ab /flake.nix
parentfab55aff0eca23115323d4d08d9b965d8fe3e137 (diff)
parent6b0020749d4b1711b669ba68fe74474f8241f084 (diff)
Merge "clang-tidy check infrastructure" into main
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 c201a575f..cd5727415 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;