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