summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/enocean-async/default.nix
blob: a92f9dd4d86f2f7328b9a63c06d4558060e3a814 (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
{
  buildPythonPackage,
  fetchFromGitHub,
  fetchpatch,
  lib,
  pyserial-asyncio-fast,
  pytest-asyncio,
  pytestCheckHook,
  pythonOlder,
  setuptools,
}:

buildPythonPackage (finalAttrs: {
  pname = "enocean-async";
  version = "0.4.2";
  pyproject = true;

  disabled = pythonOlder "3.14";

  src = fetchFromGitHub {
    owner = "henningkerstan";
    repo = "enocean-async";
    tag = "v${finalAttrs.version}";
    hash = "sha256-VBBZwNPBgJ9rXUaAVtRzgdebeDtfJCt7R1zOu3Eom80=";
  };

  build-system = [ setuptools ];

  dependencies = [
    pyserial-asyncio-fast
  ];

  pythonImportsCheck = [ "enocean_async" ];

  nativeCheckInputs = [
    pytest-asyncio
    pytestCheckHook
  ];

  disabledTestPaths = [
    # tests have broken imports, fixed in 0.12.4
    "tests/test_eep.py"
  ];

  meta = {
    changelog = "https://github.com/henningkerstan/enocean-async/blob/${finalAttrs.src.tag}/CHANGELOG.md";
    description = "Async implementation of the EnOcean Serial Protocol Version 3";
    license = lib.licenses.asl20;
    maintainers = [ lib.maintainers.dotlambda ];
  };
})