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 src; 28 name = "${pname}-${version}"; 29 hash = "sha256-Ppc+6ex3yLC4xuhbZGZDKLqxDjSdGpgrLDpbbbqMgPY="; 30 }; 31 32 build-system = [ 33 rustPlatform.cargoSetupHook 34 rustPlatform.maturinBuildHook 35 setuptools 36 ]; 37 38 dependencies = [ 39 glean-parser 40 semver 41 ]; 42 43 nativeCheckInputs = [ 44 pytest-localserver 45 pytestCheckHook 46 ]; 47 48 pytestFlagsArray = [ "glean-core/python/tests" ]; 49 50 disabledTests = [ 51 # RuntimeError: No ping received. 52 "test_client_activity_api" 53 "test_flipping_upload_enabled_respects_order_of_events" 54 # A warning causes this test to fail 55 "test_get_language_tag_reports_the_tag_for_the_default_locale" 56 ]; 57 58 pythonImportsCheck = [ "glean" ]; 59 60 meta = { 61 broken = stdenv.hostPlatform.isDarwin; 62 description = "Telemetry client libraries and are a part of the Glean project"; 63 homepage = "https://mozilla.github.io/glean/book/index.html"; 64 license = lib.licenses.mpl20; 65 maintainers = with lib.maintainers; [ melling ]; 66 }; 67}