1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 colorlog,
6 jinja2,
7 lxml,
8 pygments,
9 pythonOlder,
10 setuptools,
11 tomli,
12}:
13
14buildPythonPackage rec {
15 pname = "gcovr";
16 version = "8.2";
17 pyproject = true;
18
19 disabled = pythonOlder "3.9";
20
21 src = fetchPypi {
22 inherit pname version;
23 hash = "sha256-mh3d1FhdE+x3VV211rajHugVh+pvxgT/n80jLLB4LfU=";
24 };
25
26 build-system = [ setuptools ];
27
28 dependencies = [
29 colorlog
30 jinja2
31 lxml
32 pygments
33 ] ++ lib.optionals (pythonOlder "3.11") [ tomli ];
34
35 # There are no unit tests in the pypi tarball. Most of the unit tests on the
36 # github repository currently only work with gcc5, so we just disable them.
37 # See also: https://github.com/gcovr/gcovr/issues/206
38 doCheck = false;
39
40 pythonImportsCheck = [
41 "gcovr"
42 "gcovr.configuration"
43 ];
44
45 meta = {
46 description = "Python script for summarizing gcov data";
47 homepage = "https://www.gcovr.com/";
48 changelog = "https://github.com/gcovr/gcovr/blob/${version}/CHANGELOG.rst";
49 license = lib.licenses.bsd0;
50 maintainers = with lib.maintainers; [ sigmanificient ];
51 mainProgram = "gcovr";
52 };
53}