diff options
author | Martin Weinelt <mweinelt@users.noreply.github.com> | 2022-08-10 18:25:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-10 18:25:06 +0200 |
commit | ee3be6b246f4e8cad9f161b6c46eec4ddeaa6b43 (patch) | |
tree | 959f154ac7f17b8c84c71685698bde80e001a153 /pkgs/applications/misc | |
parent | 4686c07f3adbf51e63785972c57e3b9db2261534 (diff) | |
parent | 47d03c0a3f82c8cadf4c1af01f7e8ea31ce123ef (diff) |
Merge pull request #185920 from mweinelt/glean-sdk
Diffstat (limited to 'pkgs/applications/misc')
-rw-r--r-- | pkgs/applications/misc/moz-phab/default.nix | 59 | ||||
-rw-r--r-- | pkgs/applications/misc/mozphab/default.nix | 78 |
2 files changed, 78 insertions, 59 deletions
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; + }; +} |