Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / httpx-socks / default.nix
blob75be71df04f7de1b5ac61083ffd2fcbb0c391fcd
1 { lib
2 , async-timeout
3 , buildPythonPackage
4 , curio
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 , sniffio
17 , starlette
18 , tiny-proxy
19 , trio
20 , trustme
21 , yarl
24 buildPythonPackage rec {
25   pname = "httpx-socks";
26   version = "0.8.0";
27   format = "pyproject";
29   disabled = pythonOlder "3.7";
31   src = fetchFromGitHub {
32     owner = "romis2012";
33     repo = pname;
34     rev = "refs/tags/v${version}";
35     hash = "sha256-3Dj+rrH5Pil5xQE6sAAD5RTycwlKq+TVsAeB2NVqGjY=";
36   };
38   nativeBuildInputs = [
39     setuptools
40   ];
42   propagatedBuildInputs = [
43     httpx
44     httpcore
45     python-socks
46   ];
48   passthru.optional-dependencies = {
49     asyncio = [
50       async-timeout
51     ];
52     trio = [
53       trio
54     ];
55   };
57   __darwinAllowLocalNetworking = true;
59   nativeCheckInputs = [
60     flask
61     hypercorn
62     pytest-asyncio
63     pytest-trio
64     pytestCheckHook
65     starlette
66     tiny-proxy
67     trustme
68     yarl
69   ];
71   pythonImportsCheck = [
72     "httpx_socks"
73   ];
75   disabledTests = [
76     # Tests don't work in the sandbox
77     "test_proxy"
78     "test_secure_proxy"
79   ];
81   meta = with lib; {
82     description = "Proxy (HTTP, SOCKS) transports for httpx";
83     homepage = "https://github.com/romis2012/httpx-socks";
84     changelog = "https://github.com/romis2012/httpx-socks/releases/tag/v${version}";
85     license = licenses.asl20;
86     maintainers = with maintainers; [ fab ];
87   };