starship: install completions
This commit is contained in:
parent
f253fc13ec
commit
e9ee34c806
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchFromGitHub, rustPlatform, pkg-config, openssl
|
{ stdenv, fetchFromGitHub, rustPlatform, pkg-config, openssl, installShellFiles
|
||||||
, libiconv, Security }:
|
, libiconv, Security }:
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
@ -12,7 +12,7 @@ rustPlatform.buildRustPackage rec {
|
|||||||
sha256 = "17wc9f07308a97dsmrkq74w2r639sqms0hwh8gavwxycj7wq7xz2";
|
sha256 = "17wc9f07308a97dsmrkq74w2r639sqms0hwh8gavwxycj7wq7xz2";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = stdenv.lib.optionals stdenv.isLinux [ pkg-config ];
|
nativeBuildInputs = [ installShellFiles ] ++ stdenv.lib.optionals stdenv.isLinux [ pkg-config ];
|
||||||
|
|
||||||
buildInputs = stdenv.lib.optionals stdenv.isLinux [ openssl ]
|
buildInputs = stdenv.lib.optionals stdenv.isLinux [ openssl ]
|
||||||
++ stdenv.lib.optionals stdenv.isDarwin [ libiconv Security ];
|
++ stdenv.lib.optionals stdenv.isDarwin [ libiconv Security ];
|
||||||
@ -22,6 +22,13 @@ rustPlatform.buildRustPackage rec {
|
|||||||
--replace "/bin/echo" "echo"
|
--replace "/bin/echo" "echo"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
for shell in bash fish zsh; do
|
||||||
|
$out/bin/starship completions $shell > starship.$shell
|
||||||
|
installShellCompletion starship.$shell
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
|
||||||
cargoSha256 = "1nvs68qxygi2l43vxw890r40px35dvzbcg6qmrm09g60ykd8pjv2";
|
cargoSha256 = "1nvs68qxygi2l43vxw890r40px35dvzbcg6qmrm09g60ykd8pjv2";
|
||||||
checkPhase = "cargo test -- --skip directory::home_directory --skip directory::directory_in_root";
|
checkPhase = "cargo test -- --skip directory::home_directory --skip directory::directory_in_root";
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user