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

61 lines
1.1 KiB
Nix
Raw Normal View History

2020-10-17 18:22:59 +00:00
{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, aiohttp
, backoff
, poetry-core
2020-10-17 18:22:59 +00:00
, packaging
, yarl
, aresponses
, pytest-asyncio
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "wled";
2021-11-25 22:47:20 +00:00
version = "0.10.0";
disabled = pythonOlder "3.8";
format = "pyproject";
2020-10-17 18:22:59 +00:00
src = fetchFromGitHub {
owner = "frenck";
repo = "python-wled";
rev = "v${version}";
2021-11-25 22:47:20 +00:00
sha256 = "0ivh6yxpswz730i33fwr4hj8nwdmdyw4n6p89x9sxmvjmd7ihkgm";
2020-10-17 18:22:59 +00:00
};
nativeBuildInputs = [
poetry-core
];
2020-10-17 18:22:59 +00:00
propagatedBuildInputs = [
aiohttp
backoff
packaging
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" ];
2020-10-17 18:22:59 +00:00
meta = with lib; {
description = "Asynchronous Python client for WLED";
homepage = "https://github.com/frenck/python-wled";
license = licenses.mit;
maintainers = with maintainers; [ hexa ];
};
}