I really like a software called listen1/listen1_desktop. However, the default installation script in the brew repository will install the iOS version of Listen1 for Macs with arm architecture. In fact, the Listen1 repository provides a universal version of Listen1. So I thought of downloading the installation script from the brew repository, modifying the script, and installing the software through the local script.
Modifying the Script
There are two places that need to be modified:
The package name that needs to be installed should be modified. The complete name can be found in the Releases of the corresponding software repository.
The hash value of the package needs to be replaced with the hash value of the new package (As for how to obtain the hash value, simply execute the installation script once, and you will find the hash value of the new package in the detailed error message.)
cask "listen1" do # NOTE: "1" is not a version number, but an intrinsic part of the product name #arch arm: "arm64", intel: "x64" arch arm: "universal", intel: "x64"
version "2.26.2" #sha256 arm: "fe8b9500196f7e5f623c24d73337d3253fbed5b5d5d678e6a3d398cb3d6441a0", sha256 arm: "bb6223d2024f5fe63ac36b500ee9b7b17791994936be75acf36207acd9a18ac1", intel: "2f7c70536cf8f866630c1d40a3c58bc590b071a6fcadd5b4bd084da9d9153ec9"
url "https://github.com/listen1/listen1_desktop/releases/download/v#{version}/Listen1_#{version}_mac_#{arch}.dmg", verified: "github.com/listen1/listen1_desktop/" name "Listen 1" desc "Search and play songs from a variety of online sources" homepage "https://listen1.github.io/listen1/"
app "Listen1.app"
zap trash: [ "~/Library/Application Support/listen1", "~/Library/Preferences/com.listen1.listen1.plist", ] end