blob: 362eff693d03c3dc77857428f8c590e3f8f4db14 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
{
lib,
buildPythonPackage,
fetchFromGitHub,
fetchpatch2,
# propagates
pyopenssl,
requests,
six,
# tests
pytestCheckHook,
responses,
}:
buildPythonPackage rec {
pname = "paypalhttp";
version = "1.0.0";
format = "setuptools";
src = fetchFromGitHub {
owner = "paypal";
repo = "paypalhttp_python";
tag = version;
hash = "sha256-3ihcpYtpcejPkiyf4g4jveyNU6flQB2sv9EZ5Pd7tUc=";
};
patches = [
(fetchpatch2 {
# fix content-type header case sensitiyivy
url = "https://github.com/paypal/paypalhttp_python/commit/72609783230663b8e34c6f0384837db7b166c8f4.patch";
hash = "sha256-K2hO3XRrJ+Gm+rLtWRPy0E2syLS4RhNNHIA3w4xVYtY=";
})
];
postPatch = ''
substituteInPlace tests/http_response_test.py \
--replace-fail assertEquals assertEqual
'';
propagatedBuildInputs = [
requests
six
pyopenssl
];
nativeCheckInputs = [
pytestCheckHook
responses
];
meta = {
changelog = "https://github.com/paypal/paypalhttp_python/releases/tag/${version}";
description = "PayPalHttp is a generic HTTP Client";
homepage = "https://github.com/paypal/paypalhttp_python";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ hexa ];
};
}
|