nixpkgs/pkgs/applications/misc/mozphab/default.nix
Martin Weinelt 8056f9250c
treewide: remove redundant SETUPTOOLS_SCM_PRETEND_VERSION usage
The setuptools-scm packages gained a setup hook, that sets it to the
derivation version automatically, so setting it to that manually has
become redundant.

This also affects downstream consumers of setuptools-scm, like hatch-vcs
or flit-scm.
2023-12-20 20:16:39 +01:00

85 lines
1.8 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.4.3";
format = "pyproject";
src = fetchFromGitHub {
owner = "mozilla-conduit";
repo = "review";
rev = "refs/tags/${version}";
hash = "sha256-FUHT4MPzSxO3MCNYWodNxvFR2kL0P4eGmSHPtCt0Cug=";
};
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)
'';
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";
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 = with maintainers; [];
platforms = platforms.unix;
};
}