summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/socksio/default.nix
blob: 398c1b5fc2226a9376f4393636f0f9e38c676b23 (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
{
  lib,
  buildPythonPackage,
  fetchpatch,
  fetchPypi,
  flit-core,
  pytestCheckHook,
}:

let
  pname = "socksio";
  version = "1.0.0";
in
buildPythonPackage {
  inherit pname version;
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-+IvrPaW1w4uYkEad5n0MsPnUlLeLEGyhhF+WwQuRxKw=";
  };

  patches = [
    # https://github.com/sethmlarson/socksio/pull/61
    (fetchpatch {
      name = "unpin-flit-core.patch";
      url = "https://github.com/sethmlarson/socksio/commit/5c50fd76e7459bb822ff8f712172a78e21b8dd04.patch";
      hash = "sha256-VVUzFvF2KCXXkCfCU5xu9acT6OLr+PlQQPeVGONtU4A=";
    })
  ];

  nativeBuildInputs = [ flit-core ];

  # remove coverage configuration
  preCheck = ''
    rm pytest.ini
  '';

  nativeCheckInputs = [ pytestCheckHook ];

  meta = {
    description = "Sans-I/O implementation of SOCKS4, SOCKS4A, and SOCKS5";
    homepage = "https://github.com/sethmlarson/socksio";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ hexa ];
  };
}