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