emacsPackages.lsp-bridge: 0-unstable-2025-01-11 -> 0-unstable-2025-01-22 (#376531)
[NixPkgs.git] / pkgs / development / python-modules / httpx-socks / default.nix
blobb1659cc92e6c72c0b8e8b9a7dcfe6d82d399ab6c
2   lib,
3   async-timeout,
4   buildPythonPackage,
5   fetchFromGitHub,
6   flask,
7   httpcore,
8   httpx,
9   hypercorn,
10   pytest-asyncio,
11   pytest-trio,
12   pytestCheckHook,
13   python-socks,
14   pythonOlder,
15   setuptools,
16   starlette,
17   tiny-proxy,
18   trio,
19   trustme,
20   yarl,
23 buildPythonPackage rec {
24   pname = "httpx-socks";
25   version = "0.9.2";
26   pyproject = true;
28   disabled = pythonOlder "3.7";
30   src = fetchFromGitHub {
31     owner = "romis2012";
32     repo = "httpx-socks";
33     tag = "v${version}";
34     hash = "sha256-PUiciSuDCO4r49st6ye5xPLCyvYMKfZY+yHAkp5j3ZI=";
35   };
37   build-system = [ setuptools ];
39   dependencies = [
40     httpx
41     httpcore
42     python-socks
43   ] ++ python-socks.optional-dependencies.asyncio;
45   optional-dependencies = {
46     asyncio = [ async-timeout ];
47     trio = [ trio ];
48   };
50   __darwinAllowLocalNetworking = true;
52   nativeCheckInputs = [
53     flask
54     hypercorn
55     pytest-asyncio
56     pytest-trio
57     pytestCheckHook
58     starlette
59     tiny-proxy
60     trustme
61     yarl
62   ];
64   pythonImportsCheck = [ "httpx_socks" ];
66   disabledTests = [
67     # Tests don't work in the sandbox
68     "test_proxy"
69     "test_secure_proxy"
70   ];
72   meta = with lib; {
73     description = "Proxy (HTTP, SOCKS) transports for httpx";
74     homepage = "https://github.com/romis2012/httpx-socks";
75     changelog = "https://github.com/romis2012/httpx-socks/releases/tag/v${version}";
76     license = licenses.asl20;
77     maintainers = with maintainers; [ fab ];
78   };