@@ -1,23 +1,34 @@
1−{ lib, fetchFromGitHub, rustPlatform }:
1+{ lib, fetchFromGitHub, rustPlatform, tree-sitter }:
22
33rustPlatform.buildRustPackage rec {
44 pname = "difftastic";
5− version = "0.8";
5+ version = "0.9";
66
77 src = fetchFromGitHub {
88 owner = "wilfred";
99 repo = pname;
1010 rev = version;
11− sha256 = "0103py4v4v7xqv85yiczhd9w9h1aa54svhhdibvbl6x4b35y2mk5";
11+ sha256 = "sha256-spncRJjROytGnIig6ujqHu0e/XBTN4dsJ3og4aIu+l8=";
1212 };
1313
14− cargoSha256 = "1k0d7yadicfzfc2m1aqs4c4a2k3srb54fpwarc3kwn26v3vfjai1";
14+ cargoSha256 = "sha256-2xGwS4wjLQ7zmfZ2gMdlUAkjPDF6SmUaiX2j1KYy0vo=";
15+
16+ postPatch = ''
17+ pushd vendor
18+ for grammar in */; do
19+ if [ -d "${tree-sitter.grammars}/$grammar" ]; then
20+ rm -r "$grammar"
21+ ln -s "${tree-sitter.grammars}/$grammar"
22+ fi
23+ done
24+ popd
25+ '';
1526
1627 meta = with lib; {
1728 description = "A syntax-aware diff";
1829 homepage = "https://github.com/Wilfred/difftastic";
1930 changelog = "https://github.com/Wilfred/difftastic/raw/${version}/CHANGELOG.md";
2031 license = licenses.mit;
21− maintainers = with maintainers; [ ethancedwards8 ];
32+ maintainers = with maintainers; [ ethancedwards8 figsoda ];
2233 };
2334}