Skip to content

Commit

Permalink
eww: generate shell completions (NixOS#365144)
Browse files Browse the repository at this point in the history
  • Loading branch information
FliegendeWurst authored Dec 15, 2024
2 parents e82c32b + cc419cc commit f03cbc4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkgs/by-name/ew/eww/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
lib,
rustPlatform,
fetchFromGitHub,
installShellFiles,
pkg-config,
wrapGAppsHook3,
gtk3,
Expand Down Expand Up @@ -31,6 +32,7 @@ rustPlatform.buildRustPackage rec {
cargoHash = "sha256-55lmQl5pJwrEj5RlSG8b0PqtZVrASxTmX4Qdk090DZo=";

nativeBuildInputs = [
installShellFiles
pkg-config
wrapGAppsHook3
];
Expand All @@ -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 = {
Expand Down

0 comments on commit f03cbc4

Please sign in to comment.