eww: generate shell completions

This commit is contained in:
Ilia
2024-12-14 13:05:37 +03:00
parent 00aba09337
commit cc419ccaef
+9
View File
@@ -2,6 +2,7 @@
lib,
rustPlatform,
fetchFromGitHub,
installShellFiles,
pkg-config,
wrapGAppsHook3,
gtk3,
@@ -31,6 +32,7 @@ rustPlatform.buildRustPackage rec {
cargoHash = "sha256-55lmQl5pJwrEj5RlSG8b0PqtZVrASxTmX4Qdk090DZo=";
nativeBuildInputs = [
installShellFiles
pkg-config
wrapGAppsHook3
];
@@ -52,6 +54,13 @@ rustPlatform.buildRustPackage rec {
# requires unstable rust features
RUSTC_BOOTSTRAP = 1;
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd eww \
--bash <($out/bin/eww shell-completions --shell bash) \
--fish <($out/bin/eww shell-completions --shell fish) \
--zsh <($out/bin/eww shell-completions --shell zsh)
'';
passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; };
meta = {