mitra: create mitra shell completions for bash/fish/zsh (#476632)
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
rustPlatform,
|
||||
fetchFromGitea,
|
||||
installShellFiles,
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
@@ -30,6 +32,17 @@ rustPlatform.buildRustPackage rec {
|
||||
"production"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
installShellFiles
|
||||
];
|
||||
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd mitra \
|
||||
--bash <($out/bin/mitra completion --shell bash) \
|
||||
--fish <($out/bin/mitra completion --shell fish) \
|
||||
--zsh <($out/bin/mitra completion --shell zsh)
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Federated micro-blogging platform";
|
||||
homepage = "https://codeberg.org/silverpill/mitra";
|
||||
|
||||
Reference in New Issue
Block a user