1{ stdenv
2, lib
3, buildPythonPackage
4, cargo
5, cffi
6, fetchPypi
7, glean-parser
8, iso8601
9, pytest-localserver
10, pytestCheckHook
11, pythonOlder
12, rustc
13, rustPlatform
14, semver
15, setuptools-rust
16}:
17
18buildPythonPackage rec {
19 pname = "glean-sdk";
20 version = "52.7.0";
21
22 disabled = pythonOlder "3.6";
23
24 src = fetchPypi {
25 inherit pname version;
26 hash = "sha256-sLjdGHiS7Co/oA9gQyAFkD14tAYjmwjWcPr4CRrzw/0=";
27 };
28
29 cargoDeps = rustPlatform.fetchCargoTarball {
30 inherit src;
31 name = "${pname}-${version}";
32 hash = "sha256-5TlgWcLmjklxhtDbB0aRF71iIRTJwetFj1Jii1DGdvU=";
33 };
34
35 nativeBuildInputs = [
36 cargo
37 rustc
38 rustPlatform.cargoSetupHook
39 setuptools-rust
40 ];
41
42 propagatedBuildInputs = [
43 cffi
44 glean-parser
45 iso8601
46 semver
47 ];
48
49 nativeCheckInputs = [
50 pytest-localserver
51 pytestCheckHook
52 ];
53
54 disabledTests = [
55 # RuntimeError: No ping received.
56 "test_client_activity_api"
57 "test_flipping_upload_enabled_respects_order_of_events"
58 ];
59
60 pythonImportsCheck = [
61 "glean"
62 ];
63
64 meta = with lib; {
65 broken = stdenv.isDarwin;
66 description = "Telemetry client libraries and are a part of the Glean project";
67 homepage = "https://mozilla.github.io/glean/book/index.html";
68 license = licenses.mpl20;
69 maintainers = with maintainers; [ melling ];
70 };
71}