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