1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6 lark,
7 pytestCheckHook,
8 setuptools-scm,
9 setuptools,
10}:
11
12buildPythonPackage rec {
13 pname = "python-hcl2";
14 version = "7.3.1";
15 pyproject = true;
16
17 src = fetchFromGitHub {
18 owner = "amplify-education";
19 repo = "python-hcl2";
20 tag = "v${version}";
21 hash = "sha256-aHaDZvgpiINUEdSYlUVwa0l80mujb9F04eboAdiuzDc=";
22 };
23
24 disabled = pythonOlder "3.7";
25
26 build-system = [
27 setuptools
28 setuptools-scm
29 ];
30
31 dependencies = [ lark ];
32
33 pythonImportsCheck = [ "hcl2" ];
34
35 nativeCheckInputs = [ pytestCheckHook ];
36
37 meta = with lib; {
38 description = "Parser for HCL2 written in Python using Lark";
39 homepage = "https://github.com/amplify-education/python-hcl2";
40 changelog = "https://github.com/amplify-education/python-hcl2/releases/tag/${src.tag}";
41 license = licenses.mit;
42 maintainers = with maintainers; [ shivaraj-bh ];
43 };
44}