1{ 2 lib, 3 aiohttp, 4 aioresponses, 5 buildPythonPackage, 6 fetchFromGitHub, 7 fetchpatch, 8 pytest-aiohttp, 9 poetry-core, 10 pytest-asyncio, 11 pytest-cov, 12 pytestCheckHook, 13}: 14 15buildPythonPackage rec { 16 pname = "pyairnow"; 17 version = "1.2.1"; 18 format = "pyproject"; 19 20 src = fetchFromGitHub { 21 owner = "asymworks"; 22 repo = pname; 23 rev = "refs/tags/v${version}"; 24 hash = "sha256-aab+3xrEiCjysa+DzXWelQwz8V2tr74y8v0NpDZiuTk="; 25 }; 26 27 patches = [ 28 (fetchpatch { 29 # remove setuptools, wheel from build-system requirements 30 # https://github.com/asymworks/pyairnow/pull/7 31 name = "pyairnow-build-system.patch"; 32 url = "https://github.com/asymworks/pyairnow/commit/e3cc892ffce855d8213264248b6b4ed78ee791bd.patch"; 33 hash = "sha256-L0MV2okkf6Nf1S4zS7lb4lt5eSfTF10yDJLzpyDrSl8="; 34 }) 35 ]; 36 37 nativeBuildInputs = [ poetry-core ]; 38 39 propagatedBuildInputs = [ aiohttp ]; 40 41 nativeCheckInputs = [ 42 aioresponses 43 pytest-asyncio 44 pytest-aiohttp 45 pytest-cov 46 pytestCheckHook 47 ]; 48 49 pythonImportsCheck = [ "pyairnow" ]; 50 51 meta = with lib; { 52 description = "Python wrapper for EPA AirNow Air Quality API"; 53 homepage = "https://github.com/asymworks/pyairnow"; 54 changelog = "https://github.com/asymworks/pyairnow/blob/v${version}/CHANGELOG.md"; 55 license = with licenses; [ mit ]; 56 maintainers = with maintainers; [ fab ]; 57 }; 58}