Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, aiohttp 3, aresponses 4, backoff 5, buildPythonPackage 6, fetchFromGitHub 7, fetchpatch 8, poetry-core 9, pytest-aiohttp 10, pytest-asyncio 11, pytestCheckHook 12, pythonOlder 13}: 14 15buildPythonPackage rec { 16 pname = "pyopenuv"; 17 version = "2023.02.0"; 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-EiTTck6hmOGSQ7LyZsbhnH1zgkH8GccejLdJaH2m0F8="; 27 }; 28 29 patches = [ 30 # Remove asynctest, https://github.com/bachya/pyopenuv/pull/108 31 (fetchpatch { 32 name = "remove-asynctest.patch"; 33 url = "https://github.com/bachya/pyopenuv/commit/af15736b0d82ef811c3f380f5da32007752644fe.patch"; 34 hash = "sha256-5uQS3DoM91mhfyxLTNii3JBxwXIDK4/GwtadkVagjuw="; 35 }) 36 # This patch removes references to setuptools and wheel that are no longer 37 # necessary and changes poetry to poetry-core, so that we don't need to add 38 # unnecessary nativeBuildInputs. 39 # 40 # https://github.com/bachya/pyopenuv/pull/244 41 # 42 (fetchpatch { 43 name = "clean-up-build-dependencies.patch"; 44 url = "https://github.com/bachya/pyopenuv/commit/1663f697dd5528fb03af1400e5ffd3fba076c64c.patch"; 45 hash = "sha256-RLRbHmaR2A8MNc96WHx0L8ccyygoBUaOulAuRJkFuUM="; 46 }) 47 ]; 48 49 nativeBuildInputs = [ 50 poetry-core 51 ]; 52 53 propagatedBuildInputs = [ 54 aiohttp 55 backoff 56 ]; 57 58 __darwinAllowLocalNetworking = true; 59 60 nativeCheckInputs = [ 61 aresponses 62 pytest-asyncio 63 pytest-aiohttp 64 pytestCheckHook 65 ]; 66 67 disabledTestPaths = [ 68 # Ignore the examples as they are prefixed with test_ 69 "examples/" 70 ]; 71 72 pythonImportsCheck = [ 73 "pyopenuv" 74 ]; 75 76 meta = with lib; { 77 description = "Python API to retrieve data from openuv.io"; 78 homepage = "https://github.com/bachya/pyopenuv"; 79 changelog = "https://github.com/bachya/pyopenuv/releases/tag/${version}"; 80 license = with licenses; [ mit ]; 81 maintainers = with maintainers; [ fab ]; 82 }; 83}