about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/hg-evolve/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/hg-evolve/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/hg-evolve/default.nix43
1 files changed, 39 insertions, 4 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/hg-evolve/default.nix b/nixpkgs/pkgs/development/python-modules/hg-evolve/default.nix
index 46db97a9aedd..a0229d1e5012 100644
--- a/nixpkgs/pkgs/development/python-modules/hg-evolve/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/hg-evolve/default.nix
@@ -1,19 +1,54 @@
 { lib
 , buildPythonPackage
 , fetchPypi
-, isPy3k
+, mercurial
 }:
 
 buildPythonPackage rec {
   pname = "hg-evolve";
-  version = "10.3.1";
+  version = "10.3.2";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "03xwnadpvgna70n6pfxb7xdrszppdqrx5qmkbr1v0jzbh5rnzi6b";
+    sha256 = "ba819732409d39ddd4ff2fc507dc921408bf30535d2d78313637b29eeac98860";
   };
 
-  doCheck = false;
+  checkInputs = [
+    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";