lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

cloc: add basic install check

+25 -2
+25 -2
pkgs/tools/misc/cloc/default.nix
··· 1 1 { lib, stdenv, fetchFromGitHub, makeWrapper, perlPackages }: 2 2 3 - stdenv.mkDerivation rec { 3 + let version = "1.98"; 4 + in stdenv.mkDerivation { 4 5 pname = "cloc"; 5 - version = "1.98"; 6 + inherit version; 6 7 7 8 src = fetchFromGitHub { 8 9 owner = "AlDanial"; ··· 26 27 makeFlags = [ "prefix=" "DESTDIR=$(out)" "INSTALL=install" ]; 27 28 28 29 postFixup = "wrapProgram $out/bin/cloc --prefix PERL5LIB : $PERL5LIB"; 30 + 31 + doInstallCheck = true; 32 + installCheckPhase = '' 33 + runHook preInstallCheck 34 + 35 + echo -n 'checking --version...' 36 + $out/bin/cloc --version | grep '${version}' > /dev/null 37 + echo ' ok' 38 + 39 + cat > test.nix <<EOF 40 + {a, b}: { 41 + test = a 42 + + b; 43 + } 44 + EOF 45 + 46 + echo -n 'checking lines in test.nix...' 47 + $out/bin/cloc --quiet --csv test.nix | grep '1,Nix,0,0,4' > /dev/null 48 + echo ' ok' 49 + 50 + runHook postInstallCheck 51 + ''; 29 52 30 53 meta = { 31 54 description = "A program that counts lines of source code";