2019-08-18 16:28:03 +01:00
|
|
|
{ lib, fetchurl, python2Packages
|
|
|
|
, mercurial
|
|
|
|
}@args:
|
|
|
|
let
|
|
|
|
tortoisehgSrc = fetchurl rec {
|
|
|
|
meta.name = "tortoisehg-${meta.version}";
|
|
|
|
meta.version = "5.0.2";
|
|
|
|
url = "https://bitbucket.org/tortoisehg/targz/downloads/${meta.name}.tar.gz";
|
|
|
|
sha256 = "1fkawx4ymaacah2wpv2w7rxmv1mx08mg4x4r4fxh41jz1njjb8sz";
|
|
|
|
};
|
2015-07-31 20:29:29 +01:00
|
|
|
|
2019-08-18 16:28:03 +01:00
|
|
|
mercurial =
|
|
|
|
if args.mercurial.meta.version == tortoisehgSrc.meta.version
|
|
|
|
then args.mercurial
|
|
|
|
else args.mercurial.override {
|
|
|
|
mercurialSrc = fetchurl rec {
|
|
|
|
meta.name = "mercurial-${meta.version}";
|
|
|
|
meta.version = tortoisehgSrc.meta.version;
|
|
|
|
url = "https://mercurial-scm.org/release/${meta.name}.tar.gz";
|
|
|
|
sha256 = "1y60hfc8gh4ha9sw650qs7hndqmvbn0qxpmqwpn4q18z5xwm1f19";
|
|
|
|
};
|
|
|
|
};
|
2015-07-31 20:29:29 +01:00
|
|
|
|
2019-08-13 22:52:01 +01:00
|
|
|
in python2Packages.buildPythonApplication {
|
2019-08-18 16:28:03 +01:00
|
|
|
|
|
|
|
inherit (tortoisehgSrc.meta) name version;
|
|
|
|
src = tortoisehgSrc;
|
2015-07-31 20:29:29 +01:00
|
|
|
|
2016-11-09 14:39:43 +00:00
|
|
|
pythonPath = with python2Packages; [ pyqt4 mercurial qscintilla iniparse ];
|
2015-07-31 20:29:29 +01:00
|
|
|
|
2016-11-09 14:39:43 +00:00
|
|
|
propagatedBuildInputs = with python2Packages; [ qscintilla iniparse ];
|
2015-11-17 21:09:38 +00:00
|
|
|
|
2018-02-22 16:41:51 +00:00
|
|
|
doCheck = false; # tests fail with "thg: cannot connect to X server"
|
2016-04-22 17:00:43 +01:00
|
|
|
dontStrip = true;
|
|
|
|
buildPhase = "";
|
|
|
|
installPhase = ''
|
2016-11-09 14:39:43 +00:00
|
|
|
${python2Packages.python.executable} setup.py install --prefix=$out
|
2017-11-11 16:58:59 +00:00
|
|
|
mkdir -p $out/share/doc/tortoisehg
|
|
|
|
cp COPYING.txt $out/share/doc/tortoisehg/Copying.txt.gz
|
2016-04-22 17:00:43 +01:00
|
|
|
ln -s $out/bin/thg $out/bin/tortoisehg #convenient alias
|
2015-07-31 20:29:29 +01:00
|
|
|
'';
|
|
|
|
|
2017-12-02 11:31:29 +00:00
|
|
|
checkPhase = ''
|
|
|
|
echo "test: thg version"
|
|
|
|
$out/bin/thg version
|
|
|
|
'';
|
|
|
|
|
2019-08-18 16:28:03 +01:00
|
|
|
passthru.mercurial = mercurial;
|
|
|
|
|
2015-07-31 20:29:29 +01:00
|
|
|
meta = {
|
|
|
|
description = "Qt based graphical tool for working with Mercurial";
|
2019-05-03 10:14:31 +01:00
|
|
|
homepage = https://tortoisehg.bitbucket.io/;
|
2015-07-31 20:29:29 +01:00
|
|
|
license = lib.licenses.gpl2;
|
|
|
|
platforms = lib.platforms.linux;
|
2017-01-20 14:43:34 +00:00
|
|
|
maintainers = with lib.maintainers; [ danbst ];
|
2015-07-31 20:29:29 +01:00
|
|
|
};
|
2015-11-17 21:09:38 +00:00
|
|
|
}
|