summary refs log tree commit diff
path: root/pkgs/tools/misc/cloc/default.nix
blob: dfe5476f81307e41a4a5832eb6338b293071a6fe (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
{ stdenv, fetchurl, perl, AlgorithmDiff, RegexpCommon }:

stdenv.mkDerivation rec {
  
  name = "cloc-${version}";

  version = "1.58";

  src = fetchurl {
    url = "mirror://sourceforge/cloc/cloc-${version}.tar.gz";
    sha256 = "1k92jldy4m717lh1xd6yachx3l2hhpx76qhj1ipnx12hsxw1zc8w";
  };

  buildInputs = [ perl AlgorithmDiff RegexpCommon ];

  unpackPhase = ''
    mkdir ${name}
    tar xf $src -C ${name}
    cd ${name}
  '';

  makeFlags = [ "prefix=" "DESTDIR=$(out)" "INSTALL=install" ];

  meta = {
    description = "A program that counts lines of source code";
    homepage = http://cloc.sourceforge.net;
    license = stdenv.lib.licenses.gpl2;
  };

}