diff --git a/pkgs/by-name/tr/tray-tui/package.nix b/pkgs/by-name/tr/tray-tui/package.nix new file mode 100644 index 000000000000..b5ec1b212f41 --- /dev/null +++ b/pkgs/by-name/tr/tray-tui/package.nix @@ -0,0 +1,44 @@ +{ + lib, + rustPlatform, + fetchFromGitHub, + installShellFiles, + nix-update-script, +}: +rustPlatform.buildRustPackage rec { + pname = "tray-tui"; + version = "0.1.0"; + + src = fetchFromGitHub { + owner = "Levizor"; + repo = "tray-tui"; + tag = version; + hash = "sha256-N/ECG8J1wVoMevj3sDHiZiXIWmb6gKQFUfK0BiNHICM="; + }; + + useFetchCargoVendor = true; + + cargoHash = "sha256-COz4tY6VwjpwxLNe7JIs8CBXlQyQIaDhMQkeZRKk5Zs="; + + nativeBuildInputs = [ + installShellFiles + ]; + + postInstall = '' + installShellCompletion --cmd tray-tui \ + --bash <($out/bin/tray-tui --completions bash) \ + --zsh <($out/bin/tray-tui --completions zsh) \ + --fish <($out/bin/tray-tui --completions fish) + ''; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "System tray in your terminal"; + homepage = "https://github.com/Levizor/tray-tui"; + license = lib.licenses.mit; + mainProgram = "tray-tui"; + maintainers = with lib.maintainers; [ Levizor ]; + platforms = lib.platforms.linux; + }; +}