summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/amberelectric/default.nix
blob: ff61740740329968812f19fa3e05c78f8fb26da8 (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
{
  lib,
  aenum,
  buildPythonPackage,
  fetchFromGitHub,
  poetry-core,
  pydantic,
  pytest-mock,
  pytestCheckHook,
  python-dateutil,
  urllib3,
}:

buildPythonPackage rec {
  pname = "amberelectric";
  version = "2.0.12";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "madpilot";
    repo = "amberelectric.py";
    tag = "v${version}";
    hash = "sha256-HTelfgOucyQINz34hT3kGxhJf68pxKbiO3L54nt5New=";
  };

  build-system = [ poetry-core ];

  dependencies = [
    aenum
    urllib3
    pydantic
    python-dateutil
  ];

  nativeCheckInputs = [
    pytest-mock
    pytestCheckHook
  ];

  pythonImportsCheck = [ "amberelectric" ];

  meta = {
    description = "Python Amber Electric API interface";
    homepage = "https://github.com/madpilot/amberelectric.py";
    license = with lib.licenses; [ asl20 ];
    maintainers = with lib.maintainers; [ fab ];
  };
}