depot/third_party/nixpkgs/pkgs/development/python-modules/devolo-plc-api/default.nix
Default email 5e7c2d6cef Project import generated by Copybara.
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
2023-10-09 21:29:22 +02:00

70 lines
1.3 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, httpx
, protobuf
, pytest-asyncio
, pytest-httpx
, pytest-mock
, pytestCheckHook
, pythonOlder
, segno
, setuptools-scm
, syrupy
, zeroconf
}:
buildPythonPackage rec {
pname = "devolo-plc-api";
version = "1.4.1";
format = "pyproject";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "2Fake";
repo = "devolo_plc_api";
rev = "refs/tags/v${version}";
hash = "sha256-EP99AswHmLO+8ZQAPjJyw/P9QqfDawy3AqyJR870Qms=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace "protobuf>=4.22.0" "protobuf"
'';
SETUPTOOLS_SCM_PRETEND_VERSION = version;
nativeBuildInputs = [
setuptools-scm
];
propagatedBuildInputs = [
httpx
protobuf
segno
zeroconf
];
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [
pytest-asyncio
pytest-httpx
pytest-mock
pytestCheckHook
syrupy
];
pythonImportsCheck = [
"devolo_plc_api"
];
meta = with lib; {
description = "Module to interact with Devolo PLC devices";
homepage = "https://github.com/2Fake/devolo_plc_api";
changelog = "https://github.com/2Fake/devolo_plc_api/releases/tag/v${version}";
license = licenses.gpl3Only;
maintainers = with maintainers; [ fab ];
};
}