---
 crane-build.nix | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/crane-build.nix b/crane-build.nix
index 9b764ec9..4c05d7ec 100644
--- a/crane-build.nix
+++ b/crane-build.nix
@@ -5,6 +5,7 @@
   # build time
   pkg-config,
   rustPlatform,
+  versionCheckHook,
 
   # run time
   fuse3,
@@ -80,13 +81,8 @@ let
       '';
 
       doInstallCheck = true;
-      installCheckPhase = ''
-        runHook preInstallCheck
-
-        test "$($out/bin/bcachefs version)" = "${version}"
-
-        runHook postInstallCheck
-      '';
+      nativeInstallCheckInputs = [ versionCheckHook ];
+      versionCheckProgramArg = "version";
 
       meta = {
         description = "Userspace tools for bcachefs";
-- 
2.51.0


Reply via email to