depot/third_party/nixpkgs/pkgs/tools/text/difftastic/default.nix
Default email a7848c7476 Project import generated by Copybara.
GitOrigin-RevId: 34ad3ffe08adfca17fcb4e4a47bb5f3b113687be
2021-10-17 11:34:42 +02:00

34 lines
896 B
Nix

{ lib, fetchFromGitHub, rustPlatform, tree-sitter }:
rustPlatform.buildRustPackage rec {
pname = "difftastic";
version = "0.11.0";
src = fetchFromGitHub {
owner = "wilfred";
repo = pname;
rev = version;
sha256 = "sha256-Arg1n5WFCNGHZay56BvLrPDAvvUKVurVNEKgTzHgIzI=";
};
cargoSha256 = "sha256-ArIyIAxVgGmI+MdkVBo0xihDdw3RlRiPLJOhPcC1KLw=";
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
'';
meta = with lib; {
description = "A syntax-aware diff";
homepage = "https://github.com/Wilfred/difftastic";
changelog = "https://github.com/Wilfred/difftastic/raw/${version}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ ethancedwards8 figsoda ];
};
}