solana-cli: install shell completions

This commit is contained in:
xrelkd 2024-04-11 16:08:00 +08:00
parent 5150491fd4
commit dc11297a61
No known key found for this signature in database
GPG Key ID: BAB7A457C1D1D6B3

View File

@ -7,6 +7,7 @@
, protobuf
, libcxx
, rocksdb
, installShellFiles
, pkg-config
, openssl
, nix-update-script
@ -66,7 +67,7 @@ rustPlatform.buildRustPackage rec {
# I'm not in the mood ((ΦωΦ))
doCheck = false;
nativeBuildInputs = [ protobuf pkg-config ];
nativeBuildInputs = [ installShellFiles protobuf pkg-config ];
buildInputs = [ openssl rustPlatform.bindgenHook ]
++ lib.optionals stdenv.isLinux [ udev ]
++ lib.optionals stdenv.isDarwin [
@ -75,9 +76,15 @@ rustPlatform.buildRustPackage rec {
Security
AppKit
System
Libsystem ];
Libsystem
];
postInstall = ''
installShellCompletion --cmd solana \
--bash <($out/bin/solana completion --shell bash) \
--fish <($out/bin/solana completion --shell fish) \
--zsh <($out/bin/solana completion --shell zsh)
mkdir -p $out/bin/sdk/bpf
cp -a ./sdk/bpf/* $out/bin/sdk/bpf/
'';
@ -95,7 +102,7 @@ rustPlatform.buildRustPackage rec {
OPENSSL_NO_VENDOR = 1;
meta = with lib; {
description = "Web-Scale Blockchain for fast, secure, scalable, decentralized apps and marketplaces. ";
description = "Web-Scale Blockchain for fast, secure, scalable, decentralized apps and marketplaces";
homepage = "https://solana.com";
license = licenses.asl20;
maintainers = with maintainers; [ netfox happysalada aikooo7 ];