2018-06-07 15:05:22 +01:00
|
|
|
{ lib
|
|
|
|
, boto3
|
2021-08-23 08:30:12 +01:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2018-06-07 15:05:22 +01:00
|
|
|
, jsonschema
|
2021-08-23 08:30:12 +01:00
|
|
|
, mock
|
|
|
|
, parameterized
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, pyyaml
|
2018-06-07 15:05:22 +01:00
|
|
|
, six
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aws-sam-translator";
|
2021-11-24 17:45:37 +00:00
|
|
|
version = "1.42.0";
|
2022-01-17 14:45:35 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2018-06-07 15:05:22 +01:00
|
|
|
|
2021-08-23 08:30:12 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "aws";
|
|
|
|
repo = "serverless-application-model";
|
|
|
|
rev = "v${version}";
|
2021-11-24 17:45:37 +00:00
|
|
|
sha256 = "sha256-pjcRsmxPL4lbgDopW+wKQRkRcqebLPTd95JTL8PiWtc=";
|
2018-06-07 15:05:22 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
boto3
|
|
|
|
jsonschema
|
|
|
|
six
|
2021-08-23 08:30:12 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
2022-01-17 14:45:35 +00:00
|
|
|
substituteInPlace requirements/base.txt \
|
|
|
|
--replace "jsonschema~=3.2" "jsonschema>=3.2"
|
2021-08-23 08:30:12 +01:00
|
|
|
substituteInPlace pytest.ini \
|
|
|
|
--replace " --cov samtranslator --cov-report term-missing --cov-fail-under 95" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
mock
|
|
|
|
parameterized
|
|
|
|
pytestCheckHook
|
|
|
|
pyyaml
|
|
|
|
];
|
|
|
|
|
2022-01-17 14:45:35 +00:00
|
|
|
disabledTests = [
|
|
|
|
# AssertionError: Expected 7 errors, found 9:
|
|
|
|
"test_errors_13_error_definitionuri"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"samtranslator"
|
|
|
|
];
|
2018-06-07 15:05:22 +01:00
|
|
|
|
2020-11-24 16:21:22 +00:00
|
|
|
meta = with lib; {
|
2018-06-07 15:05:22 +01:00
|
|
|
description = "Python library to transform SAM templates into AWS CloudFormation templates";
|
2021-08-23 08:30:12 +01:00
|
|
|
homepage = "https://github.com/awslabs/serverless-application-model";
|
2020-11-24 16:21:22 +00:00
|
|
|
license = licenses.asl20;
|
2021-08-23 08:30:12 +01:00
|
|
|
maintainers = with maintainers; [ ];
|
2018-06-07 15:05:22 +01:00
|
|
|
};
|
|
|
|
}
|