From bcad662517eca96758f92580cdcd0fb5e3fe5e45 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 9 Aug 2022 22:27:58 +0200 Subject: [PATCH 1/3] python3Packages.glean-sdk: 50.1.2 -> 51.1.0 --- pkgs/development/python-modules/glean-sdk/default.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/glean-sdk/default.nix b/pkgs/development/python-modules/glean-sdk/default.nix index c363d2150db2..8ede9275db89 100644 --- a/pkgs/development/python-modules/glean-sdk/default.nix +++ b/pkgs/development/python-modules/glean-sdk/default.nix @@ -16,19 +16,19 @@ buildPythonPackage rec { pname = "glean-sdk"; - version = "50.1.2"; + version = "51.1.0"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - hash = "sha256-avTIinFBSoCHeCiX7EoS4ucBK6FyFC1SuAFpSdxwPUk="; + hash = "sha256-Rt+N/sqX7IyoXbytzF9UkyXsx0vQXbGs+XJkaMhevE0="; }; cargoDeps = rustPlatform.fetchCargoTarball { inherit src; name = "${pname}-${version}"; - hash = "sha256:10k8684665iawf1yswx39s4cj6c5d37j4d7jgbn0fcm08qlkfzxi"; + hash = "sha256-oY94YVs6I+/klogyajBoCrYexp9oUSrQ6znWVbigf2E="; }; nativeBuildInputs = [ @@ -49,6 +49,11 @@ buildPythonPackage rec { pytestCheckHook ]; + disabledTests = [ + # RuntimeError: No ping received. + "test_client_activity_api" + ]; + postPatch = '' substituteInPlace glean-core/python/setup.py \ --replace "glean_parser==5.0.1" "glean_parser>=5.0.1" From 79c27cceda1b9b66ea5980b696cf093ad0905a7c Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 9 Aug 2022 22:47:05 +0200 Subject: [PATCH 2/3] python3Packages.callee: init at 0.3.1 --- .../python-modules/callee/default.nix | 36 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 38 insertions(+) create mode 100644 pkgs/development/python-modules/callee/default.nix diff --git a/pkgs/development/python-modules/callee/default.nix b/pkgs/development/python-modules/callee/default.nix new file mode 100644 index 000000000000..1cf63455c24b --- /dev/null +++ b/pkgs/development/python-modules/callee/default.nix @@ -0,0 +1,36 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "callee"; + version = "0.3.1"; + format = "setuptools"; + + src = fetchFromGitHub { + owner = "Xion"; + repo = pname; + rev = "refs/tags/${version}"; + hash = "sha256-dsXMY3bW/70CmTfCuy5KjxPa+NLCzxzWv5e1aV2NEWE="; + }; + + pythonImportsCheck = [ + "callee" + ]; + + doCheck = false; # missing dependency + + checkInputs = [ + # taipan missing, unmaintained, not python3.10 compatible + pytestCheckHook + ]; + + meta = with lib; { + description = "Argument matchers for unittest.mock"; + homepage = "https://github.com/Xion/callee"; + license = licenses.bsd3; + maintainers = with maintainers; [ hexa ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e70f9ea81b7a..6f90e3ca8388 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1528,6 +1528,8 @@ in { caldav = callPackage ../development/python-modules/caldav { }; + callee = callPackage ../development/python-modules/callee { }; + calmjs-parse = callPackage ../development/python-modules/calmjs-parse { }; can = callPackage ../development/python-modules/can { }; From 47d03c0a3f82c8cadf4c1af01f7e8ea31ce123ef Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 10 Aug 2022 16:03:22 +0200 Subject: [PATCH 3/3] mozphab: 0.1.99 -> 1.1.0; rename from moz-phab and enable the tests. --- pkgs/applications/misc/moz-phab/default.nix | 59 ---------------- pkgs/applications/misc/mozphab/default.nix | 78 +++++++++++++++++++++ pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 2 +- 4 files changed, 80 insertions(+), 60 deletions(-) delete mode 100644 pkgs/applications/misc/moz-phab/default.nix create mode 100644 pkgs/applications/misc/mozphab/default.nix diff --git a/pkgs/applications/misc/moz-phab/default.nix b/pkgs/applications/misc/moz-phab/default.nix deleted file mode 100644 index cef60f72e3b4..000000000000 --- a/pkgs/applications/misc/moz-phab/default.nix +++ /dev/null @@ -1,59 +0,0 @@ -{ lib -, buildPythonApplication -, fetchPypi -, mercurial -# build inputs -, distro -, glean-sdk -, pip -, python-hglib -, sentry-sdk -, setuptools -}: - -buildPythonApplication rec { - pname = "moz-phab"; - version = "0.1.99"; - - src = fetchPypi { - pname = "MozPhab"; - inherit version; - sha256 = "sha256-uKoMMSp5AIvB1qTRYAh7n1+2dDLneFbssfkfTTshfcs="; - }; - - # Relax python-hglib requirement - # https://phabricator.services.mozilla.com/D131618 - postPatch = '' - substituteInPlace setup.py \ - --replace "==" ">=" - ''; - - propagatedBuildInputs = [ - distro - glean-sdk - pip - python-hglib - sentry-sdk - setuptools - ]; - checkInputs = [ - mercurial - ]; - - preCheck = '' - export HOME=$(mktemp -d) - ''; - - meta = with lib; { - description = "Phabricator CLI from Mozilla to support submission of a series of commits"; - longDescription = '' - moz-phab is a custom command-line tool, which communicates to - Phabricator’s API, providing several conveniences, including support for - submitting series of commits. - ''; - homepage = "https://moz-conduit.readthedocs.io/en/latest/phabricator-user.html"; - license = licenses.mpl20; - maintainers = []; - platforms = platforms.unix; - }; -} diff --git a/pkgs/applications/misc/mozphab/default.nix b/pkgs/applications/misc/mozphab/default.nix new file mode 100644 index 000000000000..d78d880c2e1d --- /dev/null +++ b/pkgs/applications/misc/mozphab/default.nix @@ -0,0 +1,78 @@ +{ lib +, fetchFromGitHub +, python3 + +# tests +, git +, mercurial +, patch +}: + +python3.pkgs.buildPythonApplication rec { + pname = "mozphab"; + version = "1.1.0"; + format = "setuptools"; + + src = fetchFromGitHub { + owner = "mozilla-conduit"; + repo = "review"; + rev = "refs/tags/${version}"; + hash = "sha256-vLHikGjTYOeXd6jDRsoCkq3i0eh6Ttd4KdvlixjzdZ4="; + }; + + postPatch = '' + substituteInPlace setup.py \ + --replace "glean-sdk>=50.0.1,==50.*" "glean-sdk" + ''; + + propagatedBuildInputs = with python3.pkgs; [ + distro + glean-sdk + packaging + python-hglib + sentry-sdk + setuptools + ]; + + checkInputs = [ + git + mercurial + patch + ] + ++ (with python3.pkgs; [ + callee + immutabledict + hg-evolve + mock + pytestCheckHook + ]); + + preCheck = '' + export HOME=$(mktemp -d) + ''; + + disabledTestPaths = [ + # codestyle doesn't matter to us + "tests/test_style.py" + # integration tests try to submit changes, which requires network access + "tests/test_integration_git.py" + "tests/test_integration_hg.py" + "tests/test_integration_hg_dag.py" + "tests/test_integration_patch.py" + "tests/test_integration_reorganise.py" + "tests/test_sentry.py" + ]; + + meta = with lib; { + description = "Phabricator CLI from Mozilla to support submission of a series of commits"; + longDescription = '' + moz-phab is a custom command-line tool, which communicates to + Phabricator’s API, providing several conveniences, including support for + submitting series of commits. + ''; + homepage = "https://moz-conduit.readthedocs.io/en/latest/phabricator-user.html"; + license = licenses.mpl20; + maintainers = with maintainers; []; + platforms = platforms.unix; + }; +} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index c19acf8ce4e0..da4822408310 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -895,6 +895,7 @@ mapAliases ({ mopidy-spotify-tunigo = throw "mopidy-spotify-tunigo has been removed because Spotify stopped supporting libspotify"; # added 2022-05-29 morituri = throw "'morituri' has been renamed to/replaced by 'whipper'"; # Converted to throw 2022-02-22 + moz-phab = mozphab; # Added 2022-08-09 mozart-binary = mozart2-binary; # Added 2019-09-23 mozart = mozart2-binary; # Added 2019-09-23 mpc_cli = mpc-cli; # moved from top-level 2022-01-24 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1ecf47d04846..8527874dd206 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8128,7 +8128,7 @@ with pkgs; motion = callPackage ../applications/video/motion { }; - moz-phab = python3Packages.callPackage ../applications/misc/moz-phab { }; + mozphab = callPackage ../applications/misc/mozphab { }; mtail = callPackage ../servers/monitoring/mtail { };