1{ lib
2, buildPythonPackage
3, pythonOlder
4, fetchFromGitHub
5, fetchpatch
6, poetry-core
7, aiohttp
8, pytest
9, pytest-asyncio
10, pytestCheckHook
11}:
12
13buildPythonPackage rec {
14 pname = "pytest-mockservers";
15 version = "0.6.0";
16 format = "pyproject";
17 disabled = pythonOlder "3.6";
18
19 src = fetchFromGitHub {
20 owner = "Gr1N";
21 repo = pname;
22 rev = version;
23 hash = "sha256-Mb3wSbambC1h+lFI+fafwZzm78IvADNAsF/Uw60DFHc=";
24 };
25
26 patches = [
27 # https://github.com/Gr1N/pytest-mockservers/pull/75
28 (fetchpatch {
29 name = "use-poetry-core.patch";
30 url = "https://github.com/Gr1N/pytest-mockservers/commit/c7731186a4e12851ab1c15ab56e652bb48ed59c4.patch";
31 hash = "sha256-/5X3xjJwt2gs3t6f/6n1QZ+CTBq/5+cQE+MgNWyz+Hs=";
32 })
33 ];
34
35 nativeBuildInputs = [
36 poetry-core
37 ];
38
39 buildInputs = [
40 pytest
41 ];
42
43 propagatedBuildInputs = [
44 aiohttp
45 pytest-asyncio
46 ];
47
48 __darwinAllowLocalNetworking = true;
49
50 nativeCheckInputs = [
51 pytestCheckHook
52 ];
53
54 pythonImportsCheck = [
55 "pytest_mockservers"
56 ];
57
58 meta = with lib; {
59 description = "A set of fixtures to test your requests to HTTP/UDP servers";
60 homepage = "https://github.com/Gr1N/pytest-mockservers";
61 license = licenses.mit;
62 maintainers = with maintainers; [ fab ];
63 };
64}