1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 mercurial, 6}: 7 8buildPythonPackage rec { 9 pname = "hg-evolve"; 10 version = "11.1.3"; 11 format = "setuptools"; 12 13 src = fetchPypi { 14 inherit pname version; 15 hash = "sha256-WUPOok/tpZJSookzCIEHRKAlTzeZ6RJY0IiclgQUOs8="; 16 }; 17 18 nativeCheckInputs = [ mercurial ]; 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; [ 57 xavierzwirtz 58 lukegb 59 ]; 60 license = licenses.gpl2Plus; 61 }; 62}