summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/terminaltables3/default.nix
blob: 6f7b82e329d6dcea5b9aacbe3bd17a75583bfac9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{
  lib,
  buildPythonPackage,
  colorama,
  colorclass,
  fetchFromGitHub,
  poetry-core,
  pytest-cov-stub,
  pytest-xdist,
  pytestCheckHook,
  pythonOlder,
  termcolor,
}:

buildPythonPackage rec {
  pname = "terminaltables3";
  version = "4.0.0-unstable-2024-07-21";
  pyproject = true;

  disabled = pythonOlder "3.11";

  src = fetchFromGitHub {
    owner = "matthewdeanmartin";
    repo = "terminaltables3";
    #tag = "v${version}";
    rev = "f1c465b36eb9b91a984d8864b21376e7c37075b8";
    hash = "sha256-UcEovh1Eb4QNPwLGDjCphPlJSSkOdhCJ2fK3tuSWOTc=";
  };

  build-system = [ poetry-core ];

  nativeCheckInputs = [
    colorama
    colorclass
    pytest-cov-stub
    pytest-xdist
    pytestCheckHook
    termcolor
  ];

  pythonImportsCheck = [ "terminaltables3" ];

  disabledTests = [
    # Tests are comparing CLI output
    "test_color"
    "test_colors"
    "test_height"
    "test_width"
  ];

  meta = {
    description = "Generate simple tables in terminals from a nested list of strings";
    homepage = "https://github.com/matthewdeanmartin/terminaltables3";
    changelog = "https://github.com/matthewdeanmartin/terminaltables3/blob/${src.rev}/CHANGELOG.md";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ fab ];
  };
}