nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 aiohttp,
4 aresponses,
5 backoff,
6 buildPythonPackage,
7 fetchFromGitHub,
8 fetchpatch,
9 poetry-core,
10 pytest-asyncio,
11 pytestCheckHook,
12}:
13
14buildPythonPackage rec {
15 pname = "tesla-wall-connector";
16 version = "1.1.0";
17 pyproject = true;
18
19 src = fetchFromGitHub {
20 owner = "einarhauks";
21 repo = "tesla-wall-connector";
22 tag = version;
23 hash = "sha256-3jj3LU0xRIC6U5DmitkTNjejvSZJWguTS/TeotOD8oc=";
24 };
25
26 patches = [
27 # https://github.com/einarhauks/tesla-wall-connector/pull/16
28 (fetchpatch {
29 name = "replace-async-timeout-with-asyncio.timeout.patch";
30 url = "https://github.com/einarhauks/tesla-wall-connector/commit/4683738b4d2cccb2be337a383243ab3f7623bf8e.patch";
31 excludes = [
32 ".github/workflows/python-package.yml"
33 "poetry.lock"
34 "pyproject.toml"
35 ];
36 hash = "sha256-V9Ra7xA5JzBGe8tE8urVJNqCCdBkNmmqUcXo0cswSoY=";
37 })
38 ];
39
40 build-system = [ poetry-core ];
41
42 dependencies = [
43 aiohttp
44 backoff
45 ];
46
47 nativeCheckInputs = [
48 aresponses
49 pytest-asyncio
50 pytestCheckHook
51 ];
52
53 pythonImportsCheck = [ "tesla_wall_connector" ];
54
55 meta = {
56 changelog = "https://github.com/einarhauks/tesla-wall-connector/releases/tag/${src.tag}";
57 description = "Library for communicating with a Tesla Wall Connector";
58 homepage = "https://github.com/einarhauks/tesla-wall-connector";
59 license = lib.licenses.mit;
60 maintainers = with lib.maintainers; [ fab ];
61 };
62}