summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/tinyio/default.nix
blob: eff689b2d5eabdc3780c3ee3be2e8fbc984e74ec (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
{
  lib,
  stdenv,
  buildPythonPackage,
  fetchFromGitHub,

  # build-system
  hatchling,

  # tests
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "tinyio";
  version = "0.2.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "patrick-kidger";
    repo = "tinyio";
    tag = "v${version}";
    hash = "sha256-5Fk+/tT6mkyIosRKTFG5XuFtAM5wy3v0npiJjN47WV8=";
  };

  build-system = [
    hatchling
  ];

  pythonImportsCheck = [ "tinyio" ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

  disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [
    # AssertionError
    # assert 0 >= 4, where 0 = sum([False, False, False, False, False])
    "test_sleep"
  ];

  meta = {
    description = "Dead-simple event loop for Python";
    homepage = "https://github.com/patrick-kidger/tinyio";
    changelog = "https://github.com/patrick-kidger/tinyio/releases/tag/v${version}";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ GaetanLepage ];
  };
}