nixpkgs/pkgs/development/python-modules/wled/default.nix
2021-08-05 12:01:27 +02:00

61 lines
1.1 KiB
Nix

{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, aiohttp
, backoff
, poetry-core
, packaging
, yarl
, aresponses
, pytest-asyncio
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "wled";
version = "0.8.0";
disabled = pythonOlder "3.8";
format = "pyproject";
src = fetchFromGitHub {
owner = "frenck";
repo = "python-wled";
rev = "v${version}";
sha256 = "1jhykilb81sp1srxk91222qglwdlr993ssvgfnl837nbcx6ws1hw";
};
nativeBuildInputs = [
poetry-core
];
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" ];
meta = with lib; {
description = "Asynchronous Python client for WLED";
homepage = "https://github.com/frenck/python-wled";
license = licenses.mit;
maintainers = with maintainers; [ hexa ];
};
}