cargo-show-asm: init at 0.1.24

This commit is contained in:
oxalica 2022-10-17 17:34:50 +08:00
parent 1aa7d4e6c6
commit 725658648f
2 changed files with 47 additions and 0 deletions

View File

@ -0,0 +1,44 @@
{ lib
, stdenv
, fetchFromGitHub
, rustPlatform
, pkg-config
, installShellFiles
, openssl
, nix-update-script
}:
rustPlatform.buildRustPackage rec {
pname = "cargo-asm";
version = "0.1.24";
src = fetchFromGitHub {
owner = "pacak";
repo = "cargo-show-asm";
rev = version;
hash = "sha256-ahkKUtg5M88qddzEwYxPecDtBofGfPVxKuYKgmsbWYc=";
};
cargoHash = "sha256-S7OpHNjiTfQg7aPmHEx6Q/OV5QA9pB29F3MTIeiLAXg=";
nativeBuildInputs = [ pkg-config installShellFiles ];
buildInputs = [ openssl ];
postInstall = ''
installShellCompletion --cmd foobar \
--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 {
attrPath = pname;
};
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; [ oxalica ];
broken = stdenv.isDarwin; # FIXME: Seems to have issue compiling bundled curl.
};
}

View File

@ -14896,6 +14896,9 @@ with pkgs;
cargo-semver-checks = callPackage ../development/tools/rust/cargo-semver-checks { cargo-semver-checks = callPackage ../development/tools/rust/cargo-semver-checks {
inherit (darwin.apple_sdk.frameworks) Security; inherit (darwin.apple_sdk.frameworks) Security;
}; };
cargo-show-asm = callPackage ../development/tools/rust/cargo-show-asm { };
cargo-sort = callPackage ../development/tools/rust/cargo-sort { }; cargo-sort = callPackage ../development/tools/rust/cargo-sort { };
cargo-spellcheck = callPackage ../development/tools/rust/cargo-spellcheck { cargo-spellcheck = callPackage ../development/tools/rust/cargo-spellcheck {
inherit (darwin.apple_sdk.frameworks) Security; inherit (darwin.apple_sdk.frameworks) Security;