forked from DGNum/colmena
default.nix: Fix shell auto-complete generation
This commit is contained in:
parent
ac67d87be5
commit
8a95ee87b6
1 changed files with 3 additions and 4 deletions
|
@ -2,6 +2,7 @@
|
|||
pkgs ? import ./pkgs.nix,
|
||||
}: let
|
||||
lib = pkgs.lib;
|
||||
stdenv = pkgs.stdenv;
|
||||
rustPlatform = pkgs.rustPlatform;
|
||||
in rustPlatform.buildRustPackage {
|
||||
name = "colmena-dev";
|
||||
|
@ -16,14 +17,12 @@ in rustPlatform.buildRustPackage {
|
|||
};
|
||||
cargoSha256 = "10h8bsy8hh36mvdgpnbw4vxnzkxyfw2vb4r1pn7fxfn0nklgakq7";
|
||||
|
||||
postBuild = ''
|
||||
postInstall = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
|
||||
mkdir completions
|
||||
for shell in bash fish zsh; do
|
||||
cargo run --frozen -- gen-completions $shell > completions/$shell
|
||||
$out/bin/colmena gen-completions $shell > completions/$shell
|
||||
done
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p "$out/share/"{bash-completion/completions,fish/vendor_completions.d,zsh/site-functions}
|
||||
cp completions/bash $out/share/bash-completion/completions/colmena
|
||||
cp completions/fish $out/share/fish/vendor_completions.d/colmena.fish
|
||||
|
|
Loading…
Reference in a new issue