depot/third_party/nixpkgs/pkgs/development/python-modules/glean-parser/default.nix
Default email 5c370c0b2a Project import generated by Copybara.
GitOrigin-RevId: 33d1e753c82ffc557b4a585c77de43d4c922ebb5
2024-05-15 17:35:15 +02:00

79 lines
1.4 KiB
Nix

{ lib
, appdirs
, buildPythonPackage
, click
, diskcache
, fetchPypi
, jinja2
, jsonschema
, pytestCheckHook
, pythonOlder
, pyyaml
, setuptools
, setuptools-scm
, yamllint
}:
buildPythonPackage rec {
pname = "glean-parser";
version = "14.1.1";
format = "setuptools";
disabled = pythonOlder "3.8";
src = fetchPypi {
pname = "glean_parser";
inherit version;
hash = "sha256-bYqUNkB4/0W/+0+1G6/Ur5znDD5IlKFIc4gVNA0vAOg=";
};
postPatch = ''
substituteInPlace setup.py \
--replace "pytest-runner" "" \
--replace "MarkupSafe>=1.1.1,<=2.0.1" "MarkupSafe>=1.1.1"
'';
nativeBuildInputs = [
setuptools-scm
];
propagatedBuildInputs = [
appdirs
click
diskcache
jinja2
jsonschema
pyyaml
setuptools
yamllint
];
nativeCheckInputs = [
pytestCheckHook
];
preCheck = ''
export HOME=$TMPDIR
'';
disabledTests = [
# Network access
"test_validate_ping"
"test_logging"
# Fails since yamllint 1.27.x
"test_yaml_lint"
];
pythonImportsCheck = [
"glean_parser"
];
meta = with lib; {
description = "Tools for parsing the metadata for Mozilla's glean telemetry SDK";
mainProgram = "glean_parser";
homepage = "https://github.com/mozilla/glean_parser";
changelog = "https://github.com/mozilla/glean_parser/blob/v${version}/CHANGELOG.md";
license = licenses.mpl20;
maintainers = with maintainers; [];
};
}