1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
{
lib,
boto3,
buildPythonPackage,
fetchFromGitHub,
jsonschema,
parameterized,
pydantic,
pytest-env,
pytest-rerunfailures,
pytest-xdist,
pytestCheckHook,
pythonAtLeast,
pyyaml,
setuptools,
typing-extensions,
}:
buildPythonPackage rec {
pname = "aws-sam-translator";
version = "1.103.0";
pyproject = true;
# https://github.com/aws/serverless-application-model/issues/3831
disabled = pythonAtLeast "3.14";
src = fetchFromGitHub {
owner = "aws";
repo = "serverless-application-model";
tag = "v${version}";
hash = "sha256-FW7tmXsD4VfR/c6IJUCvsYPYLIisaEqAhD0sp9ufA/s=";
};
postPatch = ''
# don't try to use --cov or fail on new warnings
rm pytest.ini
'';
build-system = [ setuptools ];
dependencies = [
boto3
jsonschema
pydantic
typing-extensions
];
nativeCheckInputs = [
parameterized
pytest-env
pytest-rerunfailures
pytest-xdist
pytestCheckHook
pyyaml
];
preCheck = ''
export AWS_DEFAULT_REGION=us-east-1
'';
enabledTestPaths = [
"tests"
];
disabledTestMarks = [
"slow"
];
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"
];
__darwinAllowLocalNetworking = true;
pythonImportsCheck = [ "samtranslator" ];
meta = {
description = "Python library to transform SAM templates into AWS CloudFormation templates";
homepage = "https://github.com/aws/serverless-application-model";
changelog = "https://github.com/aws/serverless-application-model/releases/tag/${src.tag}";
license = lib.licenses.asl20;
maintainers = [ ];
};
}
|