1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 lark, 6 pythonOlder, 7 setuptools, 8}: 9 10buildPythonPackage rec { 11 pname = "bc-python-hcl2"; 12 version = "0.4.3"; 13 pyproject = true; 14 15 disabled = pythonOlder "3.6"; 16 17 src = fetchFromGitHub { 18 owner = "bridgecrewio"; 19 repo = "python-hcl2"; 20 tag = version; 21 hash = "sha256-Auk5xDLw2UhMzWa7YMKzwUSjhD9s6xHt8RcXMzzL8M0="; 22 }; 23 24 build-system = [ setuptools ]; 25 26 dependencies = [ lark ]; 27 28 # This fork of python-hcl2 doesn't ship tests 29 doCheck = false; 30 31 pythonImportsCheck = [ "hcl2" ]; 32 33 meta = with lib; { 34 description = "Parser for HCL2 written in Python using Lark"; 35 longDescription = '' 36 This parser only supports HCL2 and isn't backwards compatible with HCL v1. 37 It can be used to parse any HCL2 config file such as Terraform. 38 ''; 39 homepage = "https://github.com/bridgecrewio/python-hcl2"; 40 license = licenses.mit; 41 maintainers = with maintainers; [ anhdle14 ]; 42 mainProgram = "hcl2tojson"; 43 }; 44}