diff options
Diffstat (limited to 'nixpkgs/pkgs/tools/text/difftastic/default.nix')
-rw-r--r-- | nixpkgs/pkgs/tools/text/difftastic/default.nix | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/nixpkgs/pkgs/tools/text/difftastic/default.nix b/nixpkgs/pkgs/tools/text/difftastic/default.nix index bfe430957484..06bd7d0376b2 100644 --- a/nixpkgs/pkgs/tools/text/difftastic/default.nix +++ b/nixpkgs/pkgs/tools/text/difftastic/default.nix @@ -1,23 +1,34 @@ -{ lib, fetchFromGitHub, rustPlatform }: +{ lib, fetchFromGitHub, rustPlatform, tree-sitter }: rustPlatform.buildRustPackage rec { pname = "difftastic"; - version = "0.8"; + version = "0.9"; src = fetchFromGitHub { owner = "wilfred"; repo = pname; rev = version; - sha256 = "0103py4v4v7xqv85yiczhd9w9h1aa54svhhdibvbl6x4b35y2mk5"; + sha256 = "sha256-spncRJjROytGnIig6ujqHu0e/XBTN4dsJ3og4aIu+l8="; }; - cargoSha256 = "1k0d7yadicfzfc2m1aqs4c4a2k3srb54fpwarc3kwn26v3vfjai1"; + cargoSha256 = "sha256-2xGwS4wjLQ7zmfZ2gMdlUAkjPDF6SmUaiX2j1KYy0vo="; + + 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 ]; + maintainers = with maintainers; [ ethancedwards8 figsoda ]; }; } |