1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 hatch-vcs,
6 hatchling,
7 pytest,
8 hjson,
9 toml,
10 pytestCheckHook,
11 pyyaml,
12 pythonOlder,
13}:
14
15buildPythonPackage rec {
16 pname = "pytest-variables";
17 version = "3.1.0";
18 pyproject = true;
19
20 disabled = pythonOlder "3.8";
21
22 src = fetchFromGitHub {
23 owner = "pytest-dev";
24 repo = "pytest-variables";
25 tag = version;
26 hash = "sha256-adKoE3td12JtF2f6/1/+TlSIy4i6gRDmeeWalsE6B/w=";
27 };
28
29 build-system = [
30 hatch-vcs
31 hatchling
32 ];
33
34 buildInput = [ pytest ];
35
36 optional-dependencies = {
37 hjson = [ hjson ];
38 toml = [ toml ];
39 yaml = [ pyyaml ];
40 };
41
42 nativeCheckInputs = [ pytestCheckHook ] ++ lib.flatten (builtins.attrValues optional-dependencies);
43
44 pythonImportsCheck = [ "pytest_variables" ];
45
46 meta = {
47 description = "Plugin for providing variables to pytest tests/fixtures";
48 homepage = "https://github.com/pytest-dev/pytest-variables";
49 changelog = "https://github.com/pytest-dev/pytest-variables/blob/${src.rev}/CHANGES.rst";
50 license = lib.licenses.mpl20;
51 maintainers = with lib.maintainers; [ fab ];
52 };
53}