{ lib , rustPlatform , fetchFromGitHub , installShellFiles , stdenv , nix-update-script , callPackage }: rustPlatform.buildRustPackage rec { pname = "cargo-asm"; version = "0.2.18"; src = fetchFromGitHub { owner = "pacak"; repo = "cargo-show-asm"; rev = version; hash = "sha256-K7hWXRS6bb9XZxIgZQeu22Gtt3WmXI63Xd97Unm6mHs="; }; cargoHash = "sha256-PJ5v8uuRZZV2jcVS+a8/CAABekdsB+nvSJWI4cUHq0A="; nativeBuildInputs = [ installShellFiles ]; postInstall = '' installShellCompletion --cmd cargo-asm \ --bash <($out/bin/cargo-asm --bpaf-complete-style-bash) \ --fish <($out/bin/cargo-asm --bpaf-complete-style-fish) \ --zsh <($out/bin/cargo-asm --bpaf-complete-style-zsh) ''; passthru = { updateScript = nix-update-script { }; tests = lib.optionalAttrs stdenv.hostPlatform.isx86_64 { test-basic-x86_64 = callPackage ./test-basic-x86_64.nix { }; }; }; meta = with lib; { description = "Cargo subcommand showing the assembly, LLVM-IR and MIR generated for Rust code"; homepage = "https://github.com/pacak/cargo-show-asm"; license = with licenses; [ asl20 mit ]; maintainers = with maintainers; [ figsoda oxalica ]; mainProgram = "cargo-asm"; }; }