diffsitter: add updateScript and versionCheckHook (#336957)

This commit is contained in:
Peder Bergebakken Sundt 2024-09-12 15:46:21 +02:00 committed by GitHub
commit df805a893e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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