lol
1{ stdenv, fetchFromGitHub, makeWrapper, perl
2, AlgorithmDiff, ParallelForkManager, RegexpCommon
3}:
4
5stdenv.mkDerivation rec {
6 name = "cloc-${version}";
7 version = "1.76";
8
9 src = fetchFromGitHub {
10 owner = "AlDanial";
11 repo = "cloc";
12 rev = "v${version}";
13 sha256 = "03z4ar959ximsddd92zchi013lh82ganzisk309y3b09q10hl9k7";
14 };
15
16 setSourceRoot = ''
17 sourceRoot=$(echo */Unix)
18 '';
19
20 buildInputs = [
21 makeWrapper perl AlgorithmDiff ParallelForkManager RegexpCommon
22 ];
23
24 makeFlags = [ "prefix=" "DESTDIR=$(out)" "INSTALL=install" ];
25
26 postFixup = "wrapProgram $out/bin/cloc --prefix PERL5LIB : $PERL5LIB";
27
28 meta = {
29 description = "A program that counts lines of source code";
30 homepage = https://github.com/AlDanial/cloc;
31 license = stdenv.lib.licenses.gpl2;
32 platforms = stdenv.lib.platforms.all;
33 maintainers = with stdenv.lib.maintainers; [ fuuzetsu rycee ];
34 };
35}