Files
chromebrew/packages/difftastic.rb
Maximilian Downey Twiss f6dc1d8d4e Derive binary_url in package.rb (#7082)
* Add binary_compression value to each package

* Remove binary_url values and arrays

* Handle packages with empty binary_sha256 arrays (either missing binaries or not compiled by us)
2024-01-25 11:03:31 -05:00

33 lines
1006 B
Ruby

require 'package'
class Difftastic < Package
description 'Difftastic is a structural diff tool that compares files based on their syntax.'
homepage 'https://github.com/Wilfred/difftastic'
version '0.52.0'
license 'MIT'
compatibility 'all'
source_url 'https://github.com/Wilfred/difftastic.git'
git_hashtag version
binary_compression 'tar.zst'
binary_sha256({
aarch64: '54412e3711977b6cc829490a847844c12cfe5fd1898b2c9ae4d10b640df91e41',
armv7l: '54412e3711977b6cc829490a847844c12cfe5fd1898b2c9ae4d10b640df91e41',
i686: '8c6df5d2ae0941782dd53136e6912837b6ba364929fabaa0d29252f24c22a1bb',
x86_64: '555b7c11f0b13166e5dd9ca3c826fd5c730f93cb0e2bce167a26f4b9b8fb1386'
})
depends_on 'rust' => :build
def self.install
system "cargo install \
--locked difftastic \
--path . --root #{CREW_DEST_PREFIX}"
FileUtils.rm_rf Dir["#{CREW_DEST_PREFIX}/.crate*"]
end
def self.postinstall
puts "\nType 'difft' to get started.\n".lightblue
end
end