From d9f391d75c562df1f411d19a364fdc4321340e83 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 8 May 2022 01:12:02 +0200 Subject: [PATCH] python310Packages.oscrypto: 1.2.1 -> 1.3.0 --- .../python-modules/oscrypto/default.nix | 44 +++++++++++-------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/pkgs/development/python-modules/oscrypto/default.nix b/pkgs/development/python-modules/oscrypto/default.nix index b4d1c8fb88a..96d4416ec96 100644 --- a/pkgs/development/python-modules/oscrypto/default.nix +++ b/pkgs/development/python-modules/oscrypto/default.nix @@ -1,24 +1,25 @@ { lib , stdenv -, buildPythonPackage , asn1crypto -, fetchPypi +, buildPythonPackage +, fetchFromGitHub , openssl +, pytestCheckHook +, pythonOlder }: buildPythonPackage rec { pname = "oscrypto"; - version = "1.2.1"; + version = "1.3.0"; + format = "setuptools"; - src = fetchPypi { - inherit pname version; - sha256 = "1546si2bdgkqnbvv4mw1hr4mhh6bq39d9z4wxgv1m7fq6miclb3x"; - }; + disabled = pythonOlder "3.7"; - testSources = fetchPypi { - inherit version; - pname = "oscrypto_tests"; - sha256 = "1ha68dsrbx6mlra44x0n81vscn17pajbl4yg7cqkk7mq1zfmjwks"; + src = fetchFromGitHub { + owner = "wbond"; + repo = pname; + rev = version; + hash = "sha256-CmDypmlc/kb6ONCUggjT1Iqd29xNSLRaGh5Hz36dvOw="; }; propagatedBuildInputs = [ @@ -26,21 +27,26 @@ buildPythonPackage rec { openssl ]; - preCheck = '' - tar -xf ${testSources} - mv oscrypto_tests-${version} tests - - # remove tests that require network - sed -e '/TLSTests/d' -e '/TrustListTests/d' -i tests/__init__.py - ''; + checkInputs = [ + pytestCheckHook + ]; - pythonImportsCheck = [ "oscrypto" ]; + pythonImportsCheck = [ + "oscrypto" + ]; doCheck = !stdenv.isDarwin; + disabledTests = [ + # Tests require network access + "TLSTests" + "TrustListTests" + ]; + meta = with lib; { description = "Encryption library for Python"; homepage = "https://github.com/wbond/oscrypto"; license = licenses.mit; + maintainers = with maintainers; [ ]; }; }