Unverified Commit df805a89 authored by Peder Bergebakken Sundt's avatar Peder Bergebakken Sundt Committed by GitHub
Browse files

diffsitter: add updateScript and versionCheckHook (#336957)

parents bb7d4d85 048c4cc3
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -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";