2021-11-19 16:25:21 +01:00
|
|
|
|
{ lib
|
|
|
|
|
, buildPythonApplication
|
|
|
|
|
, fetchPypi
|
|
|
|
|
, mercurial
|
|
|
|
|
# build inputs
|
|
|
|
|
, distro
|
|
|
|
|
, glean-sdk
|
|
|
|
|
, python-hglib
|
|
|
|
|
, sentry-sdk
|
|
|
|
|
, setuptools
|
|
|
|
|
}:
|
2021-11-17 18:30:53 +01:00
|
|
|
|
|
2021-11-19 16:25:21 +01:00
|
|
|
|
buildPythonApplication rec {
|
2021-11-19 18:25:50 +01:00
|
|
|
|
pname = "moz-phab";
|
2021-11-17 18:30:53 +01:00
|
|
|
|
version = "0.1.99";
|
|
|
|
|
|
2021-11-19 16:25:21 +01:00
|
|
|
|
src = fetchPypi {
|
2021-11-19 18:25:50 +01:00
|
|
|
|
pname = "MozPhab";
|
|
|
|
|
inherit version;
|
2021-11-17 18:30:53 +01:00
|
|
|
|
sha256 = "sha256-uKoMMSp5AIvB1qTRYAh7n1+2dDLneFbssfkfTTshfcs=";
|
|
|
|
|
};
|
|
|
|
|
|
2021-11-25 17:18:07 +01:00
|
|
|
|
# Relax python-hglib requirement
|
|
|
|
|
# https://phabricator.services.mozilla.com/D131618
|
|
|
|
|
postPatch = ''
|
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
|
--replace "==" ">="
|
|
|
|
|
'';
|
2021-11-19 16:25:21 +01:00
|
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2021-11-17 18:30:53 +01:00
|
|
|
|
distro
|
|
|
|
|
glean-sdk
|
|
|
|
|
python-hglib
|
|
|
|
|
sentry-sdk
|
|
|
|
|
setuptools
|
|
|
|
|
];
|
2021-11-19 16:25:21 +01:00
|
|
|
|
checkInputs = [
|
|
|
|
|
mercurial
|
2021-11-17 18:30:53 +01:00
|
|
|
|
];
|
|
|
|
|
|
2021-11-19 16:25:21 +01:00
|
|
|
|
preCheck = ''
|
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
|
'';
|
2021-11-17 18:30:53 +01:00
|
|
|
|
|
|
|
|
|
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 = [ maintainers.kvark ];
|
2021-11-19 18:25:50 +01:00
|
|
|
|
platforms = platforms.unix;
|
2021-11-17 18:30:53 +01:00
|
|
|
|
};
|
|
|
|
|
}
|