Merge pull request #284703 from dotlambda/safety-3
python311Packages.safety: 2.3.5 -> 3.0.1
This commit is contained in:
commit
090e275423
4 changed files with 93 additions and 15 deletions
52
pkgs/development/python-modules/safety-schemas/default.nix
Normal file
52
pkgs/development/python-modules/safety-schemas/default.nix
Normal file
|
@ -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 ];
|
||||
};
|
||||
}
|
|
@ -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 = ''
|
||||
|
|
|
@ -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 = [
|
||||
|
|
|
@ -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 { };
|
||||
|
|
Loading…
Reference in a new issue