Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, aiohttp 3, aresponses 4, buildPythonPackage 5, fetchFromGitHub 6, fetchpatch 7, poetry-core 8, pytest-asyncio 9, pytest-aiohttp 10, pytestCheckHook 11, pythonOlder 12, ujson 13}: 14 15buildPythonPackage rec { 16 pname = "pyoutbreaksnearme"; 17 version = "2023.08.0"; 18 format = "pyproject"; 19 20 disabled = pythonOlder "3.9"; 21 22 src = fetchFromGitHub { 23 owner = "bachya"; 24 repo = pname; 25 rev = "refs/tags/${version}"; 26 hash = "sha256-Qrq8/dPJsJMJNXobc+Ps6Nbg819+GFuYplovGuWK0nQ="; 27 }; 28 29 patches = [ 30 # This patch removes references to setuptools and wheel that are no longer 31 # necessary and changes poetry to poetry-core, so that we don't need to add 32 # unnecessary nativeBuildInputs. 33 # 34 # https://github.com/bachya/pyoutbreaksnearme/pull/174 35 # 36 (fetchpatch { 37 name = "clean-up-build-dependencies.patch"; 38 url = "https://github.com/bachya/pyoutbreaksnearme/commit/45fba9f689253a0f79ebde93086ee731a4151553.patch"; 39 hash = "sha256-RLRbHmaR2A8MNc96WHx0L8ccyygoBUaOulAuRJkFuUM="; 40 }) 41 ]; 42 43 nativeBuildInputs = [ 44 poetry-core 45 ]; 46 47 propagatedBuildInputs = [ 48 aiohttp 49 ujson 50 ]; 51 52 __darwinAllowLocalNetworking = true; 53 54 nativeCheckInputs = [ 55 aresponses 56 pytest-asyncio 57 pytest-aiohttp 58 pytestCheckHook 59 ]; 60 61 disabledTestPaths = [ 62 # Ignore the examples directory as the files are prefixed with test_. 63 "examples/" 64 ]; 65 66 pythonImportsCheck = [ 67 "pyoutbreaksnearme" 68 ]; 69 70 meta = with lib; { 71 description = "Library for retrieving data from for Outbreaks Near Me"; 72 homepage = "https://github.com/bachya/pyoutbreaksnearme"; 73 changelog = "https://github.com/bachya/pyoutbreaksnearme/releases/tag/${version}"; 74 license = with licenses; [ mit ]; 75 maintainers = with maintainers; [ fab ]; 76 }; 77}