aboutsummaryrefslogtreecommitdiff
path: root/pkgs/tools/text
diff options
context:
space:
mode:
authorShamrock Lee <44064051+ShamrockLee@users.noreply.github.com>2020-11-27 12:50:45 +0000
committerShamrock Lee <44064051+ShamrockLee@users.noreply.github.com>2020-11-27 14:07:25 +0000
commit58fd07cc7b7e38c24427ea2fed8f8d86b3ccc7f1 (patch)
tree8759dcc1d5fbe4c45eeccbc8463182b1cb00ad0a /pkgs/tools/text
parent4d15dd3a08d95d4bdacfb0aa7967b46bb000765a (diff)
uwc: Init at 1.0.4
uwc is a Unicode-aware word counter with per-line mode written in Rust If applied, users will be able to count the number of unicode characters and words (e.g. Chinese characters) from files or through the pipe.
Diffstat (limited to 'pkgs/tools/text')
-rw-r--r--pkgs/tools/text/uwc/default.nix24
1 files changed, 24 insertions, 0 deletions
diff --git a/pkgs/tools/text/uwc/default.nix b/pkgs/tools/text/uwc/default.nix
new file mode 100644
index 000000000000..cf8e5658f764
--- /dev/null
+++ b/pkgs/tools/text/uwc/default.nix
@@ -0,0 +1,24 @@
+{ rustPlatform, lib, fetchFromGitLab }:
+
+rustPlatform.buildRustPackage rec {
+ pname = "uwc";
+ version = "1.0.4";
+
+ src = fetchFromGitLab {
+ owner = "dead10ck";
+ repo = pname;
+ rev = "v${version}";
+ sha256 = "1ywqq9hrrm3frvd2sswknxygjlxi195kcy7g7phwq63j7hkyrn50";
+ };
+
+ cargoSha256 = "0ra62cf75b1c4knxxpbdg8m0sy2k02r52j606fp5l9crp0fml8l0";
+
+ doCheck = true;
+
+ meta = with lib; {
+ description = "Like wc, but unicode-aware, and with per-line mode";
+ homepage = "https://gitlab.com/dead10ck/uwc";
+ license = licenses.mit;
+ maintainers = with maintainers; [ ShamrockLee ];
+ };
+}