depot/third_party/nixpkgs/pkgs/development/python-modules/wled/default.nix

63 lines
1.1 KiB
Nix
Raw Normal View History

{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, aiohttp
, awesomeversion
, backoff
, cachetools
, poetry-core
, yarl
, aresponses
, pytest-asyncio
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "wled";
version = "0.10.2";
disabled = pythonOlder "3.8";
format = "pyproject";
src = fetchFromGitHub {
owner = "frenck";
repo = "python-wled";
rev = "v${version}";
sha256 = "sha256-tqR/edkBFseldSXGoekfRmw//h6Z/Xcg1W0HXJvLhtk=";
};
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
aiohttp
awesomeversion
backoff
cachetools
yarl
];
checkInputs = [
aresponses
pytest-asyncio
pytestCheckHook
];
postPatch = ''
# Upstream doesn't set a version for the pyproject.toml
substituteInPlace pyproject.toml \
--replace "0.0.0" "${version}" \
--replace "--cov" ""
'';
pythonImportsCheck = [ "wled" ];
meta = with lib; {
description = "Asynchronous Python client for WLED";
homepage = "https://github.com/frenck/python-wled";
license = licenses.mit;
maintainers = with maintainers; [ hexa ];
};
}