2022-02-10 20:34:41 +00:00
|
|
|
{ lib
|
|
|
|
, fetchurl
|
|
|
|
, python3Packages
|
|
|
|
, mercurial
|
|
|
|
, qt5
|
2021-07-04 02:40:35 +00:00
|
|
|
}:
|
2021-07-14 22:03:04 +00:00
|
|
|
|
|
|
|
python3Packages.buildPythonApplication rec {
|
2022-02-10 20:34:41 +00:00
|
|
|
pname = "tortoisehg";
|
2022-09-30 11:47:45 +00:00
|
|
|
version = "6.2.2";
|
2022-02-10 20:34:41 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://www.mercurial-scm.org/release/tortoisehg/targz/tortoisehg-${version}.tar.gz";
|
2022-09-30 11:47:45 +00:00
|
|
|
sha256 = "sha256-Xbvg/FcuX/AL2reWsaM2oaFyLby3+HDCfYtRyswE7DA=";
|
2022-02-10 20:34:41 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
qt5.wrapQtAppsHook
|
|
|
|
];
|
2022-02-10 20:34:41 +00:00
|
|
|
propagatedBuildInputs = with python3Packages; [
|
2023-10-09 19:29:22 +00:00
|
|
|
mercurial
|
|
|
|
# The one from python3Packages
|
2022-02-10 20:34:41 +00:00
|
|
|
qscintilla-qt5
|
|
|
|
iniparse
|
|
|
|
];
|
2023-10-09 19:29:22 +00:00
|
|
|
buildInputs = [
|
|
|
|
# Makes wrapQtAppsHook add these qt libraries to the wrapper search paths
|
|
|
|
qt5.qtwayland
|
|
|
|
];
|
2022-02-10 20:34:41 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
# In order to spare double wrapping, we use:
|
|
|
|
preFixup = ''
|
|
|
|
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
|
|
|
|
'';
|
|
|
|
# Convenient alias
|
2022-02-10 20:34:41 +00:00
|
|
|
postInstall = ''
|
|
|
|
ln -s $out/bin/thg $out/bin/tortoisehg
|
|
|
|
'';
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
# In python3Packages.buildPythonApplication doCheck is always true, and we
|
|
|
|
# override it to not run the default unittests
|
2022-02-10 20:34:41 +00:00
|
|
|
checkPhase = ''
|
2023-10-09 19:29:22 +00:00
|
|
|
runHook preCheck
|
|
|
|
|
|
|
|
$out/bin/thg version | grep -q "${version}"
|
|
|
|
# Detect breakage of thg in case of out-of-sync mercurial update. In that
|
|
|
|
# case any thg subcommand just opens up an gui dialog with a description of
|
|
|
|
# version mismatch.
|
|
|
|
echo "thg smoke test"
|
2022-02-10 20:34:41 +00:00
|
|
|
$out/bin/thg -h > help.txt &
|
|
|
|
sleep 1s
|
2023-10-09 19:29:22 +00:00
|
|
|
grep -q "list of commands" help.txt
|
|
|
|
|
|
|
|
runHook postCheck
|
2022-02-10 20:34:41 +00:00
|
|
|
'';
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
passthru = {
|
|
|
|
# If at some point we'll override this argument, it might be useful to have
|
|
|
|
# access to it here.
|
|
|
|
inherit mercurial;
|
|
|
|
};
|
2022-02-10 20:34:41 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Qt based graphical tool for working with Mercurial";
|
|
|
|
homepage = "https://tortoisehg.bitbucket.io/";
|
|
|
|
license = lib.licenses.gpl2Only;
|
|
|
|
platforms = lib.platforms.linux;
|
2022-09-30 11:47:45 +00:00
|
|
|
maintainers = with lib.maintainers; [ danbst gbtb ];
|
2022-02-10 20:34:41 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
}
|