1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 fetchFromGitHub,
6
7 # build-system
8 hatchling,
9
10 # tests
11 pytestCheckHook,
12}:
13
14buildPythonPackage rec {
15 pname = "tinyio";
16 version = "0.2.0";
17 pyproject = true;
18
19 src = fetchFromGitHub {
20 owner = "patrick-kidger";
21 repo = "tinyio";
22 tag = "v${version}";
23 hash = "sha256-5Fk+/tT6mkyIosRKTFG5XuFtAM5wy3v0npiJjN47WV8=";
24 };
25
26 build-system = [
27 hatchling
28 ];
29
30 pythonImportsCheck = [ "tinyio" ];
31
32 nativeCheckInputs = [
33 pytestCheckHook
34 ];
35
36 disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [
37 # AssertionError
38 # assert 0 >= 4, where 0 = sum([False, False, False, False, False])
39 "test_sleep"
40 ];
41
42 meta = {
43 description = "Dead-simple event loop for Python";
44 homepage = "https://github.com/patrick-kidger/tinyio";
45 changelog = "https://github.com/patrick-kidger/tinyio/releases/tag/v${version}";
46 license = lib.licenses.asl20;
47 maintainers = with lib.maintainers; [ GaetanLepage ];
48 };
49}