2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, boto3
|
2021-08-25 08:27:29 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2020-04-24 23:36:52 +00:00
|
|
|
, jsonschema
|
2021-08-25 08:27:29 +00:00
|
|
|
, parameterized
|
2023-01-20 10:41:00 +00:00
|
|
|
, pydantic
|
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
|
|
|
|
, pythonOlder
|
|
|
|
, pyyaml
|
2023-01-20 10:41:00 +00:00
|
|
|
, typing-extensions
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aws-sam-translator";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "1.82.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-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-xAbFF4bKHFv5YAOlMA28lW1Xc37xV83X4r19MdubvFs=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pytest.ini \
|
|
|
|
--replace " --cov samtranslator --cov-report term-missing --cov-fail-under 95" ""
|
|
|
|
'';
|
|
|
|
|
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
|
|
|
|
];
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"samtranslator"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
preCheck = ''
|
|
|
|
sed -i '2ienv =\n\tAWS_DEFAULT_REGION=us-east-1' pytest.ini
|
|
|
|
'';
|
|
|
|
|
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;
|
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|