about summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorRobert Schütz2024-08-11 03:38:55 -0700
committerGitHub2024-08-11 03:38:55 -0700
commitcc0f717738d88ac7447c211345c67f13cc57a45e (patch)
treef6bdd12f43ee0d3c64c6d252cc75f70a9975023a /pkgs/development
parent9b44b2425d02758a197eae674dc2dec76cd77fce (diff)
parent545c162a7d18e0cf8ea05e77c15b2d561a23aa2b (diff)
Merge pull request #333525 from dotlambda/python3Packages.safety-schemas
python312Packages.safety: 3.2.4 -> 3.2.5
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/python-modules/safety-schemas/default.nix10
-rw-r--r--pkgs/development/python-modules/safety/default.nix29
2 files changed, 21 insertions, 18 deletions
diff --git a/pkgs/development/python-modules/safety-schemas/default.nix b/pkgs/development/python-modules/safety-schemas/default.nix
index c94427bdf083..0ff590ea25c9 100644
--- a/pkgs/development/python-modules/safety-schemas/default.nix
+++ b/pkgs/development/python-modules/safety-schemas/default.nix
@@ -12,22 +12,20 @@
 
 buildPythonPackage rec {
   pname = "safety-schemas";
-  version = "0.0.2";
+  version = "0.0.3";
   pyproject = true;
 
   src = fetchPypi {
     pname = "safety_schemas";
     inherit version;
-    hash = "sha256-fRsEDsBkgPBc/2tF6nqT4JyJQt+GT7DQHd62fDI8+ow=";
+    hash = "sha256-s5VU+cAQ5PEffJ5Xc+sx0slsFk96WVwnOpiwdND7mPQ=";
   };
 
-  nativeBuildInputs = [
-    hatchling
-  ];
+  build-system = [ hatchling ];
 
   pythonRelaxDeps = [ "dparse" ];
 
-  propagatedBuildInputs = [
+  dependencies = [
     dparse
     packaging
     pydantic
diff --git a/pkgs/development/python-modules/safety/default.nix b/pkgs/development/python-modules/safety/default.nix
index 9e85497ac44f..2db623d74f02 100644
--- a/pkgs/development/python-modules/safety/default.nix
+++ b/pkgs/development/python-modules/safety/default.nix
@@ -2,7 +2,7 @@
   lib,
   buildPythonPackage,
   pythonOlder,
-  fetchPypi,
+  fetchFromGitHub,
   setuptools,
   click,
   urllib3,
@@ -13,34 +13,37 @@
   jinja2,
   marshmallow,
   authlib,
-  jwt,
   rich,
   typer,
   pydantic,
   safety-schemas,
   typing-extensions,
   filelock,
+  psutil,
+  git,
   pytestCheckHook,
 }:
 
 buildPythonPackage rec {
   pname = "safety";
-  version = "3.2.4";
+  version = "3.2.5";
 
   disabled = pythonOlder "3.7";
 
   pyproject = true;
 
-  src = fetchPypi {
-    inherit pname version;
-    hash = "sha256-usAgIBbXNqIRgFeWSg45g/og/yVj/RA8rD86we0/6hE=";
+  src = fetchFromGitHub {
+    owner = "pyupio";
+    repo = "safety";
+    rev = "refs/tags/${version}";
+    hash = "sha256-vLibQfSwxZF48KL/vfkCOUi2qH5QGMySbdakLQNP+Ug=";
   };
 
   postPatch = ''
     substituteInPlace safety/safety.py \
-      --replace-fail "telemetry=True" "telemetry=False"
+      --replace-fail "telemetry: bool = True" "telemetry: bool = False"
     substituteInPlace safety/util.py \
-      --replace-fail "telemetry = True" "telemetry = False"
+      --replace-fail "telemetry: bool = True" "telemetry: bool = False"
     substituteInPlace safety/cli.py \
       --replace-fail "disable-optional-telemetry', default=False" \
                      "disable-optional-telemetry', default=True"
@@ -66,24 +69,26 @@ buildPythonPackage rec {
     jinja2
     marshmallow
     authlib
-    jwt
     rich
     typer
     pydantic
     safety-schemas
     typing-extensions
     filelock
+    psutil
   ];
 
-  nativeCheckInputs = [ pytestCheckHook ];
+  nativeCheckInputs = [
+    git
+    pytestCheckHook
+  ];
 
   # Disable tests depending on online services
   disabledTests = [
     "test_announcements_if_is_not_tty"
     "test_check_live"
-    "test_check_live_cached"
+    "test_debug_flag"
     "test_get_packages_licenses_without_api_key"
-    "test_validate_with_policy_file_using_invalid_keyword"
     "test_validate_with_basic_policy_file"
   ];