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
|
|
|
, mock
|
|
|
|
, parameterized
|
2022-07-14 12:49:19 +00:00
|
|
|
, pytest-env
|
2021-08-25 08:27:29 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, pyyaml
|
2020-04-24 23:36:52 +00:00
|
|
|
, six
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aws-sam-translator";
|
2022-07-14 12:49:19 +00:00
|
|
|
version = "1.46.0";
|
2022-02-10 20:34:41 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-08-25 08:27:29 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "aws";
|
|
|
|
repo = "serverless-application-model";
|
|
|
|
rev = "v${version}";
|
2022-07-14 12:49:19 +00:00
|
|
|
sha256 = "sha256-SLGxpRbTuK+Lxww45dfHIMwwxV5vhlnYyG4WqG45aNg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
boto3
|
|
|
|
jsonschema
|
|
|
|
six
|
2021-08-25 08:27:29 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
2022-02-10 20:34:41 +00:00
|
|
|
substituteInPlace requirements/base.txt \
|
|
|
|
--replace "jsonschema~=3.2" "jsonschema>=3.2"
|
2021-08-25 08:27:29 +00:00
|
|
|
substituteInPlace pytest.ini \
|
|
|
|
--replace " --cov samtranslator --cov-report term-missing --cov-fail-under 95" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
mock
|
|
|
|
parameterized
|
2022-07-14 12:49:19 +00:00
|
|
|
pytest-env
|
2021-08-25 08:27:29 +00:00
|
|
|
pytestCheckHook
|
|
|
|
pyyaml
|
|
|
|
];
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
disabledTests = [
|
|
|
|
# AssertionError: Expected 7 errors, found 9:
|
|
|
|
"test_errors_13_error_definitionuri"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"samtranslator"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
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";
|
2021-08-25 08:27:29 +00:00
|
|
|
homepage = "https://github.com/awslabs/serverless-application-model";
|
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
|
|
|
};
|
|
|
|
}
|