1{
2 stdenv,
3 lib,
4 buildPythonPackage,
5 fetchFromGitHub,
6 glean-parser,
7 pytest-localserver,
8 pytestCheckHook,
9 rustPlatform,
10 semver,
11 setuptools,
12}:
13
14buildPythonPackage rec {
15 pname = "glean-sdk";
16 version = "64.0.0";
17 pyproject = true;
18
19 src = fetchFromGitHub {
20 owner = "mozilla";
21 repo = "glean";
22 rev = "v${version}";
23 hash = "sha256-6UAZkVBxFJ1CWRn9enCLBBidIugAtxP7stbYlhh1ArA=";
24 };
25
26 cargoDeps = rustPlatform.fetchCargoVendor {
27 inherit pname version src;
28 hash = "sha256-Ppc+6ex3yLC4xuhbZGZDKLqxDjSdGpgrLDpbbbqMgPY=";
29 };
30
31 build-system = [
32 rustPlatform.cargoSetupHook
33 rustPlatform.maturinBuildHook
34 setuptools
35 ];
36
37 dependencies = [
38 glean-parser
39 semver
40 ];
41
42 nativeCheckInputs = [
43 pytest-localserver
44 pytestCheckHook
45 ];
46
47 enabledTestPaths = [ "glean-core/python/tests" ];
48
49 disabledTests = [
50 # RuntimeError: No ping received.
51 "test_client_activity_api"
52 "test_flipping_upload_enabled_respects_order_of_events"
53 # A warning causes this test to fail
54 "test_get_language_tag_reports_the_tag_for_the_default_locale"
55 ];
56
57 pythonImportsCheck = [ "glean" ];
58
59 meta = {
60 broken = stdenv.hostPlatform.isDarwin;
61 description = "Telemetry client libraries and are a part of the Glean project";
62 homepage = "https://mozilla.github.io/glean/book/index.html";
63 license = lib.licenses.mpl20;
64 maintainers = with lib.maintainers; [ melling ];
65 };
66}