{ lib, rustPlatform, fetchFromGitHub, versionCheckHook, nix-update-script, }: rustPlatform.buildRustPackage rec { pname = "codesnap"; version = "0.10.9"; src = fetchFromGitHub { owner = "mistricky"; repo = "CodeSnap"; tag = "v${version}"; hash = "sha256-EtMEUtLSgYrb0izPPCh432uX2p/8Ykf2caAR+8ZdxhU="; }; cargoHash = "sha256-atvSygt1Xi+rPxcJb0zdRBnL6SpSkyCcGxs1z2hWXGA="; cargoBuildFlags = [ "-p" "codesnap-cli" ]; cargoTestFlags = cargoBuildFlags; nativeInstallCheckInputs = [ versionCheckHook ]; versionCheckProgramArg = "--version"; doInstallCheck = true; passthru.updateScript = nix-update-script { }; meta = { description = "Command-line tool for generating beautiful code snippets"; homepage = "https://github.com/mistricky/CodeSnap"; changelog = "https://github.com/mistricky/CodeSnap/releases/tag/v${version}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ nartsiss ]; mainProgram = "codesnap"; }; }