about summary refs log tree commit diff
path: root/pkgs/by-name/ma
diff options
context:
space:
mode:
authorMario Rodas <marsam@users.noreply.github.com>2024-03-05 05:51:36 -0500
committerGitHub <noreply@github.com>2024-03-05 05:51:36 -0500
commit7251d0228a36aafb26d21bc33a7ab3958f1c3bd1 (patch)
tree7ecdbb70dc5ac673c67232b564bcef319c264e7d /pkgs/by-name/ma
parentd491cf135fd3b40d247238981122f080954e1e97 (diff)
parentfdda5272cd94647caeae4acb9bcc9259ecb2d641 (diff)
Merge pull request #292846 from bcdarwin/init-margebot
marge-bot: init at 0.10.1
Diffstat (limited to 'pkgs/by-name/ma')
-rw-r--r--pkgs/by-name/ma/marge-bot/package.nix50
1 files changed, 50 insertions, 0 deletions
diff --git a/pkgs/by-name/ma/marge-bot/package.nix b/pkgs/by-name/ma/marge-bot/package.nix
new file mode 100644
index 0000000000000..b564622271d31
--- /dev/null
+++ b/pkgs/by-name/ma/marge-bot/package.nix
@@ -0,0 +1,50 @@
+{ lib
+, python3
+, fetchFromGitLab
+}:
+
+python3.pkgs.buildPythonApplication rec {
+  pname = "marge-bot";
+  version = "0.10.1";
+  pyproject = true;
+
+  src = fetchFromGitLab {
+    owner = "marge-org";
+    repo = "marge-bot";
+    rev = version;
+    hash = "sha256-2L7c/NEKyjscwpyf/5GtWXr7Ig14IQlRR5IbDYxp8jA=";
+  };
+
+  postPatch = ''
+    substituteInPlace setup.cfg --replace "--flake8 --pylint --cov=marge" ""
+  '';
+
+  nativeBuildInputs = [
+    python3.pkgs.setuptools
+  ];
+
+  propagatedBuildInputs = with python3.pkgs; [
+    configargparse
+    maya
+    pyyaml
+    requests
+  ];
+
+  nativeCheckInputs = with python3.pkgs; [ pytestCheckHook ];
+  disabledTests = [
+    # test broken when run under Nix:
+    #   "unittest.mock.InvalidSpecError: Cannot spec a Mock object."
+    "test_get_mr_ci_status"
+  ];
+
+  pythonImportsCheck = [ "marge" ];
+
+  meta = with lib; {
+    description = "A merge bot for GitLab";
+    homepage = "https://gitlab.com/marge-org/marge-bot";
+    changelog = "https://gitlab.com/marge-org/marge-bot/-/blob/${src.rev}/CHANGELOG.md";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ bcdarwin ];
+    mainProgram = "marge.app";
+  };
+}