mercurialFull: add support for experimental in-tree git extension

The git extension is bundled in-tree, similarly to the hg gui, but also
requires pygit2. Enable it for mercurialFull, but don't bother with it
for the stock mercurial install.

Alas, it doesn't (yet?) work on nixpkgs because it doesn't support
octopus merges:

mercurial.error.ProgrammingError: git support can't handle octopus
merges, found a commit with 16 parents :(

I'm sure that commit is loved equally by all 16 parents.
This commit is contained in:
Luke Granger-Brown 2021-06-06 15:19:15 +00:00
parent e63e5bd373
commit c83a5bce66
2 changed files with 5 additions and 4 deletions

View file

@ -1,12 +1,13 @@
{ lib, stdenv, fetchurl, fetchpatch, python3Packages, makeWrapper, gettext { lib, stdenv, fetchurl, fetchpatch, python3Packages, makeWrapper, gettext
, re2Support ? true , re2Support ? true
, rustSupport ? stdenv.hostPlatform.isLinux, rustPlatform , rustSupport ? stdenv.hostPlatform.isLinux, rustPlatform
, guiSupport ? false, tk ? null , gitSupport ? false
, guiSupport ? false, tk
, ApplicationServices , ApplicationServices
}: }:
let let
inherit (python3Packages) docutils python fb-re2; inherit (python3Packages) docutils python fb-re2 pygit2;
in python3Packages.buildPythonApplication rec { in python3Packages.buildPythonApplication rec {
pname = "mercurial"; pname = "mercurial";
@ -42,7 +43,7 @@ in python3Packages.buildPythonApplication rec {
} else null; } else null;
cargoRoot = if rustSupport then "rust" else null; cargoRoot = if rustSupport then "rust" else null;
propagatedBuildInputs = lib.optional re2Support fb-re2; propagatedBuildInputs = lib.optional re2Support fb-re2 ++ lib.optional gitSupport pygit2;
nativeBuildInputs = [ makeWrapper gettext ] nativeBuildInputs = [ makeWrapper gettext ]
++ lib.optionals rustSupport (with rustPlatform; [ ++ lib.optionals rustSupport (with rustPlatform; [
cargoSetupHook cargoSetupHook

View file

@ -25423,7 +25423,7 @@ in
inherit (darwin.apple_sdk.frameworks) ApplicationServices; inherit (darwin.apple_sdk.frameworks) ApplicationServices;
}; };
mercurialFull = appendToName "full" (pkgs.mercurial.override { guiSupport = true; }); mercurialFull = appendToName "full" (pkgs.mercurial.override { guiSupport = true; gitSupport = true; });
merkaartor = libsForQt5.callPackage ../applications/misc/merkaartor { }; merkaartor = libsForQt5.callPackage ../applications/misc/merkaartor { };