nixpkgs: clang-analyzer 3.4
Signed-off-by: Austin Seipp <aseipp@pobox.com>
This commit is contained in:
parent
52514efb16
commit
3c3256e4a8
31
pkgs/development/tools/analysis/clang-analyzer/default.nix
Normal file
31
pkgs/development/tools/analysis/clang-analyzer/default.nix
Normal file
@ -0,0 +1,31 @@
|
||||
{ stdenv, fetchurl, clang, llvmPackages, perl, makeWrapper }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "clang-analyzer-${version}";
|
||||
version = "3.4";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://llvm.org/releases/${version}/clang-${version}.src.tar.gz";
|
||||
sha256 = "06rb4j1ifbznl3gfhl98s7ilj0ns01p7y7zap4p7ynmqnc6pia92";
|
||||
};
|
||||
|
||||
buildInputs = [ clang llvmPackages.clang perl makeWrapper ];
|
||||
buildPhase = "true";
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin $out/libexec
|
||||
cp -R tools/scan-view $out/libexec
|
||||
cp -R tools/scan-build $out/libexec
|
||||
|
||||
makeWrapper $out/libexec/scan-view/scan-view $out/bin/scan-view
|
||||
makeWrapper $out/libexec/scan-build/scan-build $out/bin/scan-build --add-flags "--use-cc=${clang}/bin/clang" --add-flags "--use-c++=${clang}/bin/clang++" --add-flags "--use-analyzer=${llvmPackages.clang}/bin/clang"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Clang Static Analyzer";
|
||||
homepage = "http://clang-analyzer.llvm.org";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
|
||||
};
|
||||
}
|
@ -2431,6 +2431,11 @@ let
|
||||
clang_32 = wrapClang (clangUnwrapped llvm_32 ../development/compilers/llvm/3.2/clang.nix);
|
||||
clang_31 = wrapClang (clangUnwrapped llvm_31 ../development/compilers/llvm/3.1/clang.nix);
|
||||
|
||||
clangAnalyzer = callPackage ../development/tools/analysis/clang-analyzer {
|
||||
clang = clang_34;
|
||||
llvmPackages = llvmPackages_34;
|
||||
};
|
||||
|
||||
clangUnwrapped = llvm: pkg: callPackage pkg {
|
||||
stdenv = if stdenv.isDarwin
|
||||
then stdenvAdapters.overrideGCC stdenv gccApple
|
||||
|
Loading…
Reference in New Issue
Block a user