summaryrefslogtreecommitdiffstats
path: root/pkgs/development/python-modules/aiolyric/default.nix
blob: 162258ce60753dd764cdb24e236b808b86c879e3 (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
59
60
61
62
63
{
  lib,
  aiohttp,
  aioresponses,
  buildPythonPackage,
  fetchFromGitHub,
  packaging,
  pytest-asyncio,
  pytestCheckHook,
  setuptools,
}:

buildPythonPackage (finalAttrs: {
  pname = "aiolyric";
  version = "2.1.2";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "timmo001";
    repo = "aiolyric";
    tag = finalAttrs.version;
    hash = "sha256-jIJTQm86PBnLwJlYalEhppU01g02wbu20kpVvP4kXz0=";
  };

  postPatch = ''
    substituteInPlace setup.py \
      --replace-fail .dev0 ""
  '';

  build-system = [
    setuptools
  ];

  pythonRelaxDeps = [
    "packaging"
  ];

  dependencies = [
    aiohttp
    packaging
  ];

  nativeCheckInputs = [
    aioresponses
    pytest-asyncio
    pytestCheckHook
  ];

  pythonImportsCheck = [ "aiolyric" ];

  disabledTestPaths = [
    # _version file is no shipped
    "tests/test__version.py"
  ];

  meta = {
    description = "Python module for the Honeywell Lyric Platform";
    homepage = "https://github.com/timmo001/aiolyric";
    changelog = "https://github.com/timmo001/aiolyric/releases/tag/${finalAttrs.src.tag}";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ fab ];
  };
})