diff --git a/pkgs/development/python-modules/httpx-socks/default.nix b/pkgs/development/python-modules/httpx-socks/default.nix new file mode 100644 index 00000000000..f73d81cc6aa --- /dev/null +++ b/pkgs/development/python-modules/httpx-socks/default.nix @@ -0,0 +1,57 @@ +{ lib +, async-timeout +, buildPythonPackage +, curio +, fetchFromGitHub +, flask +, httpcore +, httpx +, pytest-asyncio +, pytest-trio +, pytestCheckHook +, python-socks +, pythonOlder +, sniffio +, trio +, yarl +}: + +buildPythonPackage rec { + pname = "httpx-socks"; + version = "0.4.1"; + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "romis2012"; + repo = pname; + rev = "v${version}"; + sha256 = "1rz69z5fcw7d5nzy5q2q0r9gxrsqijgpg70cnyr5br6xnfgy01ar"; + }; + + propagatedBuildInputs = [ + async-timeout + curio + httpcore + httpx + python-socks + sniffio + trio + ]; + + checkInputs = [ + flask + pytest-asyncio + pytest-trio + pytestCheckHook + yarl + ]; + + pythonImportsCheck = [ "httpx_socks" ]; + + meta = with lib; { + description = "Proxy (HTTP, SOCKS) transports for httpx"; + homepage = "https://github.com/romis2012/httpx-socks"; + license = licenses.asl20; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e1c4e4392b5..7ea7fd92679 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3383,6 +3383,8 @@ in { httpx = callPackage ../development/python-modules/httpx { }; + httpx-socks = callPackage ../development/python-modules/httpx-socks { }; + huawei-lte-api = callPackage ../development/python-modules/huawei-lte-api { }; huey = callPackage ../development/python-modules/huey { };