summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/blessed/default.nix
blob: 82c357dfdb8a5570e01e5f9947248ad503292e2c (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
{
  lib,
  stdenv,
  buildPythonPackage,
  fetchFromGitHub,
  flit-core,
  wcwidth,
  six,
  pytestCheckHook,
  mock,
  glibcLocales,
}:

buildPythonPackage {
  pname = "blessed";
  # We need https://github.com/jquast/blessed/pull/311 to fix 3.13
  version = "1.25-unstable-2025-12-05";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "jquast";
    repo = "blessed";
    rev = "cee680ff7fb3ad31f42ae98582ba74629f1fd6b0";
    hash = "sha256-4K1W0LXJKkb2wKE6D+IkX3oI5KxkpKbO661W/VTHgts=";
  };

  build-system = [ flit-core ];

  dependencies = [
    wcwidth
    six
  ];

  nativeCheckInputs = [
    pytestCheckHook
    mock
    glibcLocales
  ];

  # Default tox.ini parameters not needed
  preCheck = ''
    rm tox.ini
  '';

  disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [
    # Fail with several AssertionError
    "tests/test_sixel.py"
  ];

  meta = {
    homepage = "https://github.com/jquast/blessed";
    description = "Thin, practical wrapper around terminal capabilities in Python";
    maintainers = with lib.maintainers; [ eqyiel ];
    license = lib.licenses.mit;
  };
}