1{
2 lib,
3 buildPythonPackage,
4 click,
5 diskcache,
6 fetchPypi,
7 hatchling,
8 hatch-vcs,
9 jinja2,
10 jsonschema,
11 platformdirs,
12 pytestCheckHook,
13 pyyaml,
14}:
15
16buildPythonPackage rec {
17 pname = "glean-parser";
18 version = "17.3.0";
19 pyproject = true;
20
21 src = fetchPypi {
22 pname = "glean_parser";
23 inherit version;
24 hash = "sha256-9w+0SWQ2Bo+B73hgKaGzafYa4vkyfusvpQM126We4hQ=";
25 };
26
27 build-system = [
28 hatchling
29 hatch-vcs
30 ];
31
32 dependencies = [
33 click
34 diskcache
35 jinja2
36 jsonschema
37 pyyaml
38 platformdirs
39 ];
40
41 nativeCheckInputs = [ pytestCheckHook ];
42
43 preCheck = ''
44 export HOME=$TMPDIR
45 '';
46
47 disabledTests = [
48 # Network access
49 "test_validate_ping"
50 "test_logging"
51 # Fails since yamllint 1.27.x
52 "test_yaml_lint"
53 ];
54
55 pythonImportsCheck = [ "glean_parser" ];
56
57 meta = {
58 description = "Tools for parsing the metadata for Mozilla's glean telemetry SDK";
59 mainProgram = "glean_parser";
60 homepage = "https://github.com/mozilla/glean_parser";
61 changelog = "https://github.com/mozilla/glean_parser/blob/v${version}/CHANGELOG.md";
62 license = lib.licenses.mpl20;
63 maintainers = [ ];
64 };
65}