diffsitter: add updateScript and versionCheckHook

This commit is contained in:
Bruno Bigras 2024-08-24 02:05:24 -04:00
parent 0b6fa5ee40
commit 048c4cc3e0

View File

@ -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";