1{ lib
2, buildPythonPackage
3, fetchPypi
4, fetchpatch
5, pbr
6, requests
7, pytestCheckHook
8, waitress
9}:
10
11buildPythonPackage rec {
12 pname = "requests-unixsocket";
13 version = "0.3.0";
14 format = "setuptools";
15
16 src = fetchPypi {
17 inherit pname version;
18 hash = "sha256-KDBCg+qTV9Rf/1itWxHkdwjPv1gGgXqlmyo2Mijulx4=";
19 };
20
21 patches = [
22 # https://github.com/msabramo/requests-unixsocket/pull/69
23 (fetchpatch {
24 name = "urllib3-2-compatibility.patch";
25 url = "https://github.com/msabramo/requests-unixsocket/commit/39b9c64847a52ddc8c6d14ff414a6a7a3f6358d9.patch";
26 hash = "sha256-DFtjhk33JLCu7FW6XI7uf2klNmwzvh2QNwxUb4W223Q=";
27 })
28 ];
29
30 nativeBuildInputs = [
31 pbr
32 ];
33
34 propagatedBuildInputs = [
35 requests
36 ];
37
38 nativeCheckInputs = [
39 pytestCheckHook
40 waitress
41 ];
42
43 pythonImportsCheck = [
44 "requests_unixsocket"
45 ];
46
47 meta = with lib; {
48 description = "Use requests to talk HTTP via a UNIX domain socket";
49 homepage = "https://github.com/msabramo/requests-unixsocket";
50 license = licenses.asl20;
51 maintainers = with maintainers; [ catern ];
52 };
53}