2020-06-07 22:48:41 +03:00
|
|
|
# Note: if you are viewing this from the tap repo, this file is automatically
|
|
|
|
# updated from:
|
2021-02-04 08:31:32 +03:00
|
|
|
# https://github.com/wez/wezterm/blob/main/ci/wezterm-homebrew-macos.rb.template
|
2020-06-07 22:48:41 +03:00
|
|
|
# by automation in the wezterm repo.
|
2021-05-22 18:30:10 +03:00
|
|
|
# vim:ft=ruby:
|
|
|
|
cask "wezterm" do
|
|
|
|
version "@TAG@"
|
|
|
|
sha256 "@SHA256@"
|
2020-06-07 22:48:41 +03:00
|
|
|
|
2021-05-22 18:30:10 +03:00
|
|
|
url "https://github.com/wez/wezterm/releases/download/#{version}/WezTerm-macos-#{version}.zip"
|
|
|
|
name "WezTerm"
|
2020-06-07 22:48:41 +03:00
|
|
|
desc "A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust"
|
|
|
|
homepage "https://wezfurlong.org/wezterm/"
|
2021-05-22 18:30:10 +03:00
|
|
|
|
|
|
|
conflicts_with cask: "wez/wezterm/wezterm-nightly"
|
|
|
|
|
|
|
|
# Unclear what the minimal OS version is
|
|
|
|
# depends_on macos: ">= :sierra"
|
|
|
|
|
|
|
|
app "WezTerm.app"
|
|
|
|
[
|
|
|
|
"wezterm",
|
|
|
|
"wezterm-gui",
|
|
|
|
"wezterm-mux-server",
|
|
|
|
"strip-ansi-escapes"
|
|
|
|
].each do |tool|
|
|
|
|
binary "#{appdir}/WezTerm.app/Contents/MacOS/#{tool}"
|
|
|
|
end
|
|
|
|
|
|
|
|
preflight do
|
|
|
|
# Move "WezTerm-macos-#{version}/WezTerm.app" out of the subfolder
|
|
|
|
staged_subfolder = staged_path.glob(["WezTerm-*", "wezterm-*"]).first
|
|
|
|
if staged_subfolder
|
|
|
|
FileUtils.mv(staged_subfolder/"WezTerm.app", staged_path)
|
|
|
|
FileUtils.rm_rf(staged_subfolder)
|
2021-02-16 20:50:39 +03:00
|
|
|
end
|
2020-06-07 22:48:41 +03:00
|
|
|
end
|
|
|
|
|
2021-05-22 18:30:10 +03:00
|
|
|
zap trash: [
|
|
|
|
"~/Library/Saved Application State/com.github.wez.wezterm.savedState",
|
|
|
|
]
|
|
|
|
|
|
|
|
def caveats; <<~EOS
|
|
|
|
Cask #{token} related executables like 'wezterm', 'wezterm-gui',
|
|
|
|
'wezterm-mux-server', are linked into
|
|
|
|
/usr/local/bin/ for x86 Mac,
|
|
|
|
/opt/homebrew/bin/ for M1 Mac.
|
|
|
|
|
|
|
|
Removal of them is ensured by 'brew uninstall --cask #{token}'.
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
end
|