about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/anova-wifi/default.nix
blob: a94ef0e3d624a0dc96e4bce497416f2958745482 (plain) (blame)
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
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, poetry-core
, aiohttp
, sensor-state-data
, pytestCheckHook
, pytest-asyncio
}:

buildPythonPackage rec {
  pname = "anova-wifi";
  version = "0.11.6";
  pyproject = true;

  disabled = pythonOlder "3.10";

  src = fetchFromGitHub {
    owner = "Lash-L";
    repo = "anova_wifi";
    rev = "refs/tags/v${version}";
    hash = "sha256-zRMs0GAsLgKt1R0SfRFPchjmk87K2d8vBeHJs66k9xc=";
  };

  postPatch = ''
      substituteInPlace pyproject.toml \
        --replace "--cov=anova_wifi --cov-report=term-missing:skip-covered" ""
    '';

  nativeBuildInputs = [
    poetry-core
  ];

  propagatedBuildInputs = [
    aiohttp
    sensor-state-data
  ];

  nativeCheckInputs = [
    pytestCheckHook
    pytest-asyncio
  ];

  disabledTests = [
    # Makes network calls
    "test_async_data_1"
  ];

  pythonImportsCheck = [ "anova_wifi" ];

  meta = with lib; {
    description = "A Python package for reading anova sous vide api data";
    homepage = "https://github.com/Lash-L/anova_wifi";
    changelog = "https://github.com/Lash-L/anova_wifi/releases/tag/v${version}";
    maintainers = with maintainers; [ jamiemagee ];
    license = licenses.mit;
  };
}