1{ lib
2, buildPythonPackage
3, fetchpatch
4, fetchPypi
5, pythonAtLeast
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 = [
33 flit-core
34 ];
35
36 # remove coverage configuration
37 preCheck = ''
38 rm pytest.ini
39 '';
40
41 nativeCheckInputs = [
42 pytestCheckHook
43 ];
44
45 meta = with lib; {
46 description = "Sans-I/O implementation of SOCKS4, SOCKS4A, and SOCKS5";
47 homepage = "https://github.com/sethmlarson/socksio";
48 license = licenses.mit;
49 maintainers = with maintainers; [ hexa ];
50 };
51}