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.nix59
1 files changed, 59 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/hg-evolve/default.nix b/nixpkgs/pkgs/development/python-modules/hg-evolve/default.nix
new file mode 100644
index 000000000000..00791ac642f0
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/hg-evolve/default.nix
@@ -0,0 +1,59 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, mercurial
+}:
+
+buildPythonPackage rec {
+  pname = "hg-evolve";
+  version = "10.3.3";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "ca3b0ae45a2c3a811c0dc39153b8a1ea8a5c8f786c56370a41dfd83a5bff2502";
+  };
+
+  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";
+    homepage = "https://www.mercurial-scm.org/doc/evolution/";
+    maintainers = with maintainers; [ xavierzwirtz lukegb ];
+    license = licenses.gpl2Plus;
+  };
+}