mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 07:13:23 +01:00
tortoisehg: untie from mercurial and update to 5.0.2 (#66173)
* tortoisehg: untie from mercurial When I've added `tortoisehg` package, it turned out that mercurial updates sometimes broke thg. I've added a comment to `mercurial/default.nix` to update torotisehg version during mercurial updates, but this worked the other way round: mercurial stopped to be updated regularly (https://github.com/NixOS/nixpkgs/pull/60993). And sadly it didn't solve the issue - https://github.com/NixOS/nixpkgs/issues/61759. Here I'm trying to untie them. Tortoisehg will build a custom mercurial package if versions don't match. This makes updating tortoisehg more complicated, but it is still better than current situation. * expose custom mercurial from thg package
This commit is contained in:
parent
2ca09a94be
commit
a2ea2a1945
2 changed files with 42 additions and 20 deletions
|
@ -1,20 +1,23 @@
|
|||
{ stdenv, fetchurl, python2Packages, makeWrapper, unzip
|
||||
, guiSupport ? false, tk ? null
|
||||
, ApplicationServices }:
|
||||
, ApplicationServices
|
||||
, mercurialSrc ? fetchurl rec {
|
||||
meta.name = "mercurial-${meta.version}";
|
||||
meta.version = "4.9.1";
|
||||
url = "https://mercurial-scm.org/release/${meta.name}.tar.gz";
|
||||
sha256 = "0iybbkd9add066729zg01kwz5hhc1s6lhp9rrnsmzq6ihyxj3p8v";
|
||||
}
|
||||
}:
|
||||
|
||||
let
|
||||
# if you bump version, update pkgs.tortoisehg too or ping maintainer
|
||||
version = "4.9.1";
|
||||
name = "mercurial-${version}";
|
||||
inherit (python2Packages) docutils hg-git dulwich python;
|
||||
in python2Packages.buildPythonApplication {
|
||||
inherit name;
|
||||
format = "other";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://mercurial-scm.org/release/${name}.tar.gz";
|
||||
sha256 = "0iybbkd9add066729zg01kwz5hhc1s6lhp9rrnsmzq6ihyxj3p8v";
|
||||
};
|
||||
in python2Packages.buildPythonApplication {
|
||||
|
||||
inherit (mercurialSrc.meta) name version;
|
||||
src = mercurialSrc;
|
||||
|
||||
format = "other";
|
||||
|
||||
inherit python; # pass it so that the same version can be used in hg2git
|
||||
|
||||
|
@ -55,7 +58,7 @@ in python2Packages.buildPythonApplication {
|
|||
'';
|
||||
|
||||
meta = {
|
||||
inherit version;
|
||||
inherit (mercurialSrc.meta) version;
|
||||
description = "A fast, lightweight SCM system for very large distributed projects";
|
||||
homepage = https://www.mercurial-scm.org;
|
||||
downloadPage = https://www.mercurial-scm.org/release/;
|
||||
|
|
|
@ -1,13 +1,30 @@
|
|||
{lib, fetchurl, mercurial, python2Packages}:
|
||||
{ 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";
|
||||
};
|
||||
|
||||
python2Packages.buildPythonApplication rec {
|
||||
name = "tortoisehg-${version}";
|
||||
version = "5.0.2";
|
||||
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";
|
||||
};
|
||||
};
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://bitbucket.org/tortoisehg/targz/downloads/${name}.tar.gz";
|
||||
sha256 = "1fkawx4ymaacah2wpv2w7rxmv1mx08mg4x4r4fxh41jz1njjb8sz";
|
||||
};
|
||||
in python2Packages.buildPythonApplication rec {
|
||||
|
||||
inherit (tortoisehgSrc.meta) name version;
|
||||
src = tortoisehgSrc;
|
||||
|
||||
pythonPath = with python2Packages; [ pyqt4 mercurial qscintilla iniparse ];
|
||||
|
||||
|
@ -28,6 +45,8 @@ python2Packages.buildPythonApplication rec {
|
|||
$out/bin/thg version
|
||||
'';
|
||||
|
||||
passthru.mercurial = mercurial;
|
||||
|
||||
meta = {
|
||||
description = "Qt based graphical tool for working with Mercurial";
|
||||
homepage = https://tortoisehg.bitbucket.io/;
|
||||
|
|
Loading…
Reference in a new issue