2021-06-15 15:06:16 +02:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
|
|
|
, async-timeout
|
2022-12-03 16:21:12 +01:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2022-12-01 12:03:00 +01:00
|
|
|
, gql
|
2022-12-03 16:21:12 +01:00
|
|
|
, graphql-subscription-manager
|
2022-02-07 01:23:05 +00:00
|
|
|
, pytest-asyncio
|
2021-06-15 15:06:16 +02:00
|
|
|
, pytestCheckHook
|
2022-12-03 16:21:12 +01:00
|
|
|
, python-dateutil
|
|
|
|
, pythonOlder
|
|
|
|
, pytz
|
2021-06-15 15:06:16 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytibber";
|
2023-01-02 22:58:54 +01:00
|
|
|
version = "0.26.7";
|
2021-11-16 08:49:25 +01:00
|
|
|
format = "setuptools";
|
2021-06-15 15:06:16 +02:00
|
|
|
|
2022-02-07 01:23:05 +00:00
|
|
|
disabled = pythonOlder "3.9";
|
2021-06-15 15:06:16 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Danielhiversen";
|
|
|
|
repo = "pyTibber";
|
2022-09-09 20:04:52 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2023-01-02 22:58:54 +01:00
|
|
|
hash = "sha256-T2J31+H/cO000qi2AlEGaFtAu0fl7u1LAA/QUxRAiK8=";
|
2021-06-15 15:06:16 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
|
|
|
async-timeout
|
2022-12-01 12:03:00 +01:00
|
|
|
gql
|
2022-12-03 16:21:12 +01:00
|
|
|
graphql-subscription-manager
|
2021-06-15 15:06:16 +02:00
|
|
|
python-dateutil
|
2022-12-03 16:21:12 +01:00
|
|
|
] ++ gql.optional-dependencies.websockets;
|
2021-06-15 15:06:16 +02:00
|
|
|
|
|
|
|
checkInputs = [
|
2022-02-07 01:23:05 +00:00
|
|
|
pytest-asyncio
|
2021-06-15 15:06:16 +02:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2021-11-16 08:49:25 +01:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"test/test.py"
|
|
|
|
];
|
2021-06-15 15:06:16 +02:00
|
|
|
|
2022-12-03 16:21:12 +01:00
|
|
|
# Tests access network
|
2021-06-15 15:06:16 +02:00
|
|
|
doCheck = false;
|
|
|
|
|
2021-11-16 08:49:25 +01:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"tibber"
|
|
|
|
];
|
2021-06-15 15:06:16 +02:00
|
|
|
|
|
|
|
meta = with lib; {
|
2021-09-26 11:07:28 +02:00
|
|
|
description = "Python library to communicate with Tibber";
|
2021-06-15 15:06:16 +02:00
|
|
|
homepage = "https://github.com/Danielhiversen/pyTibber";
|
2022-12-03 16:21:12 +01:00
|
|
|
changelog = "https://github.com/Danielhiversen/pyTibber/releases/tag/${version}";
|
2021-06-15 15:06:16 +02:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
|
|
};
|
|
|
|
}
|