tortoisehg: fix build

tortoisehg intentionally wants to back-date the Mercurial build,
and some of the features we've added to the Mercurial build won't work
correctly under hg 5.6.
This commit is contained in:
Luke Granger-Brown 2021-05-04 10:24:00 +00:00
parent a715d90fb0
commit 35e57e81ae
2 changed files with 7 additions and 2 deletions

View File

@ -1,4 +1,5 @@
{ lib, stdenv, fetchurl, fetchpatch, python3Packages, makeWrapper, gettext { lib, stdenv, fetchurl, fetchpatch, python3Packages, makeWrapper, gettext
, re2Support ? true
, rustSupport ? stdenv.hostPlatform.isLinux, rustPlatform , rustSupport ? stdenv.hostPlatform.isLinux, rustPlatform
, guiSupport ? false, tk ? null , guiSupport ? false, tk ? null
, ApplicationServices , ApplicationServices
@ -41,7 +42,7 @@ in python3Packages.buildPythonApplication rec {
} else null; } else null;
cargoRoot = if rustSupport then "rust" else null; cargoRoot = if rustSupport then "rust" else null;
propagatedBuildInputs = [ fb-re2 ]; propagatedBuildInputs = lib.optional re2Support fb-re2;
nativeBuildInputs = [ makeWrapper gettext ] nativeBuildInputs = [ makeWrapper gettext ]
++ lib.optionals rustSupport (with rustPlatform; [ ++ lib.optionals rustSupport (with rustPlatform; [
cargoSetupHook cargoSetupHook

View File

@ -9,12 +9,16 @@ let
sha256 = "031bafj88wggpvw0lgvl0djhlbhs9nls9vzwvni8yn0m0bgzc9gr"; sha256 = "031bafj88wggpvw0lgvl0djhlbhs9nls9vzwvni8yn0m0bgzc9gr";
}; };
tortoiseMercurial = mercurial.overridePythonAttrs (old: rec { tortoiseMercurial = (mercurial.override {
rustSupport = false;
re2Support = lib.versionAtLeast tortoisehgSrc.meta.version "5.8";
}).overridePythonAttrs (old: rec {
inherit (tortoisehgSrc.meta) version; inherit (tortoisehgSrc.meta) version;
src = fetchurl { src = fetchurl {
url = "https://mercurial-scm.org/release/mercurial-${version}.tar.gz"; url = "https://mercurial-scm.org/release/mercurial-${version}.tar.gz";
sha256 = "1hk2y30zzdnlv8f71kabvh0xi9c7qhp28ksh20vpd0r712sv79yz"; sha256 = "1hk2y30zzdnlv8f71kabvh0xi9c7qhp28ksh20vpd0r712sv79yz";
}; };
patches = [];
}); });
in python3Packages.buildPythonApplication { in python3Packages.buildPythonApplication {