Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pythonOlder 5, pytestCheckHook 6, anyio 7, httpx 8, pytest-asyncio 9, pytest-vcr 10}: 11 12buildPythonPackage rec { 13 pname = "notion-client"; 14 version = "2.0.0"; 15 disabled = pythonOlder "3.7"; 16 17 src = fetchFromGitHub { 18 owner = "ramnes"; 19 repo = "notion-sdk-py"; 20 rev = version; 21 hash = "sha256-zfG1OgH/2ytDUC+ogIY9/nP+xkgjiMt9+HVcWEMXoj8="; 22 }; 23 24 propagatedBuildInputs = [ 25 httpx 26 ]; 27 28 # disable coverage options as they don't provide us value, and they break the default pytestCheckHook 29 preCheck = '' 30 sed -i '/addopts/d' ./setup.cfg 31 ''; 32 33 nativeCheckInputs = [ 34 pytestCheckHook 35 anyio 36 pytest-asyncio 37 pytest-vcr 38 ]; 39 40 pythonImportsCheck = [ 41 "notion_client" 42 ]; 43 44 meta = with lib; { 45 description = "Python client for the official Notion API"; 46 homepage = "https://github.com/ramnes/notion-sdk-py"; 47 changelog = "https://github.com/ramnes/notion-sdk-py/releases/tag/${version}"; 48 license = licenses.mit; 49 maintainers = with maintainers; [ jpetrucciani ]; 50 }; 51}