Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / glean-sdk / default.nix
blob83abb1089e30ee99603ed70045407ce9a98e89f4
1 { stdenv
2 , lib
3 , buildPythonPackage
4 , cargo
5 , cffi
6 , fetchPypi
7 , glean-parser
8 , iso8601
9 , lmdb
10 , pkg-config
11 , pytest-localserver
12 , pytestCheckHook
13 , python
14 , pythonOlder
15 , rustc
16 , rustPlatform
17 , semver
18 , setuptools-rust
21 buildPythonPackage rec {
22   pname = "glean-sdk";
23   version = "52.7.0";
24   format = "setuptools";
26   disabled = pythonOlder "3.6";
28   src = fetchPypi {
29     inherit pname version;
30     hash = "sha256-sLjdGHiS7Co/oA9gQyAFkD14tAYjmwjWcPr4CRrzw/0=";
31   };
33   cargoDeps = rustPlatform.fetchCargoTarball {
34     inherit src;
35     name = "${pname}-${version}";
36     hash = "sha256-5TlgWcLmjklxhtDbB0aRF71iIRTJwetFj1Jii1DGdvU=";
37   };
39   nativeBuildInputs = [
40     cargo
41     pkg-config
42     rustc
43     rustPlatform.cargoSetupHook
44     setuptools-rust
45   ];
47   buildInputs = [
48     lmdb
49   ];
51   propagatedBuildInputs = [
52     cffi
53     glean-parser
54     iso8601
55     semver
56   ];
58   nativeCheckInputs = [
59     pytest-localserver
60     pytestCheckHook
61   ];
63   disabledTests = [
64     # RuntimeError: No ping received.
65     "test_client_activity_api"
66     "test_flipping_upload_enabled_respects_order_of_events"
67   ];
69   postInstallCheck = lib.optionalString stdenv.hostPlatform.isElf ''
70     readelf -a $out/${python.sitePackages}/glean/libglean_ffi.so | grep -F 'Shared library: [liblmdb.so'
71   '';
73   pythonImportsCheck = [
74     "glean"
75   ];
77   meta = with lib; {
78     broken = stdenv.isDarwin;
79     description = "Telemetry client libraries and are a part of the Glean project";
80     homepage = "https://mozilla.github.io/glean/book/index.html";
81     license = licenses.mpl20;
82     maintainers = with maintainers; [ melling ];
83   };