depot/third_party/nixpkgs/pkgs/development/python-modules/hg-evolve/default.nix
Default email 9c6ee729d6 Project import generated by Copybara.
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
2023-07-15 19:15:38 +02:00

59 lines
1.1 KiB
Nix

{ lib
, buildPythonPackage
, fetchPypi
, mercurial
}:
buildPythonPackage rec {
pname = "hg-evolve";
version = "11.0.2";
src = fetchPypi {
inherit pname version;
hash = "sha256-qDURFcDm7zvDEv1Z+aoXtFfbilul6q6KlkjBvhkeYkM=";
};
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 = with lib; {
description = "Enables the changeset evolution feature of Mercurial core";
homepage = "https://www.mercurial-scm.org/doc/evolution/";
maintainers = with maintainers; [ xavierzwirtz lukegb ];
license = licenses.gpl2Plus;
};
}