Commit c69453ac authored by Pol Dellaiera's avatar Pol Dellaiera
Browse files

jujutsu: use `versionCheckHook`

parent fd565b8c
Loading
Loading
Loading
Loading
+6 −8
Original line number Diff line number Diff line
@@ -14,8 +14,7 @@
  openssh,
  buildPackages,
  nix-update-script,
  testers,
  jujutsu,
  versionCheckHook,
}:

rustPlatform.buildRustPackage (finalAttrs: {
@@ -87,14 +86,13 @@ rustPlatform.buildRustPackage (finalAttrs: {
        --zsh <(COMPLETE=zsh ${jj})
    '';

  doInstallCheck = true;
  nativeInstallCheckInputs = [ versionCheckHook ];
  versionCheckProgram = "${placeholder "out"}/bin/jj";
  versionCheckProgramArg = "--version";

  passthru = {
    updateScript = nix-update-script { };
    tests = {
      version = testers.testVersion {
        package = jujutsu;
        command = "jj --version";
      };
    };
  };

  meta = {