nixpkgs/pkgs/development/tools/misc/tokei/default.nix
2019-11-12 12:08:48 -08:00

33 lines
1.1 KiB
Nix

{ stdenv, fetchFromGitHub, rustPlatform, libiconv, darwin }:
rustPlatform.buildRustPackage rec {
pname = "tokei";
version = "10.1.0";
src = fetchFromGitHub {
owner = "XAMPPRocky";
repo = pname;
rev = "v${version}";
sha256 = "0l7vqmdagfhi4hnp50ng253zy4g48qjhs5kmnk2xh5v3c59ys4zs";
};
cargoSha256 = "140nm0nswmgdp549gqp71dbn99rc5g7cagl9s5m5qirl9mbpys8x";
buildInputs = stdenv.lib.optionals stdenv.isDarwin [
libiconv darwin.apple_sdk.frameworks.Security
];
# enable all output formats
cargoBuildFlags = [ "--features" "all" ];
meta = with stdenv.lib; {
description = "A program that allows you to count your code, quickly";
longDescription = ''
Tokei is a program that displays statistics about your code. Tokei will show number of files, total lines within those files and code, comments, and blanks grouped by language.
'';
homepage = https://github.com/XAMPPRocky/tokei;
license = with licenses; [ asl20 /* or */ mit ];
maintainers = with maintainers; [ gebner lilyball ];
platforms = platforms.all;
};
}