10 rustPlatform.buildRustPackage rec {
11 pname = "cargo-show-asm";
15 inherit pname version;
16 hash = "sha256-U9i/xp9WxMYf4GMsZB7qYOpuuuEw4mWZp+ZEyguGtQQ=";
19 cargoHash = "sha256-eUaEpex9x9bdqPJ4p5QvkWKaxs3ih4Gb9+4deGBZgXU=";
25 postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
26 installShellCompletion --cmd cargo-asm \
27 --bash <($out/bin/cargo-asm --bpaf-complete-style-bash) \
28 --fish <($out/bin/cargo-asm --bpaf-complete-style-fish) \
29 --zsh <($out/bin/cargo-asm --bpaf-complete-style-zsh)
33 updateScript = nix-update-script { };
34 tests = lib.optionalAttrs stdenv.hostPlatform.isx86_64 {
35 test-basic-x86_64 = callPackage ./test-basic-x86_64.nix { };
40 description = "Cargo subcommand showing the assembly, LLVM-IR and MIR generated for Rust code";
41 homepage = "https://github.com/pacak/cargo-show-asm";
42 changelog = "https://github.com/pacak/cargo-show-asm/blob/${version}/Changelog.md";
43 license = with licenses; [ asl20 mit ];
44 maintainers = with maintainers; [ figsoda oxalica matthiasbeyer ];
45 mainProgram = "cargo-asm";