analyze-build, intercept-build, scan-build: init at 19.1.7 (#425936)

Sandro 972d4525 f3b7bdbb

Changed files
+213
pkgs
by-name
an
analyze-build
in
intercept-build
sc
scan-build-py
development
python-modules
libear
libscanbuild
top-level
+46
pkgs/by-name/an/analyze-build/package.nix
···
+
{
+
lib,
+
llvmPackages,
+
python3,
+
}:
+
let
+
inherit (llvmPackages) clang-unwrapped;
+
in
+
python3.pkgs.buildPythonApplication rec {
+
pname = "analyze-build";
+
inherit (clang-unwrapped) version;
+
+
format = "other";
+
+
src = clang-unwrapped + "/bin";
+
+
dontUnpack = true;
+
+
dependencies = with python3.pkgs; [
+
libscanbuild
+
];
+
+
installPhase = ''
+
mkdir -p "$out/bin"
+
install "$src/analyze-build" "$out/bin/"
+
'';
+
+
makeWrapperArgs = [
+
"--prefix"
+
"PATH"
+
":"
+
(lib.makeBinPath [ clang-unwrapped ])
+
];
+
+
meta = {
+
description = "run Clang static analyzer against a project with compilation database";
+
homepage = "https://github.com/llvm/llvm-project/tree/llvmorg-${version}/clang/tools/scan-build-py/";
+
mainProgram = "scan-build";
+
license = with lib.licenses; [
+
asl20
+
llvm-exception
+
];
+
maintainers = with lib.maintainers; [ RossSmyth ];
+
platforms = lib.intersectLists python3.meta.platforms clang-unwrapped.meta.platforms;
+
};
+
}
+38
pkgs/by-name/in/intercept-build/package.nix
···
+
{
+
lib,
+
llvmPackages,
+
python3,
+
}:
+
let
+
inherit (llvmPackages) clang-unwrapped;
+
in
+
python3.pkgs.buildPythonApplication rec {
+
pname = "intercept-build";
+
inherit (clang-unwrapped) version;
+
+
format = "other";
+
+
src = clang-unwrapped + "/bin";
+
+
dontUnpack = true;
+
+
dependencies = with python3.pkgs; [
+
libscanbuild
+
];
+
+
installPhase = ''
+
mkdir -p "$out/bin"
+
install "$src/intercept-build" "$out/bin"
+
'';
+
+
meta = {
+
description = "intercepts the build process to generate a compilation database";
+
homepage = "https://github.com/llvm/llvm-project/tree/llvmorg-${version}/clang/tools/scan-build-py/";
+
mainProgram = "intercept-build";
+
license = with lib.licenses; [
+
asl20
+
llvm-exception
+
];
+
maintainers = with lib.maintainers; [ RossSmyth ];
+
};
+
}
+46
pkgs/by-name/sc/scan-build-py/package.nix
···
+
{
+
lib,
+
llvmPackages,
+
python3,
+
}:
+
let
+
inherit (llvmPackages) clang-unwrapped;
+
in
+
python3.pkgs.buildPythonApplication rec {
+
pname = "scan-build-py";
+
inherit (clang-unwrapped) version;
+
+
format = "other";
+
+
src = clang-unwrapped + "/bin";
+
+
dontUnpack = true;
+
+
dependencies = with python3.pkgs; [
+
libscanbuild
+
];
+
+
installPhase = ''
+
mkdir -p "$out/bin"
+
install "$src/scan-build-py" "$out/bin/scan-build-py"
+
'';
+
+
makeWrapperArgs = [
+
"--prefix"
+
"PATH"
+
":"
+
(lib.makeBinPath [ clang-unwrapped ])
+
];
+
+
meta = {
+
description = "intercepts the build process to generate a compilation database";
+
homepage = "https://github.com/llvm/llvm-project/tree/llvmorg-${version}/clang/tools/scan-build-py/";
+
mainProgram = "scan-build-py";
+
license = with lib.licenses; [
+
asl20
+
llvm-exception
+
];
+
maintainers = with lib.maintainers; [ RossSmyth ];
+
platforms = lib.intersectLists python3.meta.platforms clang-unwrapped.meta.platforms;
+
};
+
}
+37
pkgs/development/python-modules/libear/default.nix
···
+
{
+
lib,
+
llvmPackages,
+
buildPythonPackage,
+
}:
+
let
+
inherit (llvmPackages) clang-unwrapped;
+
in
+
buildPythonPackage rec {
+
pname = "libear";
+
inherit (clang-unwrapped) version;
+
+
format = "other";
+
+
src = clang-unwrapped.lib + "/lib/libear";
+
+
dontUnpack = true;
+
+
installPhase = ''
+
LIBPATH="$(toPythonPath "$out")/libear"
+
mkdir -p "$LIBPATH"
+
+
install -t "$LIBPATH" $src/*
+
'';
+
+
pythonImportsCheck = [ "libear" ];
+
+
meta = {
+
description = "Hooks into build systems to listen to which files are opened";
+
homepage = "https://github.com/llvm/llvm-project/tree/llvmorg-${version}/clang/tools/scan-build-py/lib/libear";
+
license = with lib.licenses; [
+
asl20
+
llvm-exception
+
];
+
maintainers = with lib.maintainers; [ RossSmyth ];
+
};
+
}
+42
pkgs/development/python-modules/libscanbuild/default.nix
···
+
{
+
lib,
+
llvmPackages,
+
buildPythonPackage,
+
libear,
+
}:
+
let
+
inherit (llvmPackages) clang-unwrapped;
+
in
+
buildPythonPackage rec {
+
pname = "libscanbuild";
+
inherit (clang-unwrapped) version;
+
+
format = "other";
+
+
src = clang-unwrapped.lib + "/lib/libscanbuild";
+
+
dontUnpack = true;
+
+
dependencies = [
+
libear
+
];
+
+
installPhase = ''
+
LIBPATH="$(toPythonPath "$out")/libscanbuild"
+
mkdir -p "$LIBPATH"
+
+
cp -r "$src/"* "$LIBPATH"
+
'';
+
+
pythonImportsCheck = [ "libscanbuild" ];
+
+
meta = {
+
description = "Captures all child process creation and log information about it";
+
homepage = "https://github.com/llvm/llvm-project/tree/llvmorg-${version}/clang/tools/scan-build-py/lib/libscanbuild";
+
license = with lib.licenses; [
+
asl20
+
llvm-exception
+
];
+
maintainers = with lib.maintainers; [ RossSmyth ];
+
};
+
}
+4
pkgs/top-level/python-packages.nix
···
(p: p.py)
];
+
libear = callPackage ../development/python-modules/libear { };
+
libevdev = callPackage ../development/python-modules/libevdev { };
libfdt = toPythonModule (
···
inherit (self) python;
);
+
+
libscanbuild = callPackage ../development/python-modules/libscanbuild { };
libselinux = lib.pipe pkgs.libselinux [
toPythonModule