From be7ce1b0e9809da1f41571a63584fb8b9e346295 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Thu, 20 Apr 2017 14:48:40 +0200 Subject: [PATCH] kdiff3: fix with git mergetool The quick patch has been submitted upstream. --- pkgs/tools/text/kdiff3/default.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/text/kdiff3/default.nix b/pkgs/tools/text/kdiff3/default.nix index 4303fe82a45b..bd76b89ccf74 100644 --- a/pkgs/tools/text/kdiff3/default.nix +++ b/pkgs/tools/text/kdiff3/default.nix @@ -1,5 +1,5 @@ { - kdeDerivation, kdeWrapper, lib, fetchgit, + kdeDerivation, kdeWrapper, lib, fetchgit, fetchpatch, extra-cmake-modules, kdoctools, kconfig, kinit, kparts }: @@ -18,6 +18,15 @@ let setSourceRoot = ''sourceRoot="$(echo */kdiff3/)"''; + patches = [ + (fetchpatch { + name = "git-mergetool.diff"; # see https://gitlab.com/tfischer/kdiff3/merge_requests/2 + url = "https://gitlab.com/vcunat/kdiff3/commit/6106126216.patch"; + sha256 = "16xqc24y8bg8gzkdbwapiwi68rzqnkpz4hgn586mi01ngig2fd7y"; + }) + ]; + patchFlags = "-p 2"; + postPatch = '' sed -re "s/(p\\[[^]]+] *== *)('([^']|\\\\')+')/\\1QChar(\\2)/g" -i src/diff.cpp ''; @@ -26,6 +35,8 @@ let propagatedBuildInputs = [ kconfig kinit kparts ]; + enableParallelBuilding = true; + meta = with lib; { homepage = http://kdiff3.sourceforge.net/; license = licenses.gpl2Plus;