fork/wezterm

git clone https://git.julia.blue/fork/wezterm

Wez Furlongs,wez/wezterm,wezterm/wezterm,11c4b1166

termwiz-0.23.3
1.5 KiB52 linesraw
1# Note: if you are viewing this from the tap repo, this file is automatically
2# updated from:
3# https://github.com/wezterm/wezterm/blob/main/ci/wezterm-homebrew-macos.rb.template
4# by automation in the wezterm repo.
5# vim:ft=ruby:
6cask "wezterm" do
7  version "@TAG@"
8  sha256 "@SHA256@"
9
10  url "https://github.com/wezterm/wezterm/releases/download/#{version}/WezTerm-macos-#{version}.zip"
11  name "WezTerm"
12  desc "A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust"
13  homepage "https://wezterm.org/"
14
15  conflicts_with cask: "wezterm/wezterm/wezterm-nightly"
16
17  # Unclear what the minimal OS version is
18  # depends_on macos: ">= :sierra"
19
20  app "WezTerm.app"
21  [
22    "wezterm",
23    "wezterm-gui",
24    "wezterm-mux-server",
25    "strip-ansi-escapes"
26  ].each do |tool|
27    binary "#{appdir}/WezTerm.app/Contents/MacOS/#{tool}"
28  end
29
30  preflight do
31    # Move "WezTerm-macos-#{version}/WezTerm.app" out of the subfolder
32    staged_subfolder = staged_path.glob(["WezTerm-*", "wezterm-*"]).first
33    if staged_subfolder
34      FileUtils.mv(staged_subfolder/"WezTerm.app", staged_path)
35      FileUtils.rm_rf(staged_subfolder)
36    end
37  end
38
39  zap trash: [
40    "~/Library/Saved Application State/com.github.wez.wezterm.savedState",
41  ]
42
43  def caveats; <<~EOS
44    Cask #{token} related executables like 'wezterm', 'wezterm-gui',
45    'wezterm-mux-server', are linked into
46      /usr/local/bin/    for x86 Mac,
47      /opt/homebrew/bin/ for M1 Mac.
48
49    Removal of them is ensured by 'brew uninstall --cask #{token}'.
50  EOS
51  end
52end