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