2022-02-10 20:34:41 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2020-04-24 23:36:52 +00:00
|
|
|
, click
|
2022-02-10 20:34:41 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
, pyyaml
|
|
|
|
, six
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cfn-flip";
|
2022-02-10 20:34:41 +00:00
|
|
|
version = "1.3.0";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "awslabs";
|
|
|
|
repo = "aws-cfn-template-flip";
|
|
|
|
rev = version;
|
2022-02-10 20:34:41 +00:00
|
|
|
hash = "sha256-1cV0mHc6+P0CbnLIMSSwNEzDB+1QzNjioH/EoIo40xU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
click
|
|
|
|
pyyaml
|
|
|
|
six
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
2022-02-10 20:34:41 +00:00
|
|
|
pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -i "/--cov/d" tox.ini
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
disabledTests = [
|
|
|
|
# TypeError: load() missing 1 required positional argument: 'Loader'
|
|
|
|
"test_flip_to_yaml_with_longhand_functions"
|
|
|
|
"test_yaml_no_ordered_dict"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"cfn_flip"
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Tool for converting AWS CloudFormation templates between JSON and YAML formats";
|
|
|
|
homepage = "https://github.com/awslabs/aws-cfn-template-flip";
|
|
|
|
license = licenses.asl20;
|
2022-02-10 20:34:41 +00:00
|
|
|
maintainers = with maintainers; [ kamadorueda psyanticy ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|