@@ -33,6 +33,29 @@ stdenv.mkDerivation rec {
3333 done
3434 '';
3535
36+ doInstallCheck = true;
37+ # deliberately not adding git or hg into installCheckInputs - package should
38+ # be able to work without them in runtime env
39+ installCheckPhase = ''
40+ mkdir repo-hg
41+ pushd repo-hg
42+ ${mercurial}/bin/hg init
43+ echo foo > bar
44+ ${mercurial}/bin/hg add bar
45+ ${mercurial}/bin/hg commit --message "baz"
46+ popd
47+
48+ mkdir repo-git
49+ pushd repo-git
50+ ${git}/bin/git init
51+ ${git}/bin/git config core.ignoreCase false # for darwin
52+ $out/bin/hg-fast-export.sh -r ../repo-hg/ --hg-hash
53+ for s in "foo" "bar" "baz" ; do
54+ (${git}/bin/git show | grep $s > /dev/null) && echo $s found
55+ done
56+ popd
57+ '';
58+
3659 meta = with stdenv.lib; {
3760 description = "Import mercurial into git";
3861 homepage = "https://repo.or.cz/w/fast-export.git";