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 = "seventeentrack"; 18 version = "2022.04.6"; 19 format = "pyproject"; 20 21 disabled = pythonOlder "3.8"; 22 23 src = fetchFromGitHub { 24 owner = "McSwindler"; 25 repo = "seventeentrack"; 26 rev = version; 27 hash = "sha256-vMdRXcd0es/LjgsVyWItSLFzlSTEa3oaA6lr/NL4i8U="; 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/McSwindler/seventeentrack/pull/4 36 # 37 (fetchpatch { 38 name = "clean-up-build-dependencies.patch"; 39 url = "https://github.com/McSwindler/seventeentrack/commit/9a21e22f796a17628a9628f54e19d19d002b4d0a.patch"; 40 hash = "sha256-UvxUpiSkDbP8Jum5XbrWHBnH1HLBYEKUKw6GTV+Kvys="; 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 = [ "seventeentrack" ]; 66 67 meta = with lib; { 68 description = "Python library to track package info from 17track.com"; 69 homepage = "https://github.com/McSwindler/seventeentrack"; 70 license = with licenses; [ mit ]; 71 maintainers = with maintainers; [ fab ]; 72 }; 73}