about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/tools/misc/lwc/default.nix31
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 33 insertions, 0 deletions
diff --git a/pkgs/tools/misc/lwc/default.nix b/pkgs/tools/misc/lwc/default.nix
new file mode 100644
index 000000000000..f4c2e57eef48
--- /dev/null
+++ b/pkgs/tools/misc/lwc/default.nix
@@ -0,0 +1,31 @@
+{ lib
+, buildGoModule
+, fetchFromGitHub
+}:
+
+buildGoModule rec {
+  pname = "lwc";
+  version = "unstable-2022-07-26";
+
+  src = fetchFromGitHub {
+    owner = "timdp";
+    repo = "lwc";
+    rev = "3330928c9d82200837350f85335f5e6c09f0658b";
+    hash = "sha256-HFuXA5Y274XtgqG9odDAg9SSCgUxprnojfGavnYW4LE=";
+  };
+
+  vendorHash = "sha256-av736cW0bPsGQV+XFL/q6p/9VhjOeDwkiK5DLRnRtUg=";
+
+  ldflags = [
+    "-s"
+    "-w"
+    "-X=main.version=${src.rev}"
+  ];
+
+  meta = with lib; {
+    description = "A live-updating version of the UNIX wc command";
+    homepage = "https://github.com/timdp/lwc";
+    license = licenses.mit;
+    maintainers = with maintainers; [ figsoda ];
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index aa474e37640b..b0d857a2ced1 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -9874,6 +9874,8 @@ with pkgs;
     inherit (darwin.apple_sdk.frameworks) CoreText;
   };
 
+  lwc = callPackage ../tools/misc/lwc { };
+
   lxc = callPackage ../os-specific/linux/lxc {
     autoreconfHook = buildPackages.autoreconfHook269;
   };