···1414 sha256 = "sha256-Xbvg/FcuX/AL2reWsaM2oaFyLby3+HDCfYtRyswE7DA=";
1515 };
16161717- # Extension point for when thg's mercurial is lagging behind mainline.
1818- tortoiseMercurial = mercurial;
1919-1717+ nativeBuildInputs = [
1818+ qt5.wrapQtAppsHook
1919+ ];
2020 propagatedBuildInputs = with python3Packages; [
2121- tortoiseMercurial
2121+ mercurial
2222+ # The one from python3Packages
2223 qscintilla-qt5
2324 iniparse
2425 ];
2525- nativeBuildInputs = [ qt5.wrapQtAppsHook ];
26262727- doCheck = true;
2727+ # In order to spare double wrapping, we use:
2828+ preFixup = ''
2929+ makeWrapperArgs+=("''${qtWrapperArgs[@]}")
3030+ '';
3131+ # Convenient alias
2832 postInstall = ''
2929- mkdir -p $out/share/doc/tortoisehg
3030- cp COPYING.txt $out/share/doc/tortoisehg/Copying.txt
3131- # convenient alias
3233 ln -s $out/bin/thg $out/bin/tortoisehg
3333- wrapQtApp $out/bin/thg
3434 '';
35353636+ # In python3Packages.buildPythonApplication doCheck is always true, and we
3737+ # override it to not run the default unittests
3638 checkPhase = ''
3737- export QT_QPA_PLATFORM=offscreen
3838- echo "test: thg smoke test"
3939+ runHook preCheck
4040+4141+ $out/bin/thg version | grep -q "${version}"
4242+ # Detect breakage of thg in case of out-of-sync mercurial update. In that
4343+ # case any thg subcommand just opens up an gui dialog with a description of
4444+ # version mismatch.
4545+ echo "thg smoke test"
3946 $out/bin/thg -h > help.txt &
4047 sleep 1s
4141- if grep "list of commands" help.txt; then
4242- echo "thg help output was captured. Seems like package in a working state."
4343- exit 0
4444- else
4545- echo "thg help output was not captured. Seems like package is broken."
4646- exit 1
4747- fi
4848+ grep -q "list of commands" help.txt
4949+5050+ runHook postCheck
4851 '';
49525050- passthru.mercurial = tortoiseMercurial;
5353+ passthru = {
5454+ # If at some point we'll override this argument, it might be useful to have
5555+ # access to it here.
5656+ inherit mercurial;
5757+ };
51585259 meta = {
5360 description = "Qt based graphical tool for working with Mercurial";