Merge pull request #156146 from gbtb/tortoisehg_smoke_test
tortoisehg: added smoke test for thg
This commit is contained in:
commit
0f3df54023
@ -1,45 +1,59 @@
|
|||||||
{ lib, fetchurl, python3Packages
|
{ lib
|
||||||
, mercurial, qt5
|
, fetchurl
|
||||||
|
, python3Packages
|
||||||
|
, mercurial
|
||||||
|
, qt5
|
||||||
}:
|
}:
|
||||||
|
|
||||||
python3Packages.buildPythonApplication rec {
|
python3Packages.buildPythonApplication rec {
|
||||||
pname = "tortoisehg";
|
pname = "tortoisehg";
|
||||||
version = "6.0";
|
version = "6.0";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://www.mercurial-scm.org/release/tortoisehg/targz/tortoisehg-${version}.tar.gz";
|
url = "https://www.mercurial-scm.org/release/tortoisehg/targz/tortoisehg-${version}.tar.gz";
|
||||||
sha256 = "sha256-25uQ2llF/+wqdGpun/nzlvAf286OIRmlZUISZ0szH6Y=";
|
sha256 = "sha256-25uQ2llF/+wqdGpun/nzlvAf286OIRmlZUISZ0szH6Y=";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Extension point for when thg's mercurial is lagging behind mainline.
|
# Extension point for when thg's mercurial is lagging behind mainline.
|
||||||
tortoiseMercurial = mercurial;
|
tortoiseMercurial = mercurial;
|
||||||
|
|
||||||
propagatedBuildInputs = with python3Packages; [
|
propagatedBuildInputs = with python3Packages; [
|
||||||
tortoiseMercurial qscintilla-qt5 iniparse
|
tortoiseMercurial
|
||||||
];
|
qscintilla-qt5
|
||||||
nativeBuildInputs = [ qt5.wrapQtAppsHook ];
|
iniparse
|
||||||
|
];
|
||||||
|
nativeBuildInputs = [ qt5.wrapQtAppsHook ];
|
||||||
|
|
||||||
doCheck = false; # tests fail with "thg: cannot connect to X server"
|
doCheck = true;
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
mkdir -p $out/share/doc/tortoisehg
|
mkdir -p $out/share/doc/tortoisehg
|
||||||
cp COPYING.txt $out/share/doc/tortoisehg/Copying.txt
|
cp COPYING.txt $out/share/doc/tortoisehg/Copying.txt
|
||||||
# convenient alias
|
# convenient alias
|
||||||
ln -s $out/bin/thg $out/bin/tortoisehg
|
ln -s $out/bin/thg $out/bin/tortoisehg
|
||||||
wrapQtApp $out/bin/thg
|
wrapQtApp $out/bin/thg
|
||||||
'';
|
'';
|
||||||
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
echo "test: thg version"
|
export QT_QPA_PLATFORM=offscreen
|
||||||
$out/bin/thg version
|
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;
|
passthru.mercurial = tortoiseMercurial;
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Qt based graphical tool for working with Mercurial";
|
description = "Qt based graphical tool for working with Mercurial";
|
||||||
homepage = "https://tortoisehg.bitbucket.io/";
|
homepage = "https://tortoisehg.bitbucket.io/";
|
||||||
license = lib.licenses.gpl2Only;
|
license = lib.licenses.gpl2Only;
|
||||||
platforms = lib.platforms.linux;
|
platforms = lib.platforms.linux;
|
||||||
maintainers = with lib.maintainers; [ danbst ];
|
maintainers = with lib.maintainers; [ danbst ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user