solana-cli: install shell completions
This commit is contained in:
parent
5150491fd4
commit
dc11297a61
|
@ -7,10 +7,11 @@
|
||||||
, protobuf
|
, protobuf
|
||||||
, libcxx
|
, libcxx
|
||||||
, rocksdb
|
, rocksdb
|
||||||
|
, installShellFiles
|
||||||
, pkg-config
|
, pkg-config
|
||||||
, openssl
|
, openssl
|
||||||
, nix-update-script
|
, nix-update-script
|
||||||
# Taken from https://github.com/solana-labs/solana/blob/master/scripts/cargo-install-all.sh#L84
|
# Taken from https://github.com/solana-labs/solana/blob/master/scripts/cargo-install-all.sh#L84
|
||||||
, solanaPkgs ? [
|
, solanaPkgs ? [
|
||||||
"solana"
|
"solana"
|
||||||
"solana-bench-tps"
|
"solana-bench-tps"
|
||||||
|
@ -23,7 +24,7 @@
|
||||||
"solana-net-shaper"
|
"solana-net-shaper"
|
||||||
"solana-validator"
|
"solana-validator"
|
||||||
"solana-test-validator"
|
"solana-test-validator"
|
||||||
] ++ [
|
] ++ [
|
||||||
# XXX: Ensure `solana-genesis` is built LAST!
|
# XXX: Ensure `solana-genesis` is built LAST!
|
||||||
# See https://github.com/solana-labs/solana/issues/5826
|
# See https://github.com/solana-labs/solana/issues/5826
|
||||||
"solana-genesis"
|
"solana-genesis"
|
||||||
|
@ -66,36 +67,42 @@ rustPlatform.buildRustPackage rec {
|
||||||
# I'm not in the mood ((ΦωΦ))
|
# I'm not in the mood ((ΦωΦ))
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
nativeBuildInputs = [ protobuf pkg-config ];
|
nativeBuildInputs = [ installShellFiles protobuf pkg-config ];
|
||||||
buildInputs = [ openssl rustPlatform.bindgenHook ]
|
buildInputs = [ openssl rustPlatform.bindgenHook ]
|
||||||
++ lib.optionals stdenv.isLinux [ udev ]
|
++ lib.optionals stdenv.isLinux [ udev ]
|
||||||
++ lib.optionals stdenv.isDarwin [
|
++ lib.optionals stdenv.isDarwin [
|
||||||
libcxx
|
libcxx
|
||||||
IOKit
|
IOKit
|
||||||
Security
|
Security
|
||||||
AppKit
|
AppKit
|
||||||
System
|
System
|
||||||
Libsystem ];
|
Libsystem
|
||||||
|
];
|
||||||
|
|
||||||
postInstall = ''
|
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
|
mkdir -p $out/bin/sdk/bpf
|
||||||
cp -a ./sdk/bpf/* $out/bin/sdk/bpf/
|
cp -a ./sdk/bpf/* $out/bin/sdk/bpf/
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Used by build.rs in the rocksdb-sys crate. If we don't set these, it would
|
# Used by build.rs in the rocksdb-sys crate. If we don't set these, it would
|
||||||
# try to build RocksDB from source.
|
# try to build RocksDB from source.
|
||||||
ROCKSDB_LIB_DIR="${rocksdb}/lib";
|
ROCKSDB_LIB_DIR = "${rocksdb}/lib";
|
||||||
|
|
||||||
# Require this on darwin otherwise the compiler starts rambling about missing
|
# Require this on darwin otherwise the compiler starts rambling about missing
|
||||||
# cmath functions
|
# cmath functions
|
||||||
CPPFLAGS=lib.optionals stdenv.isDarwin "-isystem ${lib.getDev libcxx}/include/c++/v1";
|
CPPFLAGS = lib.optionals stdenv.isDarwin "-isystem ${lib.getDev libcxx}/include/c++/v1";
|
||||||
LDFLAGS=lib.optionals stdenv.isDarwin "-L${lib.getLib libcxx}/lib";
|
LDFLAGS = lib.optionals stdenv.isDarwin "-L${lib.getLib libcxx}/lib";
|
||||||
|
|
||||||
# If set, always finds OpenSSL in the system, even if the vendored feature is enabled.
|
# If set, always finds OpenSSL in the system, even if the vendored feature is enabled.
|
||||||
OPENSSL_NO_VENDOR = 1;
|
OPENSSL_NO_VENDOR = 1;
|
||||||
|
|
||||||
meta = with lib; {
|
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";
|
homepage = "https://solana.com";
|
||||||
license = licenses.asl20;
|
license = licenses.asl20;
|
||||||
maintainers = with maintainers; [ netfox happysalada aikooo7 ];
|
maintainers = with maintainers; [ netfox happysalada aikooo7 ];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user