summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/pytest-variables/default.nix
blob: 27e2b4bdfd6d7e6f6a83dc5021bad77b68a03dda (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
42
43
44
45
46
47
48
49
50
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  hatch-vcs,
  hatchling,
  pytest,
  hjson,
  toml,
  pytestCheckHook,
  pyyaml,
}:

buildPythonPackage rec {
  pname = "pytest-variables";
  version = "3.1.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "pytest-dev";
    repo = "pytest-variables";
    tag = version;
    hash = "sha256-adKoE3td12JtF2f6/1/+TlSIy4i6gRDmeeWalsE6B/w=";
  };

  build-system = [
    hatch-vcs
    hatchling
  ];

  buildInput = [ pytest ];

  optional-dependencies = {
    hjson = [ hjson ];
    toml = [ toml ];
    yaml = [ pyyaml ];
  };

  nativeCheckInputs = [ pytestCheckHook ] ++ lib.concatAttrValues optional-dependencies;

  pythonImportsCheck = [ "pytest_variables" ];

  meta = {
    description = "Plugin for providing variables to pytest tests/fixtures";
    homepage = "https://github.com/pytest-dev/pytest-variables";
    changelog = "https://github.com/pytest-dev/pytest-variables/blob/${src.rev}/CHANGES.rst";
    license = lib.licenses.mpl20;
    maintainers = with lib.maintainers; [ fab ];
  };
}