git.iko.soy/typeable/nixpkgs
on master help sign in
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

commita2ea2a1945df9f164d1bdfffc1efbefd2f139b6b authorDanylo Hlynskyi <abcz2.uprola@gmail.com> dateSun 18 Aug 2019, 18:28 (7 years ago) parent2ca09a9
2 files changed+41−19
pkgs/applications/version-management/mercurial/default.nix+14−11 pkgs/applications/version-management/tortoisehg/default.nix+27−8
pkgs/applications/version-management/mercurial/default.nix+14−11
@@ -1,20 +1,23 @@
11{ stdenv, fetchurl, python2Packages, makeWrapper, unzip
22, guiSupport ? false, tk ? null
3−, ApplicationServices }:
3+, ApplicationServices
4+, mercurialSrc ? fetchurl rec {
5+ meta.name = "mercurial-${meta.version}";
6+ meta.version = "4.9.1";
7+ url = "https://mercurial-scm.org/release/${meta.name}.tar.gz";
8+ sha256 = "0iybbkd9add066729zg01kwz5hhc1s6lhp9rrnsmzq6ihyxj3p8v";
9+ }
10+}:
411
512let
6− # if you bump version, update pkgs.tortoisehg too or ping maintainer
7− version = "4.9.1";
8− name = "mercurial-${version}";
913 inherit (python2Packages) docutils hg-git dulwich python;
14+
1015in python2Packages.buildPythonApplication {
11− inherit name;
12− format = "other";
1316
14− src = fetchurl {
15− url = "https://mercurial-scm.org/release/${name}.tar.gz";
16− sha256 = "0iybbkd9add066729zg01kwz5hhc1s6lhp9rrnsmzq6ihyxj3p8v";
17− };
17+ inherit (mercurialSrc.meta) name version;
18+ src = mercurialSrc;
19+
20+ format = "other";
1821
1922 inherit python; # pass it so that the same version can be used in hg2git
2023
@@ -55,7 +58,7 @@ in python2Packages.buildPythonApplication {
5558 '';
5659
5760 meta = {
58− inherit version;
61+ inherit (mercurialSrc.meta) version;
5962 description = "A fast, lightweight SCM system for very large distributed projects";
6063 homepage = https://www.mercurial-scm.org;
6164 downloadPage = https://www.mercurial-scm.org/release/;
pkgs/applications/version-management/tortoisehg/default.nix+27−8
@@ -1,13 +1,30 @@
1−{lib, fetchurl, mercurial, python2Packages}:
1+{ lib, fetchurl, python2Packages
2+, mercurial
3+}@args:
4+let
5+ tortoisehgSrc = fetchurl rec {
6+ meta.name = "tortoisehg-${meta.version}";
7+ meta.version = "5.0.2";
8+ url = "https://bitbucket.org/tortoisehg/targz/downloads/${meta.name}.tar.gz";
9+ sha256 = "1fkawx4ymaacah2wpv2w7rxmv1mx08mg4x4r4fxh41jz1njjb8sz";
10+ };
211
3−python2Packages.buildPythonApplication rec {
4− name = "tortoisehg-${version}";
5− version = "5.0.2";
12+ mercurial =
13+ if args.mercurial.meta.version == tortoisehgSrc.meta.version
14+ then args.mercurial
15+ else args.mercurial.override {
16+ mercurialSrc = fetchurl rec {
17+ meta.name = "mercurial-${meta.version}";
18+ meta.version = tortoisehgSrc.meta.version;
19+ url = "https://mercurial-scm.org/release/${meta.name}.tar.gz";
20+ sha256 = "1y60hfc8gh4ha9sw650qs7hndqmvbn0qxpmqwpn4q18z5xwm1f19";
21+ };
22+ };
623
7− src = fetchurl {
8− url = "https://bitbucket.org/tortoisehg/targz/downloads/${name}.tar.gz";
9− sha256 = "1fkawx4ymaacah2wpv2w7rxmv1mx08mg4x4r4fxh41jz1njjb8sz";
10− };
24+in python2Packages.buildPythonApplication rec {
25+
26+ inherit (tortoisehgSrc.meta) name version;
27+ src = tortoisehgSrc;
1128
1229 pythonPath = with python2Packages; [ pyqt4 mercurial qscintilla iniparse ];
1330
@@ -28,6 +45,8 @@ python2Packages.buildPythonApplication rec {
2845 $out/bin/thg version
2946 '';
3047
48+ passthru.mercurial = mercurial;
49+
3150 meta = {
3251 description = "Qt based graphical tool for working with Mercurial";
3352 homepage = https://tortoisehg.bitbucket.io/;