2021-01-22 08:41:59 +00:00
|
|
|
{ lib
|
2022-04-27 12:46:30 +00:00
|
|
|
, aiohttp
|
|
|
|
, aresponses
|
2021-01-22 08:41:59 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, mypy
|
2022-04-27 12:46:30 +00:00
|
|
|
, packaging
|
2022-03-09 23:27:02 +00:00
|
|
|
, poetry-core
|
|
|
|
, pydantic
|
2021-01-22 08:41:59 +00:00
|
|
|
, pytest-asyncio
|
|
|
|
, pytest-mock
|
2022-04-27 12:46:30 +00:00
|
|
|
, pytestCheckHook
|
2022-01-23 08:51:47 +00:00
|
|
|
, pythonOlder
|
2022-09-17 13:45:40 +00:00
|
|
|
, setuptools
|
2021-01-22 08:41:59 +00:00
|
|
|
, yarl
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "bsblan";
|
2022-03-02 21:41:54 +00:00
|
|
|
version = "0.5.5";
|
2022-03-09 23:27:02 +00:00
|
|
|
format = "pyproject";
|
2022-01-23 08:51:47 +00:00
|
|
|
|
2022-04-27 12:46:30 +00:00
|
|
|
disabled = pythonOlder "3.9";
|
2021-01-22 08:41:59 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "liudger";
|
|
|
|
repo = "python-bsblan";
|
2022-03-02 21:41:54 +00:00
|
|
|
rev = "v${version}";
|
2022-04-27 12:46:30 +00:00
|
|
|
hash = "sha256-kq4cML7D9XC/QRPjGfaWcs0H78OOc2IXGua7qJpWYOQ=";
|
2021-01-22 08:41:59 +00:00
|
|
|
};
|
|
|
|
|
2022-03-09 23:27:02 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
2022-09-17 13:45:40 +00:00
|
|
|
setuptools
|
2022-03-09 23:27:02 +00:00
|
|
|
];
|
|
|
|
|
2021-01-22 08:41:59 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
2022-04-27 12:46:30 +00:00
|
|
|
packaging
|
2022-03-09 23:27:02 +00:00
|
|
|
pydantic
|
2021-01-22 08:41:59 +00:00
|
|
|
yarl
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
aresponses
|
|
|
|
mypy
|
|
|
|
pytest-asyncio
|
|
|
|
pytest-mock
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2022-04-27 12:46:30 +00:00
|
|
|
postPatch = ''
|
|
|
|
# Upstream doesn't set a version for the pyproject.toml
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace 'version = "0.0.0"' 'version = "${version}"' \
|
|
|
|
--replace "--cov" ""
|
|
|
|
'';
|
|
|
|
|
2022-01-23 08:51:47 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"bsblan"
|
|
|
|
];
|
2021-01-22 08:41:59 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python client for BSB-Lan";
|
|
|
|
homepage = "https://github.com/liudger/python-bsblan";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|