clang-analyzer: Fix the build with LLVM 13

We changed the source structure ("src") by switching from individual
source tarballs to the mono repository. Therefore we have to prepend
"clang/" now.

+18 -14
+10 -10
pkgs/development/tools/analysis/clang-analyzer/0001-Fix-scan-build-to-use-NIX_CFLAGS_COMPILE.patch
··· 1 - From 40239d92957f1969652cdd41d6d2749c41ac4338 Mon Sep 17 00:00:00 2001 1 + From 99a7e55a60c8d96e160f9104a3dd31b7914d3488 Mon Sep 17 00:00:00 2001 2 2 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io> 3 3 Date: Fri, 31 Jul 2020 09:22:03 +0100 4 - Subject: [PATCH] [PATCH] Fix scan-build to use NIX_CFLAGS_COMPILE 4 + Subject: [PATCH] Fix scan-build to use NIX_CFLAGS_COMPILE 5 5 MIME-Version: 1.0 6 6 Content-Type: text/plain; charset=UTF-8 7 7 Content-Transfer-Encoding: 8bit 8 8 9 9 Signed-off-by: Jörg Thalheim <joerg@thalheim.io> 10 10 --- 11 - tools/scan-build/libexec/ccc-analyzer | 8 ++++++++ 11 + clang/tools/scan-build/libexec/ccc-analyzer | 8 ++++++++ 12 12 1 file changed, 8 insertions(+) 13 13 14 - diff --git a/tools/scan-build/libexec/ccc-analyzer b/tools/scan-build/libexec/ccc-analyzer 15 - index 800f38b5..0fb50fb3 100755 16 - --- a/tools/scan-build/libexec/ccc-analyzer 17 - +++ b/tools/scan-build/libexec/ccc-analyzer 18 - @@ -246,6 +246,14 @@ sub Analyze { 14 + diff --git a/clang/tools/scan-build/libexec/ccc-analyzer 15 + b/clang/tools/scan-build/libexec/ccc-analyzer 16 + index ed0d4d3d73f3..2d5113435ca5 100755 17 + --- a/clang/tools/scan-build/libexec/ccc-analyzer 18 + +++ b/clang/tools/scan-build/libexec/ccc-analyzer 19 + @@ -249,6 +249,14 @@ sub Analyze { 19 20 push @Args, "-target", $AnalyzerTarget; 20 21 } 21 22 ··· 31 32 @CmdArgs = @$AnalysisArgs; 32 33 } 33 34 -- 34 - 2.27.0 35 - 35 + 2.33.0
+8 -4
pkgs/development/tools/analysis/clang-analyzer/default.nix
··· 12 12 13 13 installPhase = '' 14 14 mkdir -p $out/share/scan-view $out/bin 15 - cp -R tools/scan-view/share/* $out/share/scan-view 16 - cp -R tools/scan-view/bin/* $out/bin/scan-view 17 - cp -R tools/scan-build/* $out 15 + cp -R clang/tools/scan-view/share/* $out/share/scan-view 16 + cp -R clang/tools/scan-view/bin/* $out/bin/scan-view 17 + cp -R clang/tools/scan-build/* $out 18 18 19 19 rm $out/bin/*.bat $out/libexec/*.bat $out/CMakeLists.txt 20 20 ··· 26 26 27 27 meta = { 28 28 description = "Clang Static Analyzer"; 29 - homepage = "http://clang-analyzer.llvm.org"; 29 + longDescription = '' 30 + The Clang Static Analyzer is a source code analysis tool that finds bugs 31 + in C, C++, and Objective-C programs. 32 + ''; 33 + homepage = "https://clang-analyzer.llvm.org/"; 30 34 license = lib.licenses.bsd3; 31 35 platforms = lib.platforms.unix; 32 36 maintainers = [ lib.maintainers.thoughtpolice ];