1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pytest-asyncio 5, pytest-httpserver 6, pytestCheckHook 7, pythonOlder 8, pyyaml 9, requests 10, tomli 11, tomli-w 12, types-pyyaml 13, types-toml 14, typing-extensions 15, urllib3 16}: 17 18buildPythonPackage rec { 19 pname = "responses"; 20 version = "0.23.3"; 21 format = "setuptools"; 22 23 disabled = pythonOlder "3.7"; 24 25 __darwinAllowLocalNetworking = true; 26 27 src = fetchFromGitHub { 28 owner = "getsentry"; 29 repo = pname; 30 rev = "refs/tags/${version}"; 31 hash = "sha256-VJmcRMn0O+3mDwzkCwxIX7RU3/I9T9p9N8t6USWDZJQ="; 32 }; 33 34 propagatedBuildInputs = [ 35 pyyaml 36 requests 37 types-pyyaml 38 types-toml 39 urllib3 40 ] ++ lib.optionals (pythonOlder "3.8") [ 41 typing-extensions 42 ]; 43 44 45 nativeCheckInputs = [ 46 pytest-asyncio 47 pytest-httpserver 48 pytestCheckHook 49 tomli-w 50 ] ++ lib.optionals (pythonOlder "3.11") [ 51 tomli 52 ]; 53 54 pythonImportsCheck = [ 55 "responses" 56 ]; 57 58 meta = with lib; { 59 description = "Python module for mocking out the requests Python library"; 60 homepage = "https://github.com/getsentry/responses"; 61 changelog = "https://github.com/getsentry/responses/blob/${version}/CHANGES"; 62 license = licenses.asl20; 63 maintainers = with maintainers; [ fab ]; 64 }; 65}