blast: fix and enable strictDeps (#366620)
[NixPkgs.git] / pkgs / by-name / mo / mozphab / package.nix
blobd9869dc02a6fc37308b975145c2fc3e65daabe8a
2   lib,
3   fetchFromGitHub,
4   python3,
6   # tests
7   git,
8   mercurial,
9   patch,
12 python3.pkgs.buildPythonApplication rec {
13   pname = "mozphab";
14   version = "1.5.1";
15   format = "pyproject";
17   src = fetchFromGitHub {
18     owner = "mozilla-conduit";
19     repo = "review";
20     tag = version;
21     hash = "sha256-HxwQ+mGtjnruppPAD01QUg3aca+k5vpj814BWM+3VfQ=";
22   };
24   postPatch = ''
25     substituteInPlace pyproject.toml \
26       --replace "glean-sdk>=50.0.1,==50.*" "glean-sdk"
27   '';
29   nativeBuildInputs = with python3.pkgs; [
30     setuptools
31     setuptools-scm
32   ];
34   propagatedBuildInputs = with python3.pkgs; [
35     colorama
36     distro
37     glean-sdk
38     packaging
39     python-hglib
40     sentry-sdk
41     setuptools
42   ];
44   nativeCheckInputs =
45     [
46       git
47       mercurial
48       patch
49     ]
50     ++ (with python3.pkgs; [
51       callee
52       immutabledict
53       hg-evolve
54       mock
55       pytestCheckHook
56     ]);
58   preCheck = ''
59     export HOME=$(mktemp -d)
60   '';
62   disabledTests = [
63     # AttributeError: 'called_once' is not a valid assertion.
64     "test_commit"
65     # AttributeError: 'not_called' is not a valid assertion.
66     "test_finalize_no_evolve"
67     "test_patch"
68   ];
70   disabledTestPaths = [
71     # codestyle doesn't matter to us
72     "tests/test_style.py"
73     # integration tests try to submit changes, which requires network access
74     "tests/test_integration_git.py"
75     "tests/test_integration_hg.py"
76     "tests/test_integration_hg_dag.py"
77     "tests/test_integration_patch.py"
78     "tests/test_integration_reorganise.py"
79     "tests/test_sentry.py"
80   ];
82   meta = with lib; {
83     description = "Phabricator CLI from Mozilla to support submission of a series of commits";
84     mainProgram = "moz-phab";
85     longDescription = ''
86       moz-phab is a custom command-line tool, which communicates to
87       Phabricator’s API, providing several conveniences, including support for
88       submitting series of commits.
89     '';
90     homepage = "https://moz-conduit.readthedocs.io/en/latest/phabricator-user.html";
91     license = licenses.mpl20;
92     maintainers = [ ];
93     platforms = platforms.unix;
94   };