nixpkgs/pkgs/by-name/mo/mozphab/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

96 lines
2.1 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
lib,
fetchFromGitHub,
python3,
# tests
git,
mercurial,
patch,
}:
python3.pkgs.buildPythonApplication rec {
pname = "mozphab";
version = "1.5.1";
format = "pyproject";
src = fetchFromGitHub {
owner = "mozilla-conduit";
repo = "review";
rev = "refs/tags/${version}";
hash = "sha256-HxwQ+mGtjnruppPAD01QUg3aca+k5vpj814BWM+3VfQ=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace "glean-sdk>=50.0.1,==50.*" "glean-sdk"
'';
nativeBuildInputs = with python3.pkgs; [
setuptools
setuptools-scm
];
propagatedBuildInputs = with python3.pkgs; [
colorama
distro
glean-sdk
packaging
python-hglib
sentry-sdk
setuptools
];
nativeCheckInputs =
[
git
mercurial
patch
]
++ (with python3.pkgs; [
callee
immutabledict
hg-evolve
mock
pytestCheckHook
]);
preCheck = ''
export HOME=$(mktemp -d)
'';
disabledTests = [
# AttributeError: 'called_once' is not a valid assertion.
"test_commit"
# AttributeError: 'not_called' is not a valid assertion.
"test_finalize_no_evolve"
"test_patch"
];
disabledTestPaths = [
# codestyle doesn't matter to us
"tests/test_style.py"
# integration tests try to submit changes, which requires network access
"tests/test_integration_git.py"
"tests/test_integration_hg.py"
"tests/test_integration_hg_dag.py"
"tests/test_integration_patch.py"
"tests/test_integration_reorganise.py"
"tests/test_sentry.py"
];
meta = with lib; {
description = "Phabricator CLI from Mozilla to support submission of a series of commits";
mainProgram = "moz-phab";
longDescription = ''
moz-phab is a custom command-line tool, which communicates to
Phabricators API, providing several conveniences, including support for
submitting series of commits.
'';
homepage = "https://moz-conduit.readthedocs.io/en/latest/phabricator-user.html";
license = licenses.mpl20;
maintainers = [ ];
platforms = platforms.unix;
};
}