Skip to content

Commit

Permalink
build(nix): add shell completions (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
nekowinston committed Nov 5, 2023
1 parent 547ed85 commit 097a72a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,19 @@
});

packages = forAllSystems (pkgs: rec {
mdbook-catppuccin = pkgs.rustPlatform.buildRustPackage {
mdbook-catppuccin = pkgs.rustPlatform.buildRustPackage rec {
pname = "mdbook-catppuccin";
inherit version;
src = pkgs.nix-gitignore.gitignoreSource [] ./.;
cargoLock.lockFile = ./Cargo.lock;

nativeBuildInputs = with pkgs; [installShellFiles];
postInstall = ''
installShellCompletion --cmd ${pname} \
--bash <($out/bin/${pname} completion bash) \
--fish <($out/bin/${pname} completion fish) \
--zsh <($out/bin/${pname} completion zsh)
'';
};
default = mdbook-catppuccin;
});
Expand Down

0 comments on commit 097a72a

Please sign in to comment.