1{ lib
2, aiohttp
3, buildPythonPackage
4, fetchFromGitHub
5, fetchpatch
6, furl
7, jsonschema
8, nose
9, pytestCheckHook
10, pythonOlder
11, requests
12, xmltodict
13}:
14
15buildPythonPackage rec {
16 pname = "pook";
17 version = "1.0.1";
18 disabled = pythonOlder "3.5";
19
20 src = fetchFromGitHub {
21 owner = "h2non";
22 repo = pname;
23 rev = "v${version}";
24 sha256 = "0z48vswj07kr2sdvq5qzrwqyijpmj2rlnh2z2b32id1mckr6nnz8";
25 };
26
27 patches = [
28 (fetchpatch {
29 # Will be fixed with the new release, https://github.com/h2non/pook/issues/69
30 name = "use-match-keyword-in-pytest.patch";
31 url = "https://github.com/h2non/pook/commit/2071da27701c82ce02b015e01e2aa6fd203e7bb5.patch";
32 sha256 = "0i3qcpbdqqsnbygi46dyqamgkh9v8rhpbm4lkl75riw48j4n080k";
33 })
34 ];
35
36 propagatedBuildInputs = [
37 aiohttp
38 furl
39 jsonschema
40 requests
41 xmltodict
42 ];
43
44 checkInputs = [
45 nose
46 pytestCheckHook
47 ];
48
49 pythonImportsCheck = [ "pook" ];
50
51 meta = with lib; {
52 description = "HTTP traffic mocking and testing made simple in Python";
53 homepage = "https://github.com/h2non/pook";
54 license = with licenses; [ mit ];
55 maintainers = with maintainers; [ fab ];
56 };
57}