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
|
|
|
};
|
|
|
|
|
|
|
|
# Extension point for when thg's mercurial is lagging behind mainline.
|
|
|
|
tortoiseMercurial = mercurial;
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python3Packages; [
|
|
|
|
tortoiseMercurial
|
|
|
|
qscintilla-qt5
|
|
|
|
iniparse
|
|
|
|
];
|
|
|
|
nativeBuildInputs = [ qt5.wrapQtAppsHook ];
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/share/doc/tortoisehg
|
|
|
|
cp COPYING.txt $out/share/doc/tortoisehg/Copying.txt
|
|
|
|
# convenient alias
|
|
|
|
ln -s $out/bin/thg $out/bin/tortoisehg
|
|
|
|
wrapQtApp $out/bin/thg
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
export QT_QPA_PLATFORM=offscreen
|
|
|
|
echo "test: thg smoke test"
|
|
|
|
$out/bin/thg -h > help.txt &
|
|
|
|
sleep 1s
|
|
|
|
if grep "list of commands" help.txt; then
|
|
|
|
echo "thg help output was captured. Seems like package in a working state."
|
|
|
|
exit 0
|
|
|
|
else
|
|
|
|
echo "thg help output was not captured. Seems like package is broken."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru.mercurial = tortoiseMercurial;
|
|
|
|
|
|
|
|
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
|
|
|
}
|