From a3ef99139a79657a5c0e99f4b742023f546ac74a Mon Sep 17 00:00:00 2001 From: Qyriad Date: Mon, 6 May 2024 22:59:41 -0600 Subject: [PATCH] flake: fix devShell on i686-linux by disabling ClangBuildAnalyzer on it ClangBuildAnalyzer doesn't build on i686-linux due to `long long int`/`size_t` conversion errors, so let's just exclude it from the devshell on that platform Change-Id: If1077a7b3860db4381999c8e304f6d4b2bc96a05 --- flake.nix | 7 ++++--- misc/clangbuildanalyzer.nix | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 3dc9b3ac3..79ac9caea 100644 --- a/flake.nix +++ b/flake.nix @@ -408,9 +408,10 @@ pkgs.buildPackages.meson pkgs.buildPackages.ninja pkgs.buildPackages.cmake - - pkgs.buildPackages.clangbuildanalyzer - ]; + ] + ++ + lib.optionals (lib.meta.availableOn pkgs.stdenv.hostPlatform pkgs.buildPackages.clangbuildanalyzer) + [ pkgs.buildPackages.clangbuildanalyzer ]; src = null; diff --git a/misc/clangbuildanalyzer.nix b/misc/clangbuildanalyzer.nix index cee8a0d77..31d6204ce 100644 --- a/misc/clangbuildanalyzer.nix +++ b/misc/clangbuildanalyzer.nix @@ -25,6 +25,8 @@ stdenv.mkDerivation (finalAttrs: { maintainers = with lib.maintainers; [ lf- ]; license = lib.licenses.unlicense; platforms = lib.platforms.unix; + # `long long int` != `size_t` + badPlatforms = lib.platforms.i686; mainProgram = "ClangBuildAnalyzer"; }; })