From 92bde872f7ceb1e85139b18eccb8ff0766fc2b72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Wed, 29 Jun 2022 01:28:24 +0000 Subject: [PATCH] python310Packages.safety: 1.10.3 -> 2.0.0 https://github.com/pyupio/safety/blob/2.0.0/CHANGELOG.md --- .../python-modules/safety/default.nix | 23 +++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/safety/default.nix b/pkgs/development/python-modules/safety/default.nix index 60c23e3c6a2b..b897d6ced4a3 100644 --- a/pkgs/development/python-modules/safety/default.nix +++ b/pkgs/development/python-modules/safety/default.nix @@ -7,28 +7,41 @@ , requests , packaging , dparse +, ruamel-yaml , pytestCheckHook }: buildPythonPackage rec { pname = "safety"; - version = "1.10.3"; + version = "2.0.0"; - disabled = pythonOlder "3.5"; + disabled = pythonOlder "3.6"; - format = "setuptools"; + format = "pyproject"; src = fetchPypi { inherit pname version; - sha256 = "sha256-MOOU0CogrEm39lKS0Z04+pJ6j5WCzf060a27xmxkGtU="; + sha256 = "d739d00a9e4203cfaba34540c822a73ca1d327159ed7776b3dce09391f81c35d"; }; + postPatch = '' + substituteInPlace safety/safety.py \ + --replace "telemetry=True" "telemetry=False" + substituteInPlace safety/cli.py \ + --replace "telemetry', default=True" "telemetry', default=False" + ''; + + nativeBuildInputs = [ + setuptools + ]; + propagatedBuildInputs = [ setuptools click requests packaging dparse + ruamel-yaml ]; checkInputs = [ @@ -37,6 +50,7 @@ buildPythonPackage rec { # Disable tests depending on online services disabledTests = [ + "test_announcements_if_is_not_tty" "test_check_live" "test_check_live_cached" ]; @@ -48,6 +62,7 @@ buildPythonPackage rec { meta = with lib; { description = "Checks installed dependencies for known vulnerabilities"; homepage = "https://github.com/pyupio/safety"; + changelog = "https://github.com/pyupio/safety/blob/${version}/CHANGELOG.md"; license = licenses.mit; maintainers = with maintainers; [ thomasdesr dotlambda ]; };