2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, httpx
|
|
|
|
, protobuf
|
|
|
|
, pytest-asyncio
|
|
|
|
, pytest-httpx
|
|
|
|
, pytest-mock
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, 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-07-15 17:15:38 +00:00
|
|
|
version = "1.3.2";
|
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-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-viOyxgFydPrTPFz6JsjJT6IiUIeoIwd+bcrAJfomDI8=";
|
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
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
httpx
|
|
|
|
protobuf
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|