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
|
, pythonRelaxDepsHook
|
||||||
, setuptools
|
, setuptools
|
||||||
, click
|
, click
|
||||||
|
, urllib3
|
||||||
, requests
|
, requests
|
||||||
, packaging
|
, packaging
|
||||||
, dparse
|
, dparse
|
||||||
, ruamel-yaml
|
, ruamel-yaml
|
||||||
|
, jinja2
|
||||||
|
, marshmallow
|
||||||
|
, authlib
|
||||||
|
, jwt
|
||||||
|
, rich
|
||||||
|
, typer
|
||||||
|
, pydantic
|
||||||
|
, safety-schemas
|
||||||
|
, typing-extensions
|
||||||
, pytestCheckHook
|
, pytestCheckHook
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "safety";
|
pname = "safety";
|
||||||
version = "2.3.5";
|
version = "3.0.1";
|
||||||
|
|
||||||
disabled = pythonOlder "3.6";
|
disabled = pythonOlder "3.7";
|
||||||
|
|
||||||
format = "pyproject";
|
pyproject = true;
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
hash = "sha256-pgwR+JUvQSy7Fl1wyx9nOjtDorqak84R+X5qTeg0qjo=";
|
hash = "sha256-HyAA8DZS86C/xn+P0emLxXI8y3bhXLG91oVFw9gD3wE=";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace safety/safety.py \
|
substituteInPlace safety/safety.py \
|
||||||
--replace "telemetry=True" "telemetry=False"
|
--replace-fail "telemetry=True" "telemetry=False"
|
||||||
substituteInPlace safety/util.py \
|
substituteInPlace safety/util.py \
|
||||||
--replace "telemetry=True" "telemetry=False"
|
--replace-fail "telemetry = True" "telemetry = False"
|
||||||
substituteInPlace safety/cli.py \
|
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 = [
|
nativeBuildInputs = [
|
||||||
|
@ -41,15 +54,28 @@ buildPythonPackage rec {
|
||||||
|
|
||||||
pythonRelaxDeps = [
|
pythonRelaxDeps = [
|
||||||
"packaging"
|
"packaging"
|
||||||
|
"dparse"
|
||||||
|
"authlib"
|
||||||
|
"pydantic"
|
||||||
];
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
setuptools
|
setuptools
|
||||||
click
|
click
|
||||||
|
urllib3
|
||||||
requests
|
requests
|
||||||
packaging
|
packaging
|
||||||
dparse
|
dparse
|
||||||
ruamel-yaml
|
ruamel-yaml
|
||||||
|
jinja2
|
||||||
|
marshmallow
|
||||||
|
authlib
|
||||||
|
jwt
|
||||||
|
rich
|
||||||
|
typer
|
||||||
|
pydantic
|
||||||
|
safety-schemas
|
||||||
|
typing-extensions
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeCheckInputs = [
|
nativeCheckInputs = [
|
||||||
|
@ -61,9 +87,8 @@ buildPythonPackage rec {
|
||||||
"test_announcements_if_is_not_tty"
|
"test_announcements_if_is_not_tty"
|
||||||
"test_check_live"
|
"test_check_live"
|
||||||
"test_check_live_cached"
|
"test_check_live_cached"
|
||||||
"test_check_vulnerabilities"
|
"test_get_packages_licenses_without_api_key"
|
||||||
"test_license"
|
"test_validate_with_policy_file_using_invalid_keyword"
|
||||||
"test_chained_review"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
preCheck = ''
|
preCheck = ''
|
||||||
|
|
|
@ -10,17 +10,16 @@
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "poetry-audit-plugin";
|
pname = "poetry-audit-plugin";
|
||||||
version = "0.3.0";
|
version = "0.4.0";
|
||||||
|
pyproject = true;
|
||||||
|
|
||||||
disabled = pythonOlder "3.7";
|
disabled = pythonOlder "3.8";
|
||||||
|
|
||||||
format = "pyproject";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "opeco17";
|
owner = "opeco17";
|
||||||
repo = "poetry-audit-plugin";
|
repo = "poetry-audit-plugin";
|
||||||
rev = "refs/tags/${version}";
|
rev = "refs/tags/${version}";
|
||||||
hash = "sha256-49OnYz3EFiqOe+cLgfynjy14Ve4Ga6OUrLdM8HhZuKQ=";
|
hash = "sha256-kiNtzEup2ygCTk0zk8YV2jxAj6ZzOhP8v0U4FbV15hI=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
|
|
@ -13166,6 +13166,8 @@ self: super: with self; {
|
||||||
|
|
||||||
safety = callPackage ../development/python-modules/safety { };
|
safety = callPackage ../development/python-modules/safety { };
|
||||||
|
|
||||||
|
safety-schemas = callPackage ../development/python-modules/safety-schemas { };
|
||||||
|
|
||||||
sagemaker = callPackage ../development/python-modules/sagemaker { };
|
sagemaker = callPackage ../development/python-modules/sagemaker { };
|
||||||
|
|
||||||
salmon-mail = callPackage ../development/python-modules/salmon-mail { };
|
salmon-mail = callPackage ../development/python-modules/salmon-mail { };
|
||||||
|
|
Loading…
Reference in a new issue