2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
boto3,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
jsonschema,
|
|
|
|
parameterized,
|
|
|
|
pydantic,
|
|
|
|
pytest-env,
|
|
|
|
pytest-rerunfailures,
|
|
|
|
pytest-xdist,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
pyyaml,
|
|
|
|
typing-extensions,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aws-sam-translator";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "1.86.0";
|
2022-02-10 20:34:41 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-08-25 08:27:29 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "aws";
|
|
|
|
repo = "serverless-application-model";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-elirU6u6smuYIj8oO6s2ybQB8Tu0pJPkBdjd0W0CfFE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
postPatch = ''
|
2024-02-29 20:09:43 +00:00
|
|
|
# don't try to use --cov or fail on new warnings
|
|
|
|
rm pytest.ini
|
2023-10-09 19:29:22 +00:00
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
boto3
|
|
|
|
jsonschema
|
2023-01-20 10:41:00 +00:00
|
|
|
pydantic
|
|
|
|
typing-extensions
|
2021-08-25 08:27:29 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-08-25 08:27:29 +00:00
|
|
|
parameterized
|
2022-07-14 12:49:19 +00:00
|
|
|
pytest-env
|
2023-01-20 10:41:00 +00:00
|
|
|
pytest-rerunfailures
|
|
|
|
pytest-xdist
|
2021-08-25 08:27:29 +00:00
|
|
|
pytestCheckHook
|
|
|
|
pyyaml
|
|
|
|
];
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
preCheck = ''
|
2024-02-29 20:09:43 +00:00
|
|
|
export AWS_DEFAULT_REGION=us-east-1
|
2023-10-09 19:29:22 +00:00
|
|
|
'';
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"tests"
|
|
|
|
''-m "not slow"''
|
|
|
|
];
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
disabledTests = [
|
|
|
|
# urllib3 2.0 compat
|
|
|
|
"test_plugin_accepts_different_sar_client"
|
|
|
|
"test_plugin_accepts_flags"
|
|
|
|
"test_plugin_accepts_parameters"
|
|
|
|
"test_plugin_default_values"
|
|
|
|
"test_plugin_invalid_configuration_raises_exception"
|
|
|
|
"test_plugin_must_setup_correct_name"
|
|
|
|
"test_must_process_applications"
|
|
|
|
"test_must_process_applications_validate"
|
|
|
|
"test_process_invalid_applications"
|
|
|
|
"test_process_invalid_applications_validate"
|
|
|
|
"test_resolve_intrinsics"
|
|
|
|
"test_sar_service_calls"
|
|
|
|
"test_sar_success_one_app"
|
|
|
|
"test_sar_throttling_doesnt_stop_processing"
|
|
|
|
"test_sleep_between_sar_checks"
|
|
|
|
"test_unexpected_sar_error_stops_processing"
|
|
|
|
];
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "samtranslator" ];
|
2024-02-29 20:09:43 +00:00
|
|
|
|
2021-02-13 14:23:35 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Python library to transform SAM templates into AWS CloudFormation templates";
|
2023-11-16 04:20:00 +00:00
|
|
|
homepage = "https://github.com/aws/serverless-application-model";
|
2023-10-09 19:29:22 +00:00
|
|
|
changelog = "https://github.com/aws/serverless-application-model/releases/tag/v${version}";
|
2021-02-13 14:23:35 +00:00
|
|
|
license = licenses.asl20;
|
2021-08-25 08:27:29 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|