Merge pull request #329823 from ExpidusOS/fix/pkgsllvm/elfutils
[NixPkgs.git] / pkgs / by-name / ma / marge-bot / package.nix
blobf5946f4b7ed134cab89c3fbeb4c89a49c83f8bba
1 { lib
2 , python3
3 , fetchFromGitLab
4 }:
6 python3.pkgs.buildPythonApplication rec {
7   pname = "marge-bot";
8   version = "0.10.1";
9   pyproject = true;
11   src = fetchFromGitLab {
12     owner = "marge-org";
13     repo = "marge-bot";
14     rev = version;
15     hash = "sha256-2L7c/NEKyjscwpyf/5GtWXr7Ig14IQlRR5IbDYxp8jA=";
16   };
18   postPatch = ''
19     substituteInPlace setup.cfg --replace-fail "--flake8 --pylint --cov=marge" ""
20   '';
22   nativeBuildInputs = [
23     python3.pkgs.setuptools
24   ];
26   propagatedBuildInputs = with python3.pkgs; [
27     configargparse
28     maya
29     pyyaml
30     requests
31   ];
33   nativeCheckInputs = with python3.pkgs; [ pytestCheckHook pendulum ];
34   disabledTests = [
35     # test broken when run under Nix:
36     #   "unittest.mock.InvalidSpecError: Cannot spec a Mock object."
37     "test_get_mr_ci_status"
38   ];
39   disabledTestPaths = [
40     # test errors due to API mismatch in test setup:
41     #   "ImportError: cannot import name 'set_test_now' from 'pendulum.helpers'"
42     "tests/test_interval.py"
43   ];
45   pythonImportsCheck = [ "marge" ];
47   meta = with lib; {
48     description = "Merge bot for GitLab";
49     homepage = "https://gitlab.com/marge-org/marge-bot";
50     changelog = "https://gitlab.com/marge-org/marge-bot/-/blob/${src.rev}/CHANGELOG.md";
51     license = licenses.bsd3;
52     maintainers = with maintainers; [ bcdarwin ];
53     mainProgram = "marge.app";
54   };