From 551ec7da15f8fcd31fe30f4e030404093e279aac Mon Sep 17 00:00:00 2001 From: Florian Franzen Date: Mon, 28 Sep 2026 15:45:14 +0200 Subject: [PATCH] subxt: add update script, version check and structuredAttrs --- pkgs/by-name/su/subxt/package.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pkgs/by-name/su/subxt/package.nix b/pkgs/by-name/su/subxt/package.nix index 5d3177541bcd..c465d02ff8b2 100644 --- a/pkgs/by-name/su/subxt/package.nix +++ b/pkgs/by-name/su/subxt/package.nix @@ -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";