2022-06-16 17:23:12 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2021-12-06 16:07:01 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, cargo
|
|
|
|
, cffi
|
2022-03-30 09:31:56 +00:00
|
|
|
, fetchPypi
|
2021-12-06 16:07:01 +00:00
|
|
|
, glean-parser
|
2022-03-30 09:31:56 +00:00
|
|
|
, iso8601
|
|
|
|
, pytest-localserver
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, rustc
|
|
|
|
, rustPlatform
|
2022-09-30 11:47:45 +00:00
|
|
|
, semver
|
2022-03-30 09:31:56 +00:00
|
|
|
, setuptools-rust
|
2021-12-06 16:07:01 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "glean-sdk";
|
2022-09-30 11:47:45 +00:00
|
|
|
version = "51.2.0";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-09-30 11:47:45 +00:00
|
|
|
hash = "sha256-4EXCYthMabdmxWYltcnO0UTNeAYXwXQeRfwxt1WD3Ug=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
cargoDeps = rustPlatform.fetchCargoTarball {
|
|
|
|
inherit src;
|
|
|
|
name = "${pname}-${version}";
|
2022-09-30 11:47:45 +00:00
|
|
|
hash = "sha256-qOGoonutuIY+0UVaVSVVt0NbqEICdNs3qHWG0Epmkl0=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cargo
|
2022-03-30 09:31:56 +00:00
|
|
|
rustc
|
2021-12-06 16:07:01 +00:00
|
|
|
rustPlatform.cargoSetupHook
|
2022-03-30 09:31:56 +00:00
|
|
|
setuptools-rust
|
2021-12-06 16:07:01 +00:00
|
|
|
];
|
2022-03-30 09:31:56 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
cffi
|
|
|
|
glean-parser
|
2022-03-30 09:31:56 +00:00
|
|
|
iso8601
|
2022-09-30 11:47:45 +00:00
|
|
|
semver
|
2021-12-06 16:07:01 +00:00
|
|
|
];
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytest-localserver
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
disabledTests = [
|
|
|
|
# RuntimeError: No ping received.
|
|
|
|
"test_client_activity_api"
|
|
|
|
];
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace glean-core/python/setup.py \
|
|
|
|
--replace "glean_parser==5.0.1" "glean_parser>=5.0.1"
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"glean"
|
|
|
|
];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2022-06-16 17:23:12 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2022-03-30 09:31:56 +00:00
|
|
|
description = "Telemetry client libraries and are a part of the Glean project";
|
2021-12-06 16:07:01 +00:00
|
|
|
homepage = "https://mozilla.github.io/glean/book/index.html";
|
|
|
|
license = licenses.mpl20;
|
2022-06-16 17:23:12 +00:00
|
|
|
maintainers = [];
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
}
|