nixpkgs/pkgs/development/python-modules/zigpy-znp/default.nix

69 lines
1.3 KiB
Nix

{ lib
, async-timeout
, buildPythonPackage
, coloredlogs
, fetchFromGitHub
, jsonschema
, pytest-asyncio
, pytest-mock
, pytest-rerunfailures
, pytest-timeout
, pytestCheckHook
, pythonOlder
, voluptuous
, zigpy
}:
buildPythonPackage rec {
pname = "zigpy-znp";
version = "0.11.4";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "zigpy";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-wt7ZsMXOh+CbhJCUMS7RhzozYlyINRs0xOF7ecwkNCU=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace "timeout = 20" "timeout = 300"
'';
propagatedBuildInputs = [
async-timeout
coloredlogs
jsonschema
voluptuous
zigpy
];
nativeCheckInputs = [
pytest-asyncio
pytest-mock
pytest-rerunfailures
pytest-timeout
pytestCheckHook
];
pytestFlagsArray = [
"--reruns=3"
];
pythonImportsCheck = [
"zigpy_znp"
];
meta = with lib; {
description = "Library for zigpy which communicates with TI ZNP radios";
homepage = "https://github.com/zigpy/zigpy-znp";
changelog = "https://github.com/zigpy/zigpy-znp/releases/tag/v${version}";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ mvnetbiz ];
platforms = platforms.linux;
};
}