2022-01-23 01:38:20 +00:00
|
|
|
{ lib
|
|
|
|
, fetchurl
|
|
|
|
, python3Packages
|
|
|
|
, mercurial
|
|
|
|
, qt5
|
2021-07-03 18:12:34 +00:00
|
|
|
}:
|
2021-07-01 04:06:41 +00:00
|
|
|
|
|
|
|
python3Packages.buildPythonApplication rec {
|
2022-01-23 01:38:20 +00:00
|
|
|
pname = "tortoisehg";
|
2024-02-17 19:04:36 +00:00
|
|
|
version = "6.6.3";
|
2022-01-23 01:38:20 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://www.mercurial-scm.org/release/tortoisehg/targz/tortoisehg-${version}.tar.gz";
|
2024-02-17 19:04:36 +00:00
|
|
|
sha256 = "sha256-9pg1N5uj1ZaZCAm4N8toRwfVHme7nAsNMZkXSRgFves=";
|
2022-01-23 01:38:20 +00:00
|
|
|
};
|
|
|
|
|
2023-09-20 16:15:13 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
qt5.wrapQtAppsHook
|
|
|
|
];
|
2022-01-23 01:38:20 +00:00
|
|
|
propagatedBuildInputs = with python3Packages; [
|
2023-09-20 16:15:13 +00:00
|
|
|
mercurial
|
|
|
|
# The one from python3Packages
|
2022-01-23 01:38:20 +00:00
|
|
|
qscintilla-qt5
|
|
|
|
iniparse
|
|
|
|
];
|
2023-09-20 16:18:46 +00:00
|
|
|
buildInputs = [
|
|
|
|
# Makes wrapQtAppsHook add these qt libraries to the wrapper search paths
|
|
|
|
qt5.qtwayland
|
|
|
|
];
|
2022-01-23 01:38:20 +00:00
|
|
|
|
2023-09-20 16:15:13 +00:00
|
|
|
# In order to spare double wrapping, we use:
|
|
|
|
preFixup = ''
|
|
|
|
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
|
|
|
|
'';
|
|
|
|
# Convenient alias
|
2022-01-23 01:38:20 +00:00
|
|
|
postInstall = ''
|
|
|
|
ln -s $out/bin/thg $out/bin/tortoisehg
|
|
|
|
'';
|
|
|
|
|
2023-09-20 16:15:13 +00:00
|
|
|
# In python3Packages.buildPythonApplication doCheck is always true, and we
|
|
|
|
# override it to not run the default unittests
|
2022-01-23 01:38:20 +00:00
|
|
|
checkPhase = ''
|
2023-09-20 16:15:13 +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-01-23 01:38:20 +00:00
|
|
|
$out/bin/thg -h > help.txt &
|
|
|
|
sleep 1s
|
2023-09-20 16:15:13 +00:00
|
|
|
grep -q "list of commands" help.txt
|
|
|
|
|
|
|
|
runHook postCheck
|
2022-01-23 01:38:20 +00:00
|
|
|
'';
|
|
|
|
|
2023-09-20 16:15:13 +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-01-23 01:38:20 +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-15 11:18:21 +00:00
|
|
|
maintainers = with lib.maintainers; [ danbst gbtb ];
|
2022-01-23 01:38:20 +00:00
|
|
|
};
|
2015-11-17 21:09:38 +00:00
|
|
|
}
|