Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, attrs 3, buildPythonPackage 4, fetchFromGitHub 5, fetchpatch 6, poetry-core 7, pytest-asyncio 8, pytestCheckHook 9, pythonOlder 10, requests 11, responses 12}: 13 14buildPythonPackage rec { 15 pname = "todoist-api-python"; 16 version = "2.0.2"; 17 format = "pyproject"; 18 19 disabled = pythonOlder "3.7"; 20 21 src = fetchFromGitHub { 22 owner = "Doist"; 23 repo = pname; 24 rev = "refs/tags/v${version}"; 25 hash = "sha256-CKOsUb35+7WjSNf4Xo0SK5loIqWJbEnHdmhw9QXWFAI="; 26 }; 27 28 patches = [ 29 # Switch to poetry-core, https://github.com/Doist/todoist-api-python/pull/81 30 (fetchpatch { 31 name = "switch-to-poetry-core.patch"; 32 url = "https://github.com/Doist/todoist-api-python/commit/42288e066d2f0c69611ab50cb57ca98b8c6bd1ca.patch"; 33 hash = "sha256-yq+VVvjPYywvUn+ydyWVQPkiYPYWe9U6w38G54L2lkE="; 34 }) 35 ]; 36 37 nativeBuildInputs = [ 38 poetry-core 39 ]; 40 41 propagatedBuildInputs = [ 42 attrs 43 requests 44 ]; 45 46 nativeCheckInputs = [ 47 pytest-asyncio 48 pytestCheckHook 49 responses 50 ]; 51 52 pythonImportsCheck = [ 53 "todoist_api_python" 54 ]; 55 56 meta = with lib; { 57 description = "Library for the Todoist REST API"; 58 homepage = "https://github.com/Doist/todoist-api-python"; 59 changelog = "https://github.com/Doist/todoist-api-python/blob/v${version}/CHANGELOG.md"; 60 license = with licenses; [ mit ]; 61 maintainers = with maintainers; [ fab ]; 62 }; 63}