From 0f34860540c37940359e0a5a426891f7e3476417 Mon Sep 17 00:00:00 2001 From: Lily Ballard Date: Mon, 9 Sep 2019 22:56:46 -0700 Subject: [PATCH] tokei: 9.1.1 -> 10.0.1 Enable all crate features, which gets us alternative output formats. Update description and add long description to match what's in the GitHub repo. Add myself as a maintainer. --- .../tools/misc/tokei/Cargo.lock.patch | 13 +++++++++++++ pkgs/development/tools/misc/tokei/default.nix | 19 ++++++++++++++----- 2 files changed, 27 insertions(+), 5 deletions(-) create mode 100644 pkgs/development/tools/misc/tokei/Cargo.lock.patch diff --git a/pkgs/development/tools/misc/tokei/Cargo.lock.patch b/pkgs/development/tools/misc/tokei/Cargo.lock.patch new file mode 100644 index 000000000000..46bd80a218da --- /dev/null +++ b/pkgs/development/tools/misc/tokei/Cargo.lock.patch @@ -0,0 +1,13 @@ +diff --git a/Cargo.lock b/Cargo.lock +index db09bc4..1e4892d 100644 +--- a/Cargo.lock ++++ b/Cargo.lock +@@ -961,7 +961,7 @@ dependencies = [ + + [[package]] + name = "tokei" +-version = "10.0.0" ++version = "10.0.1" + dependencies = [ + "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", + "dirs 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/pkgs/development/tools/misc/tokei/default.nix b/pkgs/development/tools/misc/tokei/default.nix index f77e30b45ae9..104aa4691ab1 100644 --- a/pkgs/development/tools/misc/tokei/default.nix +++ b/pkgs/development/tools/misc/tokei/default.nix @@ -2,26 +2,35 @@ rustPlatform.buildRustPackage rec { pname = "tokei"; - version = "9.1.1"; + version = "10.0.1"; src = fetchFromGitHub { owner = "XAMPPRocky"; repo = pname; rev = "v${version}"; - sha256 = "0gz8m5j9p7hwylyl7cdxbli9rpy1p6lsrbym4zk647819pg4k1jp"; + sha256 = "0g8p4f8g9zb1fqzzb1qi28idskahi5nldsma6rydjyrgi9gynpa0"; }; - cargoSha256 = "19h0ybi9qq5shvr7zix0gb24a29lqkvyfc5xbgps8wqgfrhx4nqa"; + cargoSha256 = "0pwq1scll5ga8rw4lx97s915zvp7v171b6316cin54f2zzpbrxx5"; + + # Patch for v10.0.1 Cargo.lock issue + patches = [ ./Cargo.lock.patch ]; buildInputs = stdenv.lib.optionals stdenv.isDarwin [ libiconv darwin.apple_sdk.frameworks.Security ]; + # enable all output formats + cargoBuildFlags = [ "--features" "all" ]; + meta = with stdenv.lib; { - description = "Program that displays statistics about your code"; + 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 ]; + maintainers = with maintainers; [ gebner lilyball ]; platforms = platforms.all; }; }