1{ lib
2, buildPythonPackage
3, click
4, fetchFromGitHub
5, pytestCheckHook
6, pythonOlder
7, pyyaml
8, six
9}:
10
11buildPythonPackage rec {
12 pname = "cfn-flip";
13 version = "1.3.0";
14 format = "setuptools";
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchFromGitHub {
19 owner = "awslabs";
20 repo = "aws-cfn-template-flip";
21 rev = version;
22 hash = "sha256-lfhTR3+D1FvblhQGF83AB8+I8WDPBTmo+q22ksgDgt4=";
23 };
24
25 propagatedBuildInputs = [
26 click
27 pyyaml
28 six
29 ];
30
31 checkInputs = [
32 pytestCheckHook
33 ];
34
35 postPatch = ''
36 sed -i "/--cov/d" tox.ini
37 '';
38
39 disabledTests = [
40 # TypeError: load() missing 1 required positional argument: 'Loader'
41 "test_flip_to_yaml_with_longhand_functions"
42 "test_yaml_no_ordered_dict"
43 ];
44
45 pythonImportsCheck = [
46 "cfn_flip"
47 ];
48
49 meta = with lib; {
50 description = "Tool for converting AWS CloudFormation templates between JSON and YAML formats";
51 homepage = "https://github.com/awslabs/aws-cfn-template-flip";
52 license = licenses.asl20;
53 maintainers = with maintainers; [ kamadorueda psyanticy ];
54 };
55}