asciinema-agg: refactor and adopt (#458553)

This commit is contained in:
Fernando Rodrigues
2025-11-05 09:10:30 +00:00
committed by GitHub

View File

@@ -2,16 +2,17 @@
lib, lib,
rustPlatform, rustPlatform,
fetchFromGitHub, fetchFromGitHub,
versionCheckHook,
}: }:
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage (finalAttrs: {
pname = "agg"; pname = "agg";
version = "1.7.0"; version = "1.7.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "asciinema"; owner = "asciinema";
repo = "agg"; repo = "agg";
rev = "v${version}"; tag = "v${finalAttrs.version}";
hash = "sha256-6UenPE6mmmvliaIuGdQj/FrlmoJvmBJgfo0hW+uRaxM="; hash = "sha256-6UenPE6mmmvliaIuGdQj/FrlmoJvmBJgfo0hW+uRaxM=";
}; };
@@ -19,12 +20,16 @@ rustPlatform.buildRustPackage rec {
cargoHash = "sha256-VpbjvrMhzS1zrcMNWBjTLda6o3ea2cwpnEDUouwyp8w="; cargoHash = "sha256-VpbjvrMhzS1zrcMNWBjTLda6o3ea2cwpnEDUouwyp8w=";
meta = with lib; { doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
meta = {
description = "Command-line tool for generating animated GIF files from asciicast v2 files produced by asciinema terminal recorder"; description = "Command-line tool for generating animated GIF files from asciicast v2 files produced by asciinema terminal recorder";
homepage = "https://github.com/asciinema/agg"; homepage = "https://github.com/asciinema/agg";
changelog = "https://github.com/asciinema/agg/releases/tag/${src.rev}"; changelog = "https://github.com/asciinema/agg/releases/tag/${finalAttrs.src.tag}";
license = licenses.asl20; license = lib.licenses.asl20;
maintainers = [ ]; maintainers = with lib.maintainers; [ phanirithvij ];
mainProgram = "agg"; mainProgram = "agg";
}; };
} })