summary refs log tree commit diff
path: root/pkgs/tools/text/colordiff/default.nix
blob: c3da9a605558358370178b1bae1c18aac362a900 (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
{ stdenv, fetchurl, perl /*, xmlto */}:

stdenv.mkDerivation rec {
  name = "colordiff-1.0.19";

  src = fetchurl {
    urls = [
      "https://www.colordiff.org/${name}.tar.gz"
      "http://www.colordiff.org/archive/${name}.tar.gz"
    ];
    sha256 = "069vzzgs7b44bmfh3ks2psrdb26s1w19gp9w4xxbgi7nhx6w3s26";
  };

  buildInputs = [ perl /* xmlto */ ];

  dontBuild = 1; # do not build doc yet.

  installPhase = ''make INSTALL_DIR=/bin MAN_DIR=/share/man/man1 DESTDIR="$out" install'';

  meta = with stdenv.lib; {
    description = "Wrapper for 'diff' that produces the same output but with pretty 'syntax' highlighting";
    homepage = "https://www.colordiff.org/";
    license = licenses.gpl3;
    platforms = platforms.linux ++ platforms.darwin;
  };
}