Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildPythonPackage 3, aiohttp 4, aresponses 5, backoff 6, fetchFromGitHub 7, fetchpatch 8, poetry-core 9, pytest-aiohttp 10, pytest-asyncio 11, pytestCheckHook 12, pythonOlder 13}: 14 15buildPythonPackage rec { 16 pname = "pyiqvia"; 17 version = "2023.08.1"; 18 format = "pyproject"; 19 20 disabled = pythonOlder "3.8"; 21 22 src = fetchFromGitHub { 23 owner = "bachya"; 24 repo = pname; 25 rev = "refs/tags/${version}"; 26 hash = "sha256-vPcb0mwREQri9FuYhWXihWSYnZ2ywBVujPMaNThTbVI="; 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/pyiqvia/pull/245 35 # 36 (fetchpatch { 37 name = "clean-up-build-dependencies.patch"; 38 url = "https://github.com/bachya/pyiqvia/commit/760d5bd1f4d60f3a97f6ea9a9a57860f4be3abdd.patch"; 39 hash = "sha256-RLRbHmaR2A8MNc96WHx0L8ccyygoBUaOulAuRJkFuUM="; 40 }) 41 ]; 42 43 nativeBuildInputs = [ 44 poetry-core 45 ]; 46 47 propagatedBuildInputs = [ 48 aiohttp 49 backoff 50 ]; 51 52 __darwinAllowLocalNetworking = true; 53 54 nativeCheckInputs = [ 55 aresponses 56 pytest-aiohttp 57 pytest-asyncio 58 pytestCheckHook 59 ]; 60 61 disabledTestPaths = [ 62 # Ignore the examples as they are prefixed with test_ 63 "examples/" 64 ]; 65 66 pythonImportsCheck = [ 67 "pyiqvia" 68 ]; 69 70 meta = with lib; { 71 description = "Module for working with IQVIA data"; 72 longDescription = '' 73 pyiqvia is an async-focused Python library for allergen, asthma, and 74 disease data from the IQVIA family of websites (such as https://pollen.com, 75 https://flustar.com and more). 76 ''; 77 homepage = "https://github.com/bachya/pyiqvia"; 78 license = with licenses; [ mit ]; 79 maintainers = with maintainers; [ fab ]; 80 }; 81}