From 9400bcd0814fa6b7fac9c0859a3c5c8c9df2781d Mon Sep 17 00:00:00 2001 From: lelgenio Date: Sun, 1 Jun 2025 03:45:32 -0300 Subject: [PATCH 1/3] marge-bot: 0.10.1 -> 0.15.3 --- pkgs/by-name/ma/marge-bot/package.nix | 58 ++++++++++++--------------- 1 file changed, 26 insertions(+), 32 deletions(-) diff --git a/pkgs/by-name/ma/marge-bot/package.nix b/pkgs/by-name/ma/marge-bot/package.nix index e958ea990bd6..a05005622895 100644 --- a/pkgs/by-name/ma/marge-bot/package.nix +++ b/pkgs/by-name/ma/marge-bot/package.nix @@ -2,55 +2,49 @@ lib, python3, fetchFromGitLab, + git, + openssh, }: python3.pkgs.buildPythonApplication rec { pname = "marge-bot"; - version = "0.10.1"; + version = "0.15.3"; pyproject = true; src = fetchFromGitLab { owner = "marge-org"; repo = "marge-bot"; rev = version; - hash = "sha256-2L7c/NEKyjscwpyf/5GtWXr7Ig14IQlRR5IbDYxp8jA="; + hash = "sha256-i/hnfoBxgP1mo4RV4F10+QOOkPP/fkcwqaLKBlOuP0I="; }; - postPatch = '' - substituteInPlace setup.cfg --replace-fail "--flake8 --pylint" "" - ''; - nativeBuildInputs = [ python3.pkgs.setuptools ]; - propagatedBuildInputs = with python3.pkgs; [ - configargparse - maya - pyyaml - requests - ]; + propagatedBuildInputs = + (with python3.pkgs; [ + configargparse + maya + pyyaml + requests + python-gitlab + hatchling + ]) + ++ [ + git + openssh + ]; - nativeCheckInputs = with python3.pkgs; [ - pytest-cov-stub - pytestCheckHook - pendulum - ]; - - disabledTests = [ - # test broken when run under Nix: - # "unittest.mock.InvalidSpecError: Cannot spec a Mock object." - "test_get_mr_ci_status" - # broken because of an incorrect assertion: - # "AttributeError: 'has_calls' is not a valid assertion." - "test_reapprove" - ]; - - disabledTestPaths = [ - # test errors due to API mismatch in test setup: - # "ImportError: cannot import name 'set_test_now' from 'pendulum.helpers'" - "tests/test_interval.py" - ]; + nativeCheckInputs = + (with python3.pkgs; [ + pytest-cov-stub + pytestCheckHook + pendulum + ]) + ++ [ + git + ]; pythonImportsCheck = [ "marge" ]; From 4db34059a341493677ed3e73154d7b6a70c04380 Mon Sep 17 00:00:00 2001 From: lelgenio Date: Sun, 1 Jun 2025 03:49:34 -0300 Subject: [PATCH 2/3] marge-bot: add updateScript --- pkgs/by-name/ma/marge-bot/package.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/by-name/ma/marge-bot/package.nix b/pkgs/by-name/ma/marge-bot/package.nix index a05005622895..bb2b13f01457 100644 --- a/pkgs/by-name/ma/marge-bot/package.nix +++ b/pkgs/by-name/ma/marge-bot/package.nix @@ -4,6 +4,7 @@ fetchFromGitLab, git, openssh, + nix-update-script, }: python3.pkgs.buildPythonApplication rec { @@ -48,6 +49,8 @@ python3.pkgs.buildPythonApplication rec { pythonImportsCheck = [ "marge" ]; + passthru.updateScript = nix-update-script { }; + meta = with lib; { description = "Merge bot for GitLab"; homepage = "https://gitlab.com/marge-org/marge-bot"; From 3133e081629ee6c3604479fa5d2b6e43969a8d45 Mon Sep 17 00:00:00 2001 From: lelgenio Date: Sun, 1 Jun 2025 03:49:57 -0300 Subject: [PATCH 3/3] marge-bot: add lelgenio as maintainer --- pkgs/by-name/ma/marge-bot/package.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/ma/marge-bot/package.nix b/pkgs/by-name/ma/marge-bot/package.nix index bb2b13f01457..c914bd8a2ffa 100644 --- a/pkgs/by-name/ma/marge-bot/package.nix +++ b/pkgs/by-name/ma/marge-bot/package.nix @@ -56,7 +56,10 @@ python3.pkgs.buildPythonApplication rec { 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 ]; + maintainers = with maintainers; [ + bcdarwin + lelgenio + ]; mainProgram = "marge.app"; }; }