Add difftastic package (#8955)

This commit is contained in:
Ed Reel
2023-11-17 13:15:29 -06:00
committed by GitHub
parent 39353a747c
commit 106abe154d
6 changed files with 59 additions and 0 deletions

View File

@@ -0,0 +1 @@
/usr/local/bin/difft

View File

@@ -0,0 +1 @@
/usr/local/bin/difft

View File

@@ -0,0 +1 @@
/usr/local/bin/difft

14
packages/difft.rb Normal file
View File

@@ -0,0 +1,14 @@
require 'package'
require_relative 'difftastic'
class Difft < Package
description Difftastic.description
homepage Difftastic.homepage
version Difftastic.version
license Difftastic.license
compatibility Difftastic.compatibility
is_fake
depends_on 'difftastic'
end

37
packages/difftastic.rb Normal file
View File

@@ -0,0 +1,37 @@
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_url({
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/difftastic/0.52.0_armv7l/difftastic-0.52.0-chromeos-armv7l.tar.zst',
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/difftastic/0.52.0_armv7l/difftastic-0.52.0-chromeos-armv7l.tar.zst',
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/difftastic/0.52.0_i686/difftastic-0.52.0-chromeos-i686.tar.zst',
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/difftastic/0.52.0_x86_64/difftastic-0.52.0-chromeos-x86_64.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

View File

@@ -1365,6 +1365,11 @@ url: https://github.com/so-fancy/diff-so-fancy/releases
activity: low
---
kind: url
name: difftastic
url: https://github.com/Wilfred/difftastic/releases
activity: medium
---
kind: url
name: diffuse
url: https://downloads.sourceforge.net/project/diffuse/diffuse/
activity: low