1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-04 19:45:54 +00:00
nixpkgs/pkgs/development/tools/misc/tokei/default.nix
Benjamin Hipple eb11feaa0b treewide: change fetchCargoTarball default to opt-out
Changes the default fetcher in the Rust Platform to be the newer
`fetchCargoTarball`, and changes every application using the current default to
instead opt out.

This commit does not change any hashes or cause any rebuilds. Once integrated,
we will start deleting the opt-outs and recomputing hashes.

See #79975 for details.
2020-02-13 22:41:37 -08:00

37 lines
1.1 KiB
Nix

{ stdenv, fetchFromGitHub, rustPlatform, libiconv, darwin }:
rustPlatform.buildRustPackage rec {
pname = "tokei";
version = "10.1.1";
src = fetchFromGitHub {
owner = "XAMPPRocky";
repo = pname;
rev = "v${version}";
sha256 = "0wndjb4rvj8548wz0svwgnk94qlg5w2fv75fn2jgriq6fh6v43yg";
};
# Delete this on next update; see #79975 for details
legacyCargoFetcher = true;
cargoSha256 = "1lpa4xfh3bcm51amwxvkzpvmi4b2c4q5qwxxigcbzw76l7rqp2w9";
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;
};
}