summary refs log tree commit diff
path: root/pkgs/development/tools/misc/xxdiff/3.2.nix
blob: 8100972d6eab39ed2fb3971fcb76a577fab4f201 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
args : with args; 
rec {
  src = fetchurl {
    url = http://downloads.sourceforge.net/xxdiff/xxdiff-3.2.tar.bz2;
    sha256 = "1f5j9l9n5j2ab0h3iwaz0mnz0y8h7ilc0dbcrfmaibk2njx38mcn";
  };

  buildInputs = [qt flex bison python pkgconfig makeWrapper 
    libX11 libXext];
  configureFlags = [];

  /* doConfigure should be specified separately */
  phaseNames = ["prepareMainBuild" "fixInc"
    "deploy"
    "installPythonPackage" 
    (makeManyWrappers 
      ''$out/bin/*'' 
      ''--prefix PYTHONPATH : $(toPythonPath $out):$PYTHONPATH'')
  ];

  prepareMainBuild = fullDepEntry (''
    cd src 
    export QTDIR=${qt}/
    make -f Makefile.bootstrap makefile
  '') ["minInit" "doUnpack"];

  fixInc = fullDepEntry(''
    sed -e '1i\#include <stdlib.h>' -i resources.inline.h
  '') ["minInit" "doUnpack"];

  deploy = fullDepEntry (''
    ensureDir $out/bin/
    cp ../bin/xxdiff $out/bin
    cd ..
  '') ["minInit" "doMake" "defEnsureDir" "addInputs"];
      
  name = "xxdiff-" + version;
  meta = {
    description = "Interactive merge tool";
  };
}