1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 lark, 6 pynose, 7 pythonOlder, 8 setuptools, 9}: 10 11buildPythonPackage rec { 12 pname = "bc-python-hcl2"; 13 version = "0.4.2"; 14 pyproject = true; 15 16 disabled = pythonOlder "3.6"; 17 18 src = fetchPypi { 19 inherit pname version; 20 hash = "sha256-rI/1n7m9Q36im4mn18UH/QoelXhFuumurGnyiSuNaB4="; 21 }; 22 23 # Nose is required during build process, so can not use `nativeCheckInputs`. 24 buildInputs = [ 25 pynose 26 setuptools 27 ]; 28 29 dependencies = [ lark ]; 30 31 # This fork of python-hcl2 doesn't ship tests 32 doCheck = false; 33 34 pythonImportsCheck = [ "hcl2" ]; 35 36 meta = with lib; { 37 description = "Parser for HCL2 written in Python using Lark"; 38 longDescription = '' 39 This parser only supports HCL2 and isn't backwards compatible with HCL v1. 40 It can be used to parse any HCL2 config file such as Terraform. 41 ''; 42 # Although this is the main homepage from PyPi but it is also a homepage 43 # of another PyPi package (python-hcl2). But these two are different. 44 homepage = "https://github.com/amplify-education/python-hcl2"; 45 license = licenses.mit; 46 maintainers = with maintainers; [ anhdle14 ]; 47 mainProgram = "hcl2tojson"; 48 }; 49}