Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildPythonPackage 3, pythonOlder 4, fetchFromGitHub 5, aiohttp 6, yarl 7, aresponses 8, poetry-core 9, pytest-asyncio 10, pytestCheckHook 11}: 12 13buildPythonPackage rec { 14 pname = "twentemilieu"; 15 version = "1.0.0"; 16 format = "pyproject"; 17 18 disabled = pythonOlder "3.10"; 19 20 src = fetchFromGitHub { 21 owner = "frenck"; 22 repo = "python-twentemilieu"; 23 rev = "v${version}"; 24 hash = "sha256-MTAVa5gP5e8TIE/i1DjfmwKm1zDVC/WEcYKxZSV/+Ug="; 25 }; 26 27 postPatch = '' 28 substituteInPlace pyproject.toml \ 29 --replace "--cov" "" \ 30 --replace '"0.0.0"' '"${version}"' 31 ''; 32 33 nativeBuildInputs = [ 34 poetry-core 35 ]; 36 37 propagatedBuildInputs = [ 38 aiohttp 39 yarl 40 ]; 41 42 nativeCheckInputs = [ 43 aresponses 44 pytest-asyncio 45 pytestCheckHook 46 ]; 47 48 pythonImportsCheck = [ "twentemilieu" ]; 49 50 meta = with lib; { 51 description = "Python client for Twente Milieu"; 52 homepage = "https://github.com/frenck/python-twentemilieu"; 53 changelog = "https://github.com/frenck/python-twentemilieu/releases/tag/v${version}"; 54 license = with licenses; [ mit ]; 55 maintainers = with maintainers; [ fab ]; 56 }; 57}