1{
2 lib,
3 mkDerivation,
4 fetchFromBitbucket,
5 docutils,
6 bison,
7 flex,
8 qmake,
9 qtbase,
10}:
11
12mkDerivation rec {
13 pname = "xxdiff";
14 version = "5.0b1";
15
16 src = fetchFromBitbucket {
17 owner = "blais";
18 repo = pname;
19 rev = "5e5f885dfc43559549a81c59e9e8c9525306356a";
20 sha256 = "0gbvxrkwkbvag3298j89smszghpr8ilxxfb0cvsknfqdf15b296w";
21 };
22
23 nativeBuildInputs = [
24 bison
25 docutils
26 flex
27 qmake
28 ];
29
30 buildInputs = [ qtbase ];
31
32 dontUseQmakeConfigure = true;
33
34 # c++11 and above is needed for building with Qt 5.9+
35 env.NIX_CFLAGS_COMPILE = toString [ "-std=c++14" ];
36
37 sourceRoot = "${src.name}/src";
38
39 postPatch = ''
40 substituteInPlace xxdiff.pro --replace ../bin ./bin
41 '';
42
43 preConfigure = ''
44 make -f Makefile.bootstrap
45 '';
46
47 installPhase = ''
48 runHook preInstall
49
50 install -Dm555 -t $out/bin ./bin/xxdiff
51 install -Dm444 -t $out/share/doc/${pname} ${src}/README
52
53 runHook postInstall
54 '';
55
56 meta = with lib; {
57 description = "Graphical file and directories comparator and merge tool";
58 mainProgram = "xxdiff";
59 homepage = "http://furius.ca/xxdiff/";
60 license = licenses.gpl2;
61 maintainers = with maintainers; [
62 pSub
63 raskin
64 ];
65 platforms = platforms.linux;
66 };
67}