2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2021-06-28 23:13:55 +00:00
|
|
|
, mercurial
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "hg-evolve";
|
2023-04-12 12:48:02 +00:00
|
|
|
version = "11.0.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-04-12 12:48:02 +00:00
|
|
|
hash = "sha256-gupC35pLQOJgSmXiBp+KxqWuMX3iKSX9xDUtEaB/wFQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-06-28 23:13:55 +00:00
|
|
|
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
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Enables the “changeset evolution” feature of Mercurial core";
|
|
|
|
homepage = "https://www.mercurial-scm.org/doc/evolution/";
|
2021-05-08 21:25:31 +00:00
|
|
|
maintainers = with maintainers; [ xavierzwirtz lukegb ];
|
2021-02-05 17:12:51 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|