2021-02-22 21:28:39 +00:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
|
|
|
, aresponses
|
|
|
|
, aiocache
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, poetry-core
|
|
|
|
, pytest-asyncio
|
|
|
|
, pytest-aiohttp
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, msgpack
|
|
|
|
, ujson
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyflunearyou";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "2021.10.0";
|
2021-02-22 21:28:39 +00:00
|
|
|
format = "pyproject";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2021-02-22 21:28:39 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bachya";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-12-06 16:07:01 +00:00
|
|
|
sha256 = "sha256-Q65OSE4qckpvaIvZULBR434i7hwuVM97eSq1Blb1oIU=";
|
2021-02-22 21:28:39 +00:00
|
|
|
};
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace 'ujson = ">=1.35,<5.0"' 'ujson = "*"'
|
|
|
|
'';
|
|
|
|
|
2021-08-08 23:34:03 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
2021-02-22 21:28:39 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
|
|
|
aiocache
|
|
|
|
msgpack
|
|
|
|
ujson
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
aresponses
|
|
|
|
pytest-asyncio
|
|
|
|
pytest-aiohttp
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# Ignore the examples directory as the files are prefixed with test_.
|
|
|
|
"examples/"
|
|
|
|
];
|
2021-08-08 23:34:03 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"pyflunearyou"
|
|
|
|
];
|
2021-02-22 21:28:39 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python library for retrieving UV-related information from Flu Near You";
|
|
|
|
homepage = "https://github.com/bachya/pyflunearyou";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|