From 998db37980f831d252892e2ea880c052f5b72f4d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 23 Nov 2021 23:28:38 +0100 Subject: [PATCH] python3Packages.python-socks: 1.2.4 -> 2.0.0 --- .../python-modules/python-socks/default.nix | 47 +++++++++++++++---- 1 file changed, 39 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/python-socks/default.nix b/pkgs/development/python-modules/python-socks/default.nix index dcf268808275..e6c2d016bb09 100644 --- a/pkgs/development/python-modules/python-socks/default.nix +++ b/pkgs/development/python-modules/python-socks/default.nix @@ -1,17 +1,48 @@ -{ lib, buildPythonPackage, trio, curio, async-timeout, fetchPypi, pythonOlder }: +{ lib +, async-timeout +, buildPythonPackage +, curio +, fetchFromGitHub +, flask +, pytest-asyncio +, pytest-trio +, pythonOlder +, pytestCheckHook +, trio +, yarl +}: buildPythonPackage rec { pname = "python-socks"; - version = "1.2.4"; - - src = fetchPypi { - inherit pname version; - sha256 = "1n6xb18jy41ybgkmamakg6psp3qididd45qknxiggngaiibz43kx"; - }; + version = "2.0.0"; + format = "setuptools"; disabled = pythonOlder "3.6.1"; - propagatedBuildInputs = [ trio curio async-timeout ]; + src = fetchFromGitHub { + owner = "romis2012"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-iTwlUyfTD2ZhOvBX3IDqjkeW4Z2tfKxvQjIV7GGBVJA="; + }; + + propagatedBuildInputs = [ + trio + curio + async-timeout + ]; + + checkInputs = [ + flask + pytest-asyncio + pytest-trio + pytestCheckHook + yarl + ]; + + pythonImportsCheck = [ + "python_socks" + ]; meta = with lib; { description = "Core proxy client (SOCKS4, SOCKS5, HTTP) functionality for Python";