From cda6eb1147edad546b5fc0c4513e2307594e84d1 Mon Sep 17 00:00:00 2001 From: Jonathan Davies Date: Sat, 22 Nov 2025 11:04:49 +0000 Subject: [PATCH] rust-analyzer-unwrapped: Add versionCheckHook --- pkgs/by-name/ru/rust-analyzer-unwrapped/package.nix | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/pkgs/by-name/ru/rust-analyzer-unwrapped/package.nix b/pkgs/by-name/ru/rust-analyzer-unwrapped/package.nix index 8c0705762c6a..c73792ab8c99 100644 --- a/pkgs/by-name/ru/rust-analyzer-unwrapped/package.nix +++ b/pkgs/by-name/ru/rust-analyzer-unwrapped/package.nix @@ -8,6 +8,7 @@ useMimalloc ? false, doCheck ? true, nix-update-script, + versionCheckHook, }: rustPlatform.buildRustPackage rec { @@ -55,14 +56,10 @@ rustPlatform.buildRustPackage rec { export RUST_SRC_PATH=${rustPlatform.rustLibSrc} ''; + nativeInstallCheckInputs = [ + versionCheckHook + ]; doInstallCheck = true; - installCheckPhase = '' - runHook preInstallCheck - versionOutput="$($out/bin/rust-analyzer --version)" - echo "'rust-analyzer --version' returns: $versionOutput" - [[ "$versionOutput" == "rust-analyzer ${version}" ]] - runHook postInstallCheck - ''; passthru = { updateScript = nix-update-script { };