2023-11-16 04:20:00 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
2024-01-13 08:15:51 +00:00
|
|
|
, darwin
|
2023-11-16 04:20:00 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "subxt";
|
2024-07-01 15:47:52 +00:00
|
|
|
version = "0.37.0";
|
2023-11-16 04:20:00 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "paritytech";
|
|
|
|
repo = "subxt";
|
|
|
|
rev = "v${version}";
|
2024-07-01 15:47:52 +00:00
|
|
|
hash = "sha256-GD4P+SXl9hyv0CxOximOMz+Gzi85kPahsiz0wHRqSWk=";
|
2023-11-16 04:20:00 +00:00
|
|
|
};
|
|
|
|
|
2024-07-01 15:47:52 +00:00
|
|
|
cargoHash = "sha256-luKtu9g+NtlwRhC1icpIxkBvP3GtggpKoj7Sx4anLAM=";
|
2023-11-16 04:20:00 +00:00
|
|
|
|
|
|
|
# Only build the command line client
|
|
|
|
cargoBuildFlags = [ "--bin" "subxt" ];
|
|
|
|
|
|
|
|
# Needed by wabt-sys
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [
|
|
|
|
darwin.apple_sdk.frameworks.Security
|
|
|
|
];
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
# Requires a running substrate node
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/paritytech/subxt";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Submit transactions to a substrate node via RPC";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "subxt";
|
2023-11-16 04:20:00 +00:00
|
|
|
license = with licenses; [ gpl3Plus asl20 ];
|
|
|
|
maintainers = [ maintainers.FlorianFranzen ];
|
|
|
|
};
|
|
|
|
}
|