nixpkgs/pkgs/by-name/ma/marge-bot/package.nix
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00

66 lines
1.5 KiB
Nix

{
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-fail "--flake8 --pylint" ""
'';
nativeBuildInputs = [
python3.pkgs.setuptools
];
propagatedBuildInputs = with python3.pkgs; [
configargparse
maya
pyyaml
requests
];
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"
];
pythonImportsCheck = [ "marge" ];
meta = with lib; {
description = "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";
};
}