From a792c4e86efb4f94e7673b962edf30b7868cd911 Mon Sep 17 00:00:00 2001 From: Maas Lalani Date: Fri, 29 Jul 2022 20:09:07 -0400 Subject: [PATCH] gum: init at 0.1.0 (#183396) --- pkgs/applications/misc/gum/default.nix | 38 ++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 40 insertions(+) create mode 100644 pkgs/applications/misc/gum/default.nix diff --git a/pkgs/applications/misc/gum/default.nix b/pkgs/applications/misc/gum/default.nix new file mode 100644 index 000000000000..5a925a0d19bc --- /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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 890e17724a87..f2c5fa92b149 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -27434,6 +27434,8 @@ with pkgs; gtk-pipe-viewer = perlPackages.callPackage ../applications/video/pipe-viewer { withGtk3 = true; }; + gum = callPackage ../applications/misc/gum { }; + hydrus = python3Packages.callPackage ../applications/graphics/hydrus { inherit miniupnpc_2 swftools; inherit (qt5) wrapQtAppsHook;