Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

codechecker: init at 6.23.1 #301700

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
};
}