summary refs log tree commit diff
path: root/pkgs/applications/misc/moz-phab/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/misc/moz-phab/default.nix')
-rw-r--r--pkgs/applications/misc/moz-phab/default.nix57
1 files changed, 57 insertions, 0 deletions
diff --git a/pkgs/applications/misc/moz-phab/default.nix b/pkgs/applications/misc/moz-phab/default.nix
new file mode 100644
index 00000000000..886e06a382b
--- /dev/null
+++ b/pkgs/applications/misc/moz-phab/default.nix
@@ -0,0 +1,57 @@
+{ lib
+, buildPythonApplication
+, fetchPypi
+, mercurial
+# build inputs
+, distro
+, glean-sdk
+, 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
+    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 = [ maintainers.kvark ];
+    platforms = platforms.unix;
+  };
+}