2021-02-24 18:30:23 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, fetchFromGitHub
|
|
|
|
, aiohttp
|
|
|
|
, yarl
|
|
|
|
, aresponses
|
2021-12-26 17:43:05 +00:00
|
|
|
, poetry-core
|
2021-02-24 18:30:23 +00:00
|
|
|
, pytest-asyncio
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "twentemilieu";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "2.0.0";
|
2021-12-19 01:06:50 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
disabled = pythonOlder "3.11";
|
2021-02-24 18:30:23 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "frenck";
|
|
|
|
repo = "python-twentemilieu";
|
2023-11-16 04:20:00 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-r0LZS8TXux1mzzXBTSu+x5sxUZOCzW7poKG3dQ2A6No=";
|
2021-02-24 18:30:23 +00:00
|
|
|
};
|
|
|
|
|
2021-12-19 01:06:50 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2022-02-10 20:34:41 +00:00
|
|
|
--replace "--cov" "" \
|
|
|
|
--replace '"0.0.0"' '"${version}"'
|
2021-12-19 01:06:50 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
2021-02-24 18:30:23 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
|
|
|
yarl
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-02-24 18:30:23 +00:00
|
|
|
aresponses
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"twentemilieu"
|
|
|
|
];
|
2021-02-24 18:30:23 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python client for Twente Milieu";
|
|
|
|
homepage = "https://github.com/frenck/python-twentemilieu";
|
2023-03-24 00:07:29 +00:00
|
|
|
changelog = "https://github.com/frenck/python-twentemilieu/releases/tag/v${version}";
|
2021-02-24 18:30:23 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|