pretender: 1.2.0 -> 1.3.0 (#378434)
[NixPkgs.git] / pkgs / development / python-modules / hg-evolve / default.nix
blobddd303bcbea1fee5856304d7c7c6fceea1bd0314
2   lib,
3   buildPythonPackage,
4   fetchPypi,
5   mercurial,
6 }:
8 buildPythonPackage rec {
9   pname = "hg-evolve";
10   version = "11.1.6";
11   format = "setuptools";
13   src = fetchPypi {
14     inherit pname version;
15     hash = "sha256-Jun1gZYZXv8nuJBnberK1bcTPTLCDgGGd543OeOEVOs=";
16   };
18   nativeCheckInputs = [ mercurial ];
20   checkPhase = ''
21     runHook preCheck
23     export TESTTMP=$(mktemp -d)
24     export HOME=$TESTTMP
25     cat <<EOF >$HOME/.hgrc
26     [extensions]
27     evolve =
28     topic =
29     EOF
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
40     touch b
41     hg add b
42     hg commit -m "init b"
44     echo hi > b
45     hg amend
47     hg obslog
48     popd
50     runHook postCheck
51   '';
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   };