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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

66 lines
1.1 KiB
Nix
Raw Normal View History

2020-10-17 18:22:59 +00:00
{ lib
, aiohttp
, awesomeversion
2020-10-17 18:22:59 +00:00
, backoff
, buildPythonPackage
, cachetools
, fetchFromGitHub
, poetry-core
2020-10-17 18:22:59 +00:00
, yarl
, aresponses
, pytest-asyncio
, pytestCheckHook
, pythonOlder
2020-10-17 18:22:59 +00:00
}:
buildPythonPackage rec {
pname = "wled";
version = "0.13.2";
format = "pyproject";
2020-10-17 18:22:59 +00:00
disabled = pythonOlder "3.8";
2020-10-17 18:22:59 +00:00
src = fetchFromGitHub {
owner = "frenck";
repo = "python-wled";
rev = "v${version}";
sha256 = "sha256-Rv0jaKkN6jQ7oiv1cBYx4HAr7IqPm57jZFykXayp0T0=";
2020-10-17 18:22:59 +00:00
};
nativeBuildInputs = [
poetry-core
];
2020-10-17 18:22:59 +00:00
propagatedBuildInputs = [
aiohttp
awesomeversion
2020-10-17 18:22:59 +00:00
backoff
cachetools
2020-10-17 18:22:59 +00:00
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 ];
};
}