1{ lib 2, boto3 3, buildPythonPackage 4, enum34 5, fetchFromGitHub 6, jsonschema 7, mock 8, parameterized 9, pytestCheckHook 10, pythonOlder 11, pyyaml 12, six 13}: 14 15buildPythonPackage rec { 16 pname = "aws-sam-translator"; 17 version = "1.40.0"; 18 19 src = fetchFromGitHub { 20 owner = "aws"; 21 repo = "serverless-application-model"; 22 rev = "v${version}"; 23 sha256 = "sha256-jVJVoS7rc1RebBvihzmv6LvufMf/VvXOwj0TYkXBdmo="; 24 }; 25 26 propagatedBuildInputs = [ 27 boto3 28 jsonschema 29 six 30 ] ++ lib.optionals (pythonOlder "3.4") [ 31 enum34 32 ]; 33 34 postPatch = '' 35 substituteInPlace pytest.ini \ 36 --replace " --cov samtranslator --cov-report term-missing --cov-fail-under 95" "" 37 ''; 38 39 checkInputs = [ 40 mock 41 parameterized 42 pytestCheckHook 43 pyyaml 44 ]; 45 46 pythonImportsCheck = [ "samtranslator" ]; 47 48 meta = with lib; { 49 description = "Python library to transform SAM templates into AWS CloudFormation templates"; 50 homepage = "https://github.com/awslabs/serverless-application-model"; 51 license = licenses.asl20; 52 maintainers = with maintainers; [ ]; 53 }; 54}