2022-08-12 12:06:08 +00:00
|
|
|
|
{ lib
|
|
|
|
|
, fetchFromGitHub
|
|
|
|
|
, python3
|
|
|
|
|
|
|
|
|
|
# tests
|
|
|
|
|
, git
|
|
|
|
|
, mercurial
|
|
|
|
|
, patch
|
|
|
|
|
}:
|
|
|
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
|
|
|
pname = "mozphab";
|
2024-02-07 01:22:34 +00:00
|
|
|
|
version = "1.5.1";
|
2023-04-12 12:48:02 +00:00
|
|
|
|
format = "pyproject";
|
2022-08-12 12:06:08 +00:00
|
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
|
owner = "mozilla-conduit";
|
|
|
|
|
repo = "review";
|
|
|
|
|
rev = "refs/tags/${version}";
|
2024-02-07 01:22:34 +00:00
|
|
|
|
hash = "sha256-HxwQ+mGtjnruppPAD01QUg3aca+k5vpj814BWM+3VfQ=";
|
2022-08-12 12:06:08 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
postPatch = ''
|
2023-04-12 12:48:02 +00:00
|
|
|
|
substituteInPlace pyproject.toml \
|
2022-08-12 12:06:08 +00:00
|
|
|
|
--replace "glean-sdk>=50.0.1,==50.*" "glean-sdk"
|
|
|
|
|
'';
|
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
|
nativeBuildInputs = with python3.pkgs; [
|
|
|
|
|
setuptools
|
|
|
|
|
setuptools-scm
|
|
|
|
|
];
|
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
2023-04-12 12:48:02 +00:00
|
|
|
|
colorama
|
2022-08-12 12:06:08 +00:00
|
|
|
|
distro
|
|
|
|
|
glean-sdk
|
|
|
|
|
packaging
|
|
|
|
|
python-hglib
|
|
|
|
|
sentry-sdk
|
|
|
|
|
setuptools
|
|
|
|
|
];
|
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
|
nativeCheckInputs = [
|
2022-08-12 12:06:08 +00:00
|
|
|
|
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";
|
2024-04-21 15:54:59 +00:00
|
|
|
|
mainProgram = "moz-phab";
|
2022-08-12 12:06:08 +00:00
|
|
|
|
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;
|
|
|
|
|
};
|
|
|
|
|
}
|