fenix
fenix copied to clipboard
How to enable completions?
Completions are usually made available by rustup, which this package does not provide, IIRC.
How can we get completions when using Fenix?
Temporary workaround, add a derivation that just copies the existing derivation to the expected directory: https://github.com/giggio/dotfiles/blob/448289156397e3d0aec40e2b7d22af13914ce2f0/config/home-manager/rust/cargo-completions.nix
After investigating it seems that completions are already in the package, at etc/bash_completion.d/cargo, it is just a matter of adding them to the derivation.
I think something like
if [ -d $out/etc/bash_completion.d ]; then
mkdir -p $out/share/bash-completion/completions
cp $out/etc/bash_completion.d/* $out/share/bash-completion/completions
fi
needed to be added to installPhase in mk-toolchain.nix,
(sorry, im not familiar enough with git to make proper PR)