2021-09-16 16:25:36 +02:00
|
|
|
{ lib, fetchFromGitHub, rustPlatform, tree-sitter }:
|
2021-07-10 05:08:12 +02:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "difftastic";
|
2021-10-20 04:29:57 +02:00
|
|
|
version = "0.11.0";
|
2021-07-10 05:08:12 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "wilfred";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-10-20 04:29:57 +02:00
|
|
|
sha256 = "sha256-Arg1n5WFCNGHZay56BvLrPDAvvUKVurVNEKgTzHgIzI=";
|
2021-07-10 05:08:12 +02:00
|
|
|
};
|
|
|
|
|
2021-10-20 04:29:57 +02:00
|
|
|
cargoSha256 = "sha256-ArIyIAxVgGmI+MdkVBo0xihDdw3RlRiPLJOhPcC1KLw=";
|
2021-07-10 05:08:12 +02:00
|
|
|
|
2021-09-16 16:25:36 +02:00
|
|
|
postPatch = ''
|
|
|
|
pushd vendor
|
|
|
|
for grammar in */; do
|
|
|
|
if [ -d "${tree-sitter.grammars}/$grammar" ]; then
|
|
|
|
rm -r "$grammar"
|
|
|
|
ln -s "${tree-sitter.grammars}/$grammar"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
popd
|
|
|
|
'';
|
|
|
|
|
2021-07-10 05:08:12 +02:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A syntax-aware diff";
|
|
|
|
homepage = "https://github.com/Wilfred/difftastic";
|
2021-09-08 01:00:00 +02:00
|
|
|
changelog = "https://github.com/Wilfred/difftastic/raw/${version}/CHANGELOG.md";
|
2021-07-10 05:08:12 +02:00
|
|
|
license = licenses.mit;
|
2021-09-16 16:25:36 +02:00
|
|
|
maintainers = with maintainers; [ ethancedwards8 figsoda ];
|
2021-07-10 05:08:12 +02:00
|
|
|
};
|
|
|
|
}
|