2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, appdirs
|
2022-03-30 09:31:56 +00:00
|
|
|
, buildPythonPackage
|
2021-12-06 16:07:01 +00:00
|
|
|
, click
|
|
|
|
, diskcache
|
2022-03-30 09:31:56 +00:00
|
|
|
, fetchPypi
|
2021-12-06 16:07:01 +00:00
|
|
|
, jinja2
|
|
|
|
, jsonschema
|
2022-03-30 09:31:56 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2021-12-06 16:07:01 +00:00
|
|
|
, pyyaml
|
2022-03-30 09:31:56 +00:00
|
|
|
, setuptools-scm
|
2021-12-06 16:07:01 +00:00
|
|
|
, yamllint
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2022-03-30 09:31:56 +00:00
|
|
|
pname = "glean-parser";
|
2024-02-07 01:22:34 +00:00
|
|
|
version = "11.0.1";
|
2022-03-30 09:31:56 +00:00
|
|
|
format = "setuptools";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
2022-03-30 09:31:56 +00:00
|
|
|
pname = "glean_parser";
|
|
|
|
inherit version;
|
2024-02-07 01:22:34 +00:00
|
|
|
hash = "sha256-eeUjtRsP3c6fbGMJ+oxkMou3BrLWyEelP4ipPQFpXkM=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "pytest-runner" "" \
|
2022-08-12 12:06:08 +00:00
|
|
|
--replace "MarkupSafe>=1.1.1,<=2.0.1" "MarkupSafe>=1.1.1"
|
2022-04-27 09:35:20 +00:00
|
|
|
'';
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
appdirs
|
|
|
|
click
|
|
|
|
diskcache
|
|
|
|
jinja2
|
|
|
|
jsonschema
|
|
|
|
pyyaml
|
|
|
|
yamllint
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-12-06 16:07:01 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
2022-03-30 09:31:56 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
preCheck = ''
|
|
|
|
export HOME=$TMPDIR
|
|
|
|
'';
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
disabledTests = [
|
2022-08-12 12:06:08 +00:00
|
|
|
# Network access
|
2021-12-06 16:07:01 +00:00
|
|
|
"test_validate_ping"
|
2022-08-12 12:06:08 +00:00
|
|
|
# Fails since yamllint 1.27.x
|
|
|
|
"test_yaml_lint"
|
2021-12-06 16:07:01 +00:00
|
|
|
];
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"glean_parser"
|
|
|
|
];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Tools for parsing the metadata for Mozilla's glean telemetry SDK";
|
|
|
|
homepage = "https://github.com/mozilla/glean_parser";
|
2023-03-15 16:39:30 +00:00
|
|
|
changelog = "https://github.com/mozilla/glean_parser/blob/v${version}/CHANGELOG.md";
|
2021-12-06 16:07:01 +00:00
|
|
|
license = licenses.mpl20;
|
2022-06-16 17:23:12 +00:00
|
|
|
maintainers = with maintainers; [];
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
}
|