1{ 2 lib, 3 aiohttp, 4 aresponses, 5 buildPythonPackage, 6 fetchFromGitHub, 7 poetry-core, 8 pytest-asyncio, 9 pytest-cov-stub, 10 pytestCheckHook, 11 pythonOlder, 12 yarl, 13}: 14 15buildPythonPackage rec { 16 pname = "twentemilieu"; 17 version = "2.2.1"; 18 pyproject = true; 19 20 disabled = pythonOlder "3.11"; 21 22 src = fetchFromGitHub { 23 owner = "frenck"; 24 repo = "python-twentemilieu"; 25 tag = "v${version}"; 26 hash = "sha256-N6XSf212orMf3vqIjBzu+4fpKX7kFinH180lCWXtjzc="; 27 }; 28 29 postPatch = '' 30 # Upstream is creating GitHub releases without version 31 substituteInPlace pyproject.toml \ 32 --replace '"0.0.0"' '"${version}"' 33 ''; 34 35 build-system = [ poetry-core ]; 36 37 dependencies = [ 38 aiohttp 39 yarl 40 ]; 41 42 nativeCheckInputs = [ 43 aresponses 44 pytest-asyncio 45 pytest-cov-stub 46 pytestCheckHook 47 ]; 48 49 pythonImportsCheck = [ "twentemilieu" ]; 50 51 meta = with lib; { 52 description = "Python client for Twente Milieu"; 53 homepage = "https://github.com/frenck/python-twentemilieu"; 54 changelog = "https://github.com/frenck/python-twentemilieu/releases/tag/v${version}"; 55 license = licenses.mit; 56 maintainers = with maintainers; [ fab ]; 57 }; 58}