1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6 pytestCheckHook,
7 pyyaml,
8 ruamel-yaml,
9 setuptools,
10}:
11
12buildPythonPackage rec {
13 pname = "yamale";
14 version = "6.0.0";
15 pyproject = true;
16
17 disabled = pythonOlder "3.6";
18
19 src = fetchFromGitHub {
20 owner = "23andMe";
21 repo = "yamale";
22 tag = version;
23 hash = "sha256-Ij9jhGMYHUStZ/xR5GUg/eF6YQdtIfpLU7g1pev6wJU=";
24 };
25
26 build-system = [ setuptools ];
27
28 dependencies = [
29 pyyaml
30 ];
31
32 optional-dependencies = {
33 ruamel = [ ruamel-yaml ];
34 };
35
36 nativeCheckInputs = [ pytestCheckHook ] ++ optional-dependencies.ruamel;
37
38 pythonImportsCheck = [ "yamale" ];
39
40 meta = with lib; {
41 description = "Schema and validator for YAML";
42 homepage = "https://github.com/23andMe/Yamale";
43 changelog = "https://github.com/23andMe/Yamale/releases/tag/${src.tag}";
44 license = licenses.mit;
45 maintainers = with maintainers; [ rtburns-jpl ];
46 mainProgram = "yamale";
47 };
48}