1{ lib 2, buildPythonPackage 3, fetchPypi 4, mercurial 5}: 6 7buildPythonPackage rec { 8 pname = "hg-evolve"; 9 version = "11.1.0"; 10 11 src = fetchPypi { 12 inherit pname version; 13 hash = "sha256-sMvHvHwLuMT0LaH2XFDePuePbwCXjvl66QGdERR0k6g="; 14 }; 15 16 nativeCheckInputs = [ 17 mercurial 18 ]; 19 20 checkPhase = '' 21 runHook preCheck 22 23 export TESTTMP=$(mktemp -d) 24 export HOME=$TESTTMP 25 cat <<EOF >$HOME/.hgrc 26 [extensions] 27 evolve = 28 topic = 29 EOF 30 31 # Shipped tests use the mercurial testing framework, and produce inconsistent results. 32 # Do a quick smoke-test to see if things do what we expect. 33 hg init $TESTTMP/repo 34 pushd $TESTTMP/repo 35 touch a 36 hg add a 37 hg commit -m "init a" 38 hg topic something 39 40 touch b 41 hg add b 42 hg commit -m "init b" 43 44 echo hi > b 45 hg amend 46 47 hg obslog 48 popd 49 50 runHook postCheck 51 ''; 52 53 meta = with lib; { 54 description = "Enables the changeset evolution feature of Mercurial core"; 55 homepage = "https://www.mercurial-scm.org/doc/evolution/"; 56 maintainers = with maintainers; [ xavierzwirtz lukegb ]; 57 license = licenses.gpl2Plus; 58 }; 59}