From 4dd5091bc4c075bfd92bcdf6f93f24e28d401498 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Tue, 19 Nov 2024 15:42:44 +0100 Subject: [PATCH] zellij: use versionCheckHook instead of passthru.tests.version --- pkgs/by-name/ze/zellij/package.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/ze/zellij/package.nix b/pkgs/by-name/ze/zellij/package.nix index c11f44d4f255..c48e89cc6139 100644 --- a/pkgs/by-name/ze/zellij/package.nix +++ b/pkgs/by-name/ze/zellij/package.nix @@ -8,8 +8,7 @@ curl, openssl, mandown, - zellij, - testers, + versionCheckHook, }: rustPlatform.buildRustPackage rec { @@ -49,9 +48,14 @@ rustPlatform.buildRustPackage rec { HOME=$TMPDIR ''; + nativeInstallCheckInputs = [ + versionCheckHook + ]; + versionCheckProgramArg = [ "--version" ]; + doInstallCheck = true; + # Ensure that we don't vendor curl, but instead link against the libcurl from nixpkgs - doInstallCheck = stdenv.hostPlatform.libc == "glibc"; - installCheckPhase = '' + installCheckPhase = lib.optionalString (stdenv.hostPlatform.libc == "glibc") '' runHook preInstallCheck ldd "$out/bin/zellij" | grep libcurl.so @@ -71,7 +75,6 @@ rustPlatform.buildRustPackage rec { --zsh <($out/bin/zellij setup --generate-completion zsh) ''; - passthru.tests.version = testers.testVersion { package = zellij; }; meta = with lib; { description = "Terminal workspace with batteries included";