mitra: create mitra shell completions for bash/fish/zsh (#476632)

This commit is contained in:
Sandro
2026-01-04 21:33:14 +00:00
committed by GitHub
+13
View File
@@ -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";