From 9771361a3248d5a424457f0c5c4e63ba4f5e7689 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Thu, 18 Jan 2024 16:07:43 -0800 Subject: [PATCH 1/3] python311Packages.safety-schemas: init at 0.0.2 --- .../python-modules/safety-schemas/default.nix | 52 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 54 insertions(+) create mode 100644 pkgs/development/python-modules/safety-schemas/default.nix diff --git a/pkgs/development/python-modules/safety-schemas/default.nix b/pkgs/development/python-modules/safety-schemas/default.nix new file mode 100644 index 000000000000..0f9724e95f65 --- /dev/null +++ b/pkgs/development/python-modules/safety-schemas/default.nix @@ -0,0 +1,52 @@ +{ lib +, buildPythonPackage +, fetchPypi +, hatchling +, pythonRelaxDepsHook +, dparse +, packaging +, pydantic +, ruamel-yaml +, typing-extensions +}: + +buildPythonPackage rec { + pname = "safety-schemas"; + version = "0.0.2"; + pyproject = true; + + src = fetchPypi { + pname = "safety_schemas"; + inherit version; + hash = "sha256-fRsEDsBkgPBc/2tF6nqT4JyJQt+GT7DQHd62fDI8+ow="; + }; + + nativeBuildInputs = [ + hatchling + pythonRelaxDepsHook + ]; + + pythonRelaxDeps = [ + "dparse" + ]; + + propagatedBuildInputs = [ + dparse + packaging + pydantic + ruamel-yaml + typing-extensions + ]; + + pythonImportsCheck = [ "safety_schemas" ]; + + # upstream has no tests + doCheck = false; + + meta = { + description = "Schemas for Safety CLI"; + homepage = "https://pypi.org/project/safety-schemas/"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b90813500e44..1fa3cb17cd59 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -13166,6 +13166,8 @@ self: super: with self; { safety = callPackage ../development/python-modules/safety { }; + safety-schemas = callPackage ../development/python-modules/safety-schemas { }; + sagemaker = callPackage ../development/python-modules/sagemaker { }; salmon-mail = callPackage ../development/python-modules/salmon-mail { }; From 056504729d0ab9335b3c1842158938433b510c67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Thu, 18 Jan 2024 15:46:25 -0800 Subject: [PATCH 2/3] python311Packages.safety: 2.3.5 -> 3.0.1 Changelog: https://github.com/pyupio/safety/blob/3.0.1/CHANGELOG.md --- .../python-modules/safety/default.nix | 45 ++++++++++++++----- 1 file changed, 35 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/safety/default.nix b/pkgs/development/python-modules/safety/default.nix index bb367629b5a3..dee37f85eeb4 100644 --- a/pkgs/development/python-modules/safety/default.nix +++ b/pkgs/development/python-modules/safety/default.nix @@ -5,33 +5,46 @@ , pythonRelaxDepsHook , setuptools , click +, urllib3 , requests , packaging , dparse , ruamel-yaml +, jinja2 +, marshmallow +, authlib +, jwt +, rich +, typer +, pydantic +, safety-schemas +, typing-extensions , pytestCheckHook }: buildPythonPackage rec { pname = "safety"; - version = "2.3.5"; + version = "3.0.1"; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.7"; - format = "pyproject"; + pyproject = true; src = fetchPypi { inherit pname version; - hash = "sha256-pgwR+JUvQSy7Fl1wyx9nOjtDorqak84R+X5qTeg0qjo="; + hash = "sha256-HyAA8DZS86C/xn+P0emLxXI8y3bhXLG91oVFw9gD3wE="; }; postPatch = '' substituteInPlace safety/safety.py \ - --replace "telemetry=True" "telemetry=False" + --replace-fail "telemetry=True" "telemetry=False" substituteInPlace safety/util.py \ - --replace "telemetry=True" "telemetry=False" + --replace-fail "telemetry = True" "telemetry = False" substituteInPlace safety/cli.py \ - --replace "telemetry', default=True" "telemetry', default=False" + --replace-fail "disable-optional-telemetry', default=False" \ + "disable-optional-telemetry', default=True" + substituteInPlace safety/scan/finder/handlers.py \ + --replace-fail "telemetry=True" "telemetry=False" ''; nativeBuildInputs = [ @@ -41,15 +54,28 @@ buildPythonPackage rec { pythonRelaxDeps = [ "packaging" + "dparse" + "authlib" + "pydantic" ]; propagatedBuildInputs = [ setuptools click + urllib3 requests packaging dparse ruamel-yaml + jinja2 + marshmallow + authlib + jwt + rich + typer + pydantic + safety-schemas + typing-extensions ]; nativeCheckInputs = [ @@ -61,9 +87,8 @@ buildPythonPackage rec { "test_announcements_if_is_not_tty" "test_check_live" "test_check_live_cached" - "test_check_vulnerabilities" - "test_license" - "test_chained_review" + "test_get_packages_licenses_without_api_key" + "test_validate_with_policy_file_using_invalid_keyword" ]; preCheck = '' From 1418ffd56e6a9840b21b87f863434fba80fee133 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 9 Mar 2024 14:36:46 -0800 Subject: [PATCH 3/3] poetryPlugins.poetry-audit-plugin: 0.3.0 -> 0.4.0 Diff: https://github.com/opeco17/poetry-audit-plugin/compare/refs/tags/0.3.0...0.4.0 --- .../poetry/plugins/poetry-audit-plugin.nix | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pkgs/tools/package-management/poetry/plugins/poetry-audit-plugin.nix b/pkgs/tools/package-management/poetry/plugins/poetry-audit-plugin.nix index 85eb0b5d19b1..6c3f120171be 100644 --- a/pkgs/tools/package-management/poetry/plugins/poetry-audit-plugin.nix +++ b/pkgs/tools/package-management/poetry/plugins/poetry-audit-plugin.nix @@ -10,17 +10,16 @@ buildPythonPackage rec { pname = "poetry-audit-plugin"; - version = "0.3.0"; + version = "0.4.0"; + pyproject = true; - disabled = pythonOlder "3.7"; - - format = "pyproject"; + disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "opeco17"; repo = "poetry-audit-plugin"; rev = "refs/tags/${version}"; - hash = "sha256-49OnYz3EFiqOe+cLgfynjy14Ve4Ga6OUrLdM8HhZuKQ="; + hash = "sha256-kiNtzEup2ygCTk0zk8YV2jxAj6ZzOhP8v0U4FbV15hI="; }; nativeBuildInputs = [