nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, appdirs
3, buildPythonPackage
4, click
5, diskcache
6, fetchPypi
7, jinja2
8, jsonschema
9, pytestCheckHook
10, pythonOlder
11, pyyaml
12, setuptools-scm
13, yamllint
14}:
15
16buildPythonPackage rec {
17 pname = "glean-parser";
18 version = "5.1.2";
19 format = "setuptools";
20
21 disabled = pythonOlder "3.6";
22
23 src = fetchPypi {
24 pname = "glean_parser";
25 inherit version;
26 hash = "sha256-PjOMNUnrz0kDfYEXv5Ni/9RIHn4Yylle6NJOK1Rb3SY=";
27 };
28
29 postPatch = ''
30 substituteInPlace setup.py \
31 --replace "pytest-runner" "" \
32 --replace "MarkupSafe==2.0.1" "MarkupSafe"
33 '';
34
35 nativeBuildInputs = [
36 setuptools-scm
37 ];
38
39 propagatedBuildInputs = [
40 appdirs
41 click
42 diskcache
43 jinja2
44 jsonschema
45 pyyaml
46 yamllint
47 ];
48
49 checkInputs = [
50 pytestCheckHook
51 ];
52
53 disabledTests = [
54 # https://bugzilla.mozilla.org/show_bug.cgi?id=1741668
55 "test_validate_ping"
56 ];
57
58 pythonImportsCheck = [
59 "glean_parser"
60 ];
61
62 meta = with lib; {
63 description = "Tools for parsing the metadata for Mozilla's glean telemetry SDK";
64 homepage = "https://github.com/mozilla/glean_parser";
65 license = licenses.mpl20;
66 maintainers = with maintainers; [ kvark ];
67 };
68}