nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 aenum,
4 buildPythonPackage,
5 fetchFromGitHub,
6 poetry-core,
7 pydantic,
8 pytest-mock,
9 pytestCheckHook,
10 python-dateutil,
11 urllib3,
12}:
13
14buildPythonPackage rec {
15 pname = "amberelectric";
16 version = "2.0.12";
17 pyproject = true;
18
19 src = fetchFromGitHub {
20 owner = "madpilot";
21 repo = "amberelectric.py";
22 tag = "v${version}";
23 hash = "sha256-HTelfgOucyQINz34hT3kGxhJf68pxKbiO3L54nt5New=";
24 };
25
26 build-system = [ poetry-core ];
27
28 dependencies = [
29 aenum
30 urllib3
31 pydantic
32 python-dateutil
33 ];
34
35 nativeCheckInputs = [
36 pytest-mock
37 pytestCheckHook
38 ];
39
40 pythonImportsCheck = [ "amberelectric" ];
41
42 meta = {
43 description = "Python Amber Electric API interface";
44 homepage = "https://github.com/madpilot/amberelectric.py";
45 license = with lib.licenses; [ asl20 ];
46 maintainers = with lib.maintainers; [ fab ];
47 };
48}