homebrew-cask/Casks/daedalus-mainnet.rb

34 lines
1.1 KiB
Ruby

cask "daedalus-mainnet" do
version "4.6.0,20052"
sha256 "4978236ec97f07e83500a57adac574f0d3addc6f950f2a3017cf6c4aef2d0449"
url "https://update-cardano-mainnet.iohk.io/daedalus-#{version.csv.first}-mainnet-#{version.csv.second}.pkg",
verified: "update-cardano-mainnet.iohk.io/"
name "Daedalus Mainnet"
desc "Cryptocurrency wallet for ada on the Cardano blockchain"
homepage "https://daedaluswallet.io/"
livecheck do
url "https://update-cardano-mainnet.iohk.io/daedalus-latest-version.json"
strategy :page_match do |page|
match = page.match(%r{/daedalus[._-](\d+(?:\.\d+)+)[._-]mainnet[._-](\d+)\.pkg}i)
next if match.blank?
"#{match[1]},#{match[2]}"
end
end
auto_updates true
depends_on macos: ">= :high_sierra"
pkg "daedalus-#{version.before_comma}-mainnet-#{version.after_comma}.pkg"
uninstall pkgutil: "org.Daedalusmainnet.pkg"
zap trash: [
"~/Library/Application Support/Daedalus Mainnet",
"~/Library/Preferences/com.electron.daedalus-mainnet.plist",
"~/Library/Saved Application State/com.electron.daedalus-mainnet.savedState",
]
end