From 807de17ee797161bca34ad12c10e87d05bec580a Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 27 Feb 2023 02:14:23 +0100 Subject: [PATCH] python3Packages.hiredis: 2.0.0 -> 2.2.2 --- .../python-modules/hiredis/default.nix | 29 ++++++++++++------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/hiredis/default.nix b/pkgs/development/python-modules/hiredis/default.nix index eea5e5bf8043..9123a8baa4d9 100644 --- a/pkgs/development/python-modules/hiredis/default.nix +++ b/pkgs/development/python-modules/hiredis/default.nix @@ -1,34 +1,43 @@ { lib , buildPythonPackage -, fetchPypi +, fetchFromGitHub , pythonOlder # tested using -, python +, pytestCheckHook }: buildPythonPackage rec { pname = "hiredis"; - version = "2.0.0"; + version = "2.2.2"; format = "setuptools"; disabled = pythonOlder "3.6"; - src = fetchPypi { - inherit pname version; - sha256 = "81d6d8e39695f2c37954d1011c0480ef7cf444d4e3ae24bc5e89ee5de360139a"; + src = fetchFromGitHub { + owner = "redis"; + repo = "hiredis-py"; + rev = "refs/tags/v${version}"; + fetchSubmodules = true; + hash = "sha256-VfiYXkvLcdokT4P5ks1ReDh5sBe6pdNxWyscmSaJ1Lo="; }; - pythonImportsCheck = [ "hiredis" ]; + pythonImportsCheck = [ + "hiredis" + ]; - checkPhase = '' - mv hiredis _hiredis - ${python.interpreter} test.py + nativeCheckInputs = [ + pytestCheckHook + ]; + + preCheck = '' + rm -rf hiredis ''; meta = with lib; { description = "Wraps protocol parsing code in hiredis, speeds up parsing of multi bulk replies"; homepage = "https://github.com/redis/hiredis-py"; + changelog = "https://github.com/redis/hiredis-py/blob/v${version}/CHANGELOG.md"; license = licenses.bsd3; maintainers = with maintainers; [ mmai ]; };