2021-06-28 23:13:55 +00:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
|
|
|
, async-timeout
|
2022-12-17 10:02:37 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2022-12-02 08:20:57 +00:00
|
|
|
, gql
|
2022-12-17 10:02:37 +00:00
|
|
|
, graphql-subscription-manager
|
2022-02-10 20:34:41 +00:00
|
|
|
, pytest-asyncio
|
2021-06-28 23:13:55 +00:00
|
|
|
, pytestCheckHook
|
2022-12-17 10:02:37 +00:00
|
|
|
, python-dateutil
|
|
|
|
, pythonOlder
|
|
|
|
, pytz
|
2021-06-28 23:13:55 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytibber";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "0.28.2";
|
2021-12-06 16:07:01 +00:00
|
|
|
format = "setuptools";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
disabled = pythonOlder "3.9";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Danielhiversen";
|
|
|
|
repo = "pyTibber";
|
2022-09-14 18:05:37 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-vi5f4V0nPb9K3nwdmwMDoNE85Or6haOWjMY4d/2Fj2s=";
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
|
|
|
async-timeout
|
2022-12-02 08:20:57 +00:00
|
|
|
gql
|
2022-12-17 10:02:37 +00:00
|
|
|
graphql-subscription-manager
|
2021-06-28 23:13:55 +00:00
|
|
|
python-dateutil
|
2022-12-17 10:02:37 +00:00
|
|
|
] ++ gql.optional-dependencies.websockets;
|
2021-06-28 23:13:55 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-02-10 20:34:41 +00:00
|
|
|
pytest-asyncio
|
2021-06-28 23:13:55 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"test/test.py"
|
|
|
|
];
|
2021-06-28 23:13:55 +00:00
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
# Tests access network
|
2021-06-28 23:13:55 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"tibber"
|
|
|
|
];
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2021-09-28 08:13:01 +00:00
|
|
|
description = "Python library to communicate with Tibber";
|
2021-06-28 23:13:55 +00:00
|
|
|
homepage = "https://github.com/Danielhiversen/pyTibber";
|
2022-12-17 10:02:37 +00:00
|
|
|
changelog = "https://github.com/Danielhiversen/pyTibber/releases/tag/${version}";
|
2021-06-28 23:13:55 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
|
|
};
|
|
|
|
}
|