2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, httpx
|
|
|
|
, protobuf
|
|
|
|
, pytest-asyncio
|
|
|
|
, pytest-httpx
|
|
|
|
, pytest-mock
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2023-10-09 19:29:22 +00:00
|
|
|
, segno
|
2021-12-06 16:07:01 +00:00
|
|
|
, setuptools-scm
|
2023-07-15 17:15:38 +00:00
|
|
|
, syrupy
|
2021-12-06 16:07:01 +00:00
|
|
|
, zeroconf
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "devolo-plc-api";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "1.4.1";
|
2023-02-02 18:25:31 +00:00
|
|
|
format = "pyproject";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "2Fake";
|
|
|
|
repo = "devolo_plc_api";
|
2023-02-02 18:25:31 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-EP99AswHmLO+8ZQAPjJyw/P9QqfDawy3AqyJR870Qms=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace "protobuf>=4.22.0" "protobuf"
|
|
|
|
'';
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
httpx
|
|
|
|
protobuf
|
2023-10-09 19:29:22 +00:00
|
|
|
segno
|
2021-12-06 16:07:01 +00:00
|
|
|
zeroconf
|
|
|
|
];
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-12-06 16:07:01 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytest-httpx
|
|
|
|
pytest-mock
|
|
|
|
pytestCheckHook
|
2023-07-15 17:15:38 +00:00
|
|
|
syrupy
|
2021-12-06 16:07:01 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"devolo_plc_api"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2023-02-02 18:25:31 +00:00
|
|
|
description = "Module to interact with Devolo PLC devices";
|
2021-12-06 16:07:01 +00:00
|
|
|
homepage = "https://github.com/2Fake/devolo_plc_api";
|
2023-02-02 18:25:31 +00:00
|
|
|
changelog = "https://github.com/2Fake/devolo_plc_api/releases/tag/v${version}";
|
2021-12-06 16:07:01 +00:00
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|