1{
2 stdenv,
3 lib,
4 fetchurl,
5 extra-cmake-modules,
6 boost,
7 kdePackages,
8}:
9
10stdenv.mkDerivation (finalAttrs: {
11 pname = "kdiff3";
12 version = "1.12.3";
13
14 src = fetchurl {
15 url = "mirror://kde/stable/kdiff3/kdiff3-${finalAttrs.version}.tar.xz";
16 hash = "sha256-4iZUxFeIF5mAgwVSnGtZbAydw4taLswULsdtRvaHP0w=";
17 };
18
19 nativeBuildInputs = [
20 extra-cmake-modules
21 kdePackages.kdoctools
22 kdePackages.wrapQtAppsHook
23 ];
24
25 buildInputs = with kdePackages; [
26 qtbase
27 boost
28 kconfig
29 kcrash
30 kparts
31 kiconthemes
32 ];
33
34 cmakeFlags = [ "-Wno-dev" ];
35
36 env.LANG = "C.UTF-8";
37
38 postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
39 ln -s "$out/Applications/KDE/kdiff3.app/Contents/MacOS" "$out/bin"
40 '';
41
42 meta = with lib; {
43 description = "Compares and merges 2 or 3 files or directories";
44 mainProgram = "kdiff3";
45 homepage = "https://invent.kde.org/sdk/kdiff3";
46 license = licenses.gpl2Plus;
47 maintainers = with maintainers; [ peterhoeg ];
48 inherit (kdePackages.qtbase.meta) platforms;
49 };
50})