Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pytest-asyncio
5, pytest-httpserver
6, pytestCheckHook
7, pythonOlder
8, requests
9, toml
10, types-toml
11, typing-extensions
12, urllib3
13}:
14
15buildPythonPackage rec {
16 pname = "responses";
17 version = "0.22.0";
18 format = "setuptools";
19
20 disabled = pythonOlder "3.7";
21
22 __darwinAllowLocalNetworking = true;
23
24 src = fetchFromGitHub {
25 owner = "getsentry";
26 repo = pname;
27 rev = version;
28 hash = "sha256-VOIpowxPvYmufnj9MM/vMtZQDIOxorAhMCNK0fX/j1U=";
29 };
30
31 propagatedBuildInputs = [
32 requests
33 toml
34 types-toml
35 urllib3
36 ] ++ lib.optionals (pythonOlder "3.8") [
37 typing-extensions
38 ];
39
40
41 checkInputs = [
42 pytest-asyncio
43 pytest-httpserver
44 pytestCheckHook
45 ];
46
47 pythonImportsCheck = [
48 "responses"
49 ];
50
51 meta = with lib; {
52 description = "Python module for mocking out the requests Python library";
53 homepage = "https://github.com/getsentry/responses";
54 license = licenses.asl20;
55 maintainers = with maintainers; [ fab ];
56 };
57}