asciinema_3: use versionCheckHook

This commit is contained in:
Pol Dellaiera
2025-11-11 10:32:16 +01:00
parent fe2d1f226c
commit 783c88af4c
+7 -11
View File
@@ -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/";