cask "nvidia-nsight-compute" do arch arm: "arm64", intel: "x86_64" version "2025.2.1.3-35987062" sha256 arm: "85764bfc49dadc0f9c44a5c408e84e978637df38699e8504a260ee809c42f340", intel: "83db44f91e4aaf5f54f1f756c1c6120e7ed289293d1e735ca76ce8b7ce722642" url "https://developer.nvidia.com/downloads/assets/tools/secure/nsight-compute/#{version.major_minor_patch.dots_to_underscores}/nsight-compute-mac-#{arch}-#{version}.dmg" name "NVIDIA Nsight Compute" desc "Interactive profiler for CUDA and NVIDIA OptiX" homepage "https://developer.nvidia.com/nsight-compute" livecheck do url "https://developer.nvidia.com/tools-downloads.json" regex(/nsight[._-]compute[._-]mac[._-]#{arch}[._-]v?(\d+(?:[.-]\d+)+)\.dmg/i) strategy :json do |json, regex| json["downloads"]&.map do |download| next unless download["development_platform"]&.include?("osx") download["files"]&.map do |file| match = file["url"]&.match(regex) next if match.blank? match[1] end end&.flatten end end depends_on macos: ">= :high_sierra" app "NVIDIA Nsight Compute.app" zap trash: [ "~/Library/Application Support/NVIDIA Corporation/NVIDIA Nsight Compute", "~/Library/Preferences/com.nvidia.devtools.Rebel.plist", ] end