1{
2 lib,
3 buildPythonPackage,
4 fetchpatch,
5 fetchPypi,
6 flit-core,
7 pytestCheckHook,
8}:
9
10let
11 pname = "socksio";
12 version = "1.0.0";
13in
14buildPythonPackage {
15 inherit pname version;
16 format = "pyproject";
17
18 src = fetchPypi {
19 inherit pname version;
20 hash = "sha256-+IvrPaW1w4uYkEad5n0MsPnUlLeLEGyhhF+WwQuRxKw=";
21 };
22
23 patches = [
24 # https://github.com/sethmlarson/socksio/pull/61
25 (fetchpatch {
26 name = "unpin-flit-core.patch";
27 url = "https://github.com/sethmlarson/socksio/commit/5c50fd76e7459bb822ff8f712172a78e21b8dd04.patch";
28 hash = "sha256-VVUzFvF2KCXXkCfCU5xu9acT6OLr+PlQQPeVGONtU4A=";
29 })
30 ];
31
32 nativeBuildInputs = [ flit-core ];
33
34 # remove coverage configuration
35 preCheck = ''
36 rm pytest.ini
37 '';
38
39 nativeCheckInputs = [ pytestCheckHook ];
40
41 meta = with lib; {
42 description = "Sans-I/O implementation of SOCKS4, SOCKS4A, and SOCKS5";
43 homepage = "https://github.com/sethmlarson/socksio";
44 license = licenses.mit;
45 maintainers = with maintainers; [ hexa ];
46 };
47}