summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/pyhcl/default.nix
blob: 8801e2dbae258a7a6114ae125f79a5a238fcd1de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{
  buildPythonPackage,
  fetchFromGitHub,
  lib,

  # pythonPackages
  pytestCheckHook,
  setuptools,
}:

buildPythonPackage rec {
  pname = "pyhcl";
  version = "0.4.5";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "virtuald";
    repo = "pyhcl";
    tag = version;
    hash = "sha256-vF40xEahs98G0lIC6XIl3eJHIuai2xTAeshUjiKN/BY=";
  };

  # https://github.com/virtuald/pyhcl/blob/51a7524b68fe21e175e157b8af931016d7a357ad/setup.py#L64
  configurePhase = ''
    echo '__version__ = "${version}"' > ./src/hcl/version.py
  '';

  build-system = [ setuptools ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

  meta = {
    description = "HCL is a configuration language. pyhcl is a python parser for it";
    mainProgram = "hcltool";
    homepage = "https://github.com/virtuald/pyhcl";
    license = lib.licenses.mpl20;
    maintainers = with lib.maintainers; [ kamadorueda ];
  };
}