1{
2 diffutils,
3 fetchzip,
4 lib,
5 makeBinaryWrapper,
6 stdenv,
7 tk,
8}:
9
10stdenv.mkDerivation (finalAttrs: {
11 pname = "tkdiff";
12 version = "5.7";
13
14 src = fetchzip {
15 url = "mirror://sourceforge/tkdiff/tkdiff-${
16 builtins.replaceStrings [ "." ] [ "-" ] finalAttrs.version
17 }.zip";
18 hash = "sha256-ZndpolvaXoCAzR4KF+Bu7DJrXyB/C2H2lWp5FyzOc4M=";
19 };
20
21 nativeBuildInputs = [ makeBinaryWrapper ];
22
23 installPhase = ''
24 runHook preInstall
25
26 install -Dm755 -t $out/bin tkdiff
27 wrapProgram $out/bin/tkdiff \
28 --prefix PATH : ${
29 lib.makeBinPath [
30 diffutils
31 tk
32 ]
33 }
34
35 runHook postInstall
36 '';
37
38 meta = {
39 description = "Graphical front end to the diff program";
40 homepage = "https://tkdiff.sourceforge.io/";
41 license = lib.licenses.gpl2Plus;
42 longDescription = ''
43 TkDiff is a graphical front end to the diff program. It provides a
44 side-by-side view of the differences between two text files, along
45 with several innovative features such as diff bookmarks, a graphical
46 map of differences for quick navigation, and a facility for slicing
47 diff regions to achieve exactly the merge output desired.
48 '';
49 mainProgram = "tkdiff";
50 maintainers = with lib.maintainers; [ mikaelfangel ];
51 platforms = tk.meta.platforms;
52 };
53})