Files
nixpkgs/pkgs/development/python-modules/bc-python-hcl2/default.nix
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

45 lines
1004 B
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
lark,
pythonOlder,
setuptools,
}:
buildPythonPackage rec {
pname = "bc-python-hcl2";
version = "0.4.3";
pyproject = true;
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "bridgecrewio";
repo = "python-hcl2";
tag = version;
hash = "sha256-Auk5xDLw2UhMzWa7YMKzwUSjhD9s6xHt8RcXMzzL8M0=";
};
build-system = [ setuptools ];
dependencies = [ lark ];
# This fork of python-hcl2 doesn't ship tests
doCheck = false;
pythonImportsCheck = [ "hcl2" ];
meta = {
description = "Parser for HCL2 written in Python using Lark";
longDescription = ''
This parser only supports HCL2 and isn't backwards compatible with HCL v1.
It can be used to parse any HCL2 config file such as Terraform.
'';
homepage = "https://github.com/bridgecrewio/python-hcl2";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ anhdle14 ];
mainProgram = "hcl2tojson";
};
}