about summary refs log tree commit diff
path: root/pkgs/applications/misc/gum
diff options
context:
space:
mode:
authorMaas Lalani <maas@lalani.dev>2022-07-29 20:09:07 -0400
committerGitHub <noreply@github.com>2022-07-29 20:09:07 -0400
commita792c4e86efb4f94e7673b962edf30b7868cd911 (patch)
treed984e6b249bdc6a88b30873ddb43af056b85e9ec /pkgs/applications/misc/gum
parentd2f9abdcc04bd5e0ef5e2dbb6bad2c3fbe657c3c (diff)
gum: init at 0.1.0 (#183396)
Diffstat (limited to 'pkgs/applications/misc/gum')
-rw-r--r--pkgs/applications/misc/gum/default.nix38
1 files changed, 38 insertions, 0 deletions
diff --git a/pkgs/applications/misc/gum/default.nix b/pkgs/applications/misc/gum/default.nix
new file mode 100644
index 0000000000000..5a925a0d19bc6
--- /dev/null
+++ b/pkgs/applications/misc/gum/default.nix
@@ -0,0 +1,38 @@
+{ lib, buildGoModule, installShellFiles, fetchFromGitHub }:
+
+buildGoModule rec {
+  pname = "gum";
+  version = "0.1.0";
+
+  src = fetchFromGitHub {
+    owner = "charmbracelet";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-od0jJPfvczlru9hhO8ravGou6yYP91L2k37NYm2hD+k=";
+  };
+
+  vendorSha256 = "sha256-uX0CQRqrM0/fj14owcUUpYph2j5ZwJITG53na31N6kg=";
+
+  nativeBuildInputs = [
+    installShellFiles
+  ];
+
+  ldflags = [ "-s" "-w" "-X=main.Version=${version}" ];
+
+  postInstall = ''
+    $out/bin/gum man > gum.1
+    installManPage gum.1
+    installShellCompletion --cmd gum \
+      --bash <($out/bin/gum completion bash) \
+      --fish <($out/bin/gum completion fish) \
+      --zsh <($out/bin/gum completion zsh)
+  '';
+
+  meta = with lib; {
+    description = "Tasty Bubble Gum for your shell";
+    homepage = "https://github.com/charmbracelet/gum";
+    changelog = "https://github.com/charmbracelet/gum/releases/tag/v${version}";
+    license = licenses.mit;
+    maintainers = with maintainers; [ maaslalani ];
+  };
+}