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