subxt: add update script, version check and structuredAttrs

This commit is contained in:
Florian Franzen
2026-09-28 15:45:14 +02:00
parent d4515b58d7
commit 551ec7da15

View File

@@ -2,6 +2,8 @@
lib,
rustPlatform,
fetchFromGitHub,
nix-update-script,
versionCheckHook,
}:
rustPlatform.buildRustPackage (finalAttrs: {
@@ -26,6 +28,17 @@ rustPlatform.buildRustPackage (finalAttrs: {
# Requires a running substrate node
doCheck = false;
__structuredAttrs = true;
nativeInstallCheckInputs = [ versionCheckHook ];
# subxt exposes its version through a subcommand, not a --version flag
versionCheckProgramArg = "version";
doInstallCheck = true;
passthru.updateScript = nix-update-script { };
meta = {
homepage = "https://github.com/paritytech/subxt";
description = "Subxt is a CLI tool for interacting with chains in the Polkadot network";