Files
nixpkgs/pkgs/development/python-modules/hg-evolve/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

67 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
fetchPypi,
mercurial,
setuptools,
}:
buildPythonPackage rec {
pname = "hg-evolve";
version = "11.1.10";
pyproject = true;
src = fetchPypi {
pname = "hg_evolve";
inherit version;
hash = "sha256-ccFq7sASkOkFJ4Or5dhZpfKR0FdZAmbziDfK3FGcaYM=";
};
build-system = [ setuptools ];
nativeCheckInputs = [ mercurial ];
checkPhase = ''
runHook preCheck
export TESTTMP=$(mktemp -d)
export HOME=$TESTTMP
cat <<EOF >$HOME/.hgrc
[extensions]
evolve =
topic =
EOF
# Shipped tests use the mercurial testing framework, and produce inconsistent results.
# Do a quick smoke-test to see if things do what we expect.
hg init $TESTTMP/repo
pushd $TESTTMP/repo
touch a
hg add a
hg commit -m "init a"
hg topic something
touch b
hg add b
hg commit -m "init b"
echo hi > b
hg amend
hg obslog
popd
runHook postCheck
'';
meta = {
description = "Enables the changeset evolution feature of Mercurial core";
homepage = "https://www.mercurial-scm.org/doc/evolution/";
maintainers = with lib.maintainers; [
xavierzwirtz
lukegb
];
license = lib.licenses.gpl2Plus;
};
}