1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 hatchling,
6 chardet,
7 gitpython,
8 pygments,
9 rich,
10 pytestCheckHook,
11}:
12
13buildPythonPackage rec {
14 pname = "pygount";
15 version = "3.1.0";
16 pyproject = true;
17
18 src = fetchFromGitHub {
19 owner = "roskakori";
20 repo = "pygount";
21 tag = "v${version}";
22 hash = "sha256-hoj27L1wXOjzU3jdWIP5MtlO6fzKOYXfW/Pf3AdYKc0=";
23 };
24
25 build-system = [
26 hatchling
27 ];
28
29 dependencies = [
30 chardet
31 gitpython
32 pygments
33 rich
34 ];
35
36 nativeCheckInputs = [
37 pytestCheckHook
38 ];
39
40 disabledTests = [
41 # requires network access
42 "test_can_find_files_from_mixed_cloned_git_remote_url_and_local"
43 "test_can_extract_and_close_and_find_files_from_cloned_git_remote_url_with_revision"
44 "test_succeeds_on_not_git_extension"
45 ];
46
47 pythonImportsCheck = [ "pygount" ];
48
49 meta = {
50 description = "Count lines of code for hundreds of languages using pygments";
51 mainProgram = "pygount";
52 homepage = "https://github.com/roskakori/pygount";
53 changelog = "https://github.com/roskakori/pygount/blob/${src.tag}/docs/changes.md";
54 license = with lib.licenses; [ bsd3 ];
55 maintainers = with lib.maintainers; [ nickcao ];
56 };
57}