Skip to content

Commit

Permalink
codechecker: init at 6.23.1
Browse files Browse the repository at this point in the history
  • Loading branch information
zebreus committed Jun 3, 2024
1 parent 33ce359 commit 7b1b24b
Showing 1 changed file with 117 additions and 0 deletions.
117 changes: 117 additions & 0 deletions pkgs/by-name/co/codechecker/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
{
lib,
python3,
fetchPypi,
fetchFromGitHub,
makeWrapper,
cppcheck,
clang,
gcc,
clang-tools,
}:
let
python = python3.override {
packageOverrides = self: super: rec {
# codechecker is incompatible with SQLAlchemy greater than 1.3
sqlalchemy = super.sqlalchemy_1_4.overridePythonAttrs (oldAttrs: rec {
version = "1.3.23";
pname = oldAttrs.pname;
src = fetchFromGitHub {
owner = "sqlalchemy";
repo = "sqlalchemy";
rev = "rel_${lib.replaceStrings [ "." ] [ "_" ] version}";
hash = "sha256-hWA0/f7rQpEfYTg10i0rBK3qeJbw3p6HW7S59rLnD0Q=";
};
doCheck = false;
# That test does not exist in the 1.3 branch so we get an error for disabling it
disabledTestPaths = builtins.filter (
testPath: testPath != "test/ext/mypy"
) oldAttrs.disabledTestPaths;
});
sqlalchemy_1_4 = sqlalchemy;

# The current alembic version is not compatible with SQLAlchemy 1.3 so we need to downgrade it
alembic = super.alembic.overridePythonAttrs (oldAttrs: rec {
pname = "alembic";
version = "1.5.5";
src = fetchPypi {
inherit pname version;
hash = "sha256-3wAowZJ1os/xN+OWF6Oc3NvRFzczuHtr+iV7fAhgITs=";
};
doCheck = false;
dependencies = oldAttrs.dependencies ++ [
super.python-dateutil
super.python-editor
];
});
};
};
python3Packages = python.pkgs;
in
python3Packages.buildPythonApplication rec {
pname = "codechecker";
version = "6.23.1";
pyproject = true;

src = fetchPypi {
inherit pname version;
hash = "sha256-ylTEjyZChAl7XvZGXT0cNSpOVbWKyTkrkRWX9gOeNto=";
};

nativeBuildInputs = with python3Packages; [
setuptools
pythonRelaxDepsHook
makeWrapper
];

propagatedBuildInputs = with python3Packages; [
lxml
sqlalchemy
alembic
portalocker
psutil
multiprocess
thrift
gitpython
pyyaml
types-pyyaml
sarif-tools
pytest
pycodestyle
pylint
mkdocs
coverage
];
pythonRelaxDeps = [
"thrift"
"portalocker"
"types-pyyaml"
"lxml"
"psutil"
"multiprocess"
"gitpython"
"sarif-tools"
];

# CodeChecker needs to be able to find the analyzers at runtime
postInstall = ''
wrapProgram "$out/bin/CodeChecker" --prefix PATH : ${
lib.makeBinPath [
cppcheck
clang
gcc
clang-tools
]
}
'';

meta = with lib; {
homepage = "https://github.com/Ericsson/codechecker";
changelog = "https://github.com/Ericsson/codechecker/releases/tag/v${version}";
description = "Analyzer tooling, defect database and viewer extension for the Clang Static Analyzer and Clang Tidy";
license = licenses.asl20-llvm;
maintainers = with maintainers; [ zebreus ];
mainProgram = "CodeChecker";
platforms = platforms.all;
};
}

0 comments on commit 7b1b24b

Please sign in to comment.