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