From 048c4cc3e0a6e63d3b7c9710419da47e6ed956d0 Mon Sep 17 00:00:00 2001 From: Bruno Bigras Date: Sat, 24 Aug 2024 02:05:24 -0400 Subject: [PATCH] diffsitter: add updateScript and versionCheckHook --- pkgs/tools/text/diffsitter/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/tools/text/diffsitter/default.nix b/pkgs/tools/text/diffsitter/default.nix index 94d7172d71be..6089af84b44b 100644 --- a/pkgs/tools/text/diffsitter/default.nix +++ b/pkgs/tools/text/diffsitter/default.nix @@ -4,6 +4,8 @@ , makeWrapper , rustPlatform , tree-sitter +, gitUpdater +, versionCheckHook }: let @@ -53,6 +55,11 @@ rustPlatform.buildRustPackage rec { makeWrapper ]; + nativeInstallCheckInputs = [ + versionCheckHook + ]; + doInstallCheck = true; + postInstall = '' # completions are not yet implemented # so we can safely remove this without installing the completions @@ -71,6 +78,8 @@ rustPlatform.buildRustPackage rec { # tests::diff_hunks_snapshot::_short_python_py_true_expects # tests::diff_hunks_snapshot::_short_rust_rs_true_expects + passthru.updateScript = gitUpdater { rev-prefix = "v"; }; + meta = with lib; { homepage = "https://github.com/afnanenayet/diffsitter"; description = "Tree-sitter based AST difftool to get meaningful semantic diffs";