From 783c88af4cf5934d0edffad2bb6b09287083fb83 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Tue, 11 Nov 2025 10:26:21 +0100 Subject: [PATCH] asciinema_3: use `versionCheckHook` --- pkgs/by-name/as/asciinema_3/package.nix | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/pkgs/by-name/as/asciinema_3/package.nix b/pkgs/by-name/as/asciinema_3/package.nix index d3a841bdbf30..2803cd784ab2 100644 --- a/pkgs/by-name/as/asciinema_3/package.nix +++ b/pkgs/by-name/as/asciinema_3/package.nix @@ -4,7 +4,7 @@ installShellFiles, python3, rustPlatform, - testers, + versionCheckHook, }: rustPlatform.buildRustPackage (finalAttrs: { @@ -12,10 +12,9 @@ rustPlatform.buildRustPackage (finalAttrs: { version = "3.0.1"; src = fetchFromGitHub { - name = "asciinema-source-${finalAttrs.version}"; owner = "asciinema"; repo = "asciinema"; - rev = "v${finalAttrs.version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-jWRq/LeDdCETiOMkWr9EIWztb14IYGCSo05QPw5HZZk="; }; @@ -23,6 +22,8 @@ rustPlatform.buildRustPackage (finalAttrs: { env.ASCIINEMA_GEN_DIR = "gendir"; + strictDeps = true; + nativeCheckInputs = [ python3 ]; nativeBuildInputs = [ installShellFiles ]; @@ -34,14 +35,9 @@ rustPlatform.buildRustPackage (finalAttrs: { --zsh gendir/completion/_asciinema ''; - strictDeps = true; - - passthru = { - tests.version = testers.testVersion { - package = finalAttrs.finalPackage; - command = "asciinema --version"; - }; - }; + doInstallCheck = true; + nativeInstallCheckInputs = [ versionCheckHook ]; + versionCheckProgramArg = "--version"; meta = { homepage = "https://asciinema.org/";