1{ 2 lib, 3 aiohttp, 4 aresponses, 5 attrs, 6 buildPythonPackage, 7 fetchFromGitHub, 8 fetchpatch, 9 poetry-core, 10 pytest-asyncio, 11 pytestCheckHook, 12 pythonOlder, 13 pytz, 14}: 15 16buildPythonPackage rec { 17 pname = "py17track"; 18 version = "2021.12.2"; 19 format = "pyproject"; 20 21 disabled = pythonOlder "3.6"; 22 23 src = fetchFromGitHub { 24 owner = "bachya"; 25 repo = pname; 26 rev = version; 27 hash = "sha256-T0Jjdu6QC8rTqZwe4cdsBbs0hQXUY6CkrImCgYwWL9o="; 28 }; 29 30 patches = [ 31 # This patch removes references to setuptools and wheel that are no longer 32 # necessary and changes poetry to poetry-core, so that we don't need to add 33 # unnecessary nativeBuildInputs. 34 # 35 # https://github.com/bachya/py17track/pull/80 36 # 37 (fetchpatch { 38 name = "clean-up-build-dependencies.patch"; 39 url = "https://github.com/bachya/py17track/commit/3b52394759aa50c62e2a56581e30cdb94003e2f1.patch"; 40 hash = "sha256-iLgklhEZ61rrdzQoO6rp1HGZcqLsqGNitwIiPNLNHQ4="; 41 }) 42 ]; 43 44 nativeBuildInputs = [ poetry-core ]; 45 46 propagatedBuildInputs = [ 47 aiohttp 48 attrs 49 pytz 50 ]; 51 52 __darwinAllowLocalNetworking = true; 53 54 nativeCheckInputs = [ 55 aresponses 56 pytest-asyncio 57 pytestCheckHook 58 ]; 59 60 disabledTestPaths = [ 61 # Ignore the examples directory as the files are prefixed with test_ 62 "examples/" 63 ]; 64 65 pythonImportsCheck = [ "py17track" ]; 66 67 meta = with lib; { 68 description = "Python library to track package info from 17track.com"; 69 homepage = "https://github.com/bachya/py17track"; 70 license = with licenses; [ mit ]; 71 maintainers = with maintainers; [ fab ]; 72 }; 73}