Commit 783c88af authored by Pol Dellaiera's avatar Pol Dellaiera
Browse files

asciinema_3: use `versionCheckHook`

parent fe2d1f22
Loading
Loading
Loading
Loading
+7 −11
Original line number Diff line number Diff line
@@ -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/";