From ba5d08be2b00fe3af88d894cc2fe7bebfbb00695 Mon Sep 17 00:00:00 2001 From: linsui Date: Tue, 9 Jul 2024 22:53:47 +0800 Subject: [PATCH] python312Packages.tlslite-ng: 0.7.6 -> 0.8.0b1-unstable-2024-06-24 Co-Authored-By: Martin Weinelt --- .../python-modules/tlslite-ng/default.nix | 43 +++++++++++++------ 1 file changed, 29 insertions(+), 14 deletions(-) diff --git a/pkgs/development/python-modules/tlslite-ng/default.nix b/pkgs/development/python-modules/tlslite-ng/default.nix index 450f40234378..1d715c6758f7 100644 --- a/pkgs/development/python-modules/tlslite-ng/default.nix +++ b/pkgs/development/python-modules/tlslite-ng/default.nix @@ -1,30 +1,45 @@ { lib, buildPythonPackage, - fetchPypi, - pythonAtLeast, + fetchFromGitHub, + setuptools, ecdsa, + hypothesis, + pythonAtLeast, + pytestCheckHook, }: -buildPythonPackage rec { +buildPythonPackage { pname = "tlslite-ng"; - version = "0.7.6"; - format = "setuptools"; + version = "0.8.0b1-unstable-2024-06-24"; + pyproject = true; - # https://github.com/tlsfuzzer/tlslite-ng/issues/501 - disabled = pythonAtLeast "3.12"; - - src = fetchPypi { - inherit pname version; - sha256 = "6ab56f0e9629ce3d807eb528c9112defa9f2e00af2b2961254e8429ca5c1ff00"; + src = fetchFromGitHub { + owner = "tlsfuzzer"; + repo = "tlslite-ng"; + rev = "4d2c6b8fc8d14bb5c90c8360bdb6f617e8e38591"; + hash = "sha256-VCQjxZIs4rzlFrIakXI7YeLz7Ws9WRf8zGPcSryO9Ko="; }; - buildInputs = [ ecdsa ]; + build-system = [ setuptools ]; + + dependencies = [ ecdsa ]; + + nativeCheckInputs = [ + hypothesis + pytestCheckHook + ]; + + # This file imports asyncore which is removed in 3.12 + disabledTestPaths = lib.optionals (pythonAtLeast "3.12") [ + "tlslite/integration/tlsasyncdispatchermixin.py" + ]; meta = with lib; { + changelog = "https://github.com/tlsfuzzer/tlslite-ng/releases/tag/v${version}"; description = "Pure python implementation of SSL and TLS"; - homepage = "https://pypi.python.org/pypi/tlslite-ng"; - license = licenses.lgpl2; + homepage = "https://github.com/tlsfuzzer/tlslite-ng"; + license = licenses.lgpl21Only; maintainers = [ ]; }; }