mirror of
https://github.com/sadan4/dotfiles.git
synced 2025-06-22 12:17:00 -04:00
patch completions to workaround https://github.com/rust-lang/rustup/issues/2268
This commit is contained in:
parent
1be2f3237a
commit
81503ad83f
2 changed files with 38 additions and 6 deletions
|
@ -1,7 +1,22 @@
|
|||
{pkgs, ...}: {
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
rustup
|
||||
];
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
rustup
|
||||
];
|
||||
};
|
||||
programs = {
|
||||
zsh = {
|
||||
# Few horror things here
|
||||
# 1. rustup's completion is broken for zsh. See: https://github.com/rust-lang/rustup/issues/2268
|
||||
# 2. patch cant read the source file from stdin, so tmpfiles have to be used
|
||||
initExtra = ''
|
||||
TMP_RUSTUP_FILE=$(mktemp)
|
||||
${pkgs.rustup}/bin/rustup completions zsh > "$TMP_RUSTUP_FILE"
|
||||
eval "$(patch -s -o - -i ${./rustupCompPatch.diff} $TMP_RUSTUP_FILE)"
|
||||
rm $TMP_RUSTUP_FILE
|
||||
unset TMP_RUSTUP_FILE
|
||||
'';
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue