feat(fish-deps): add uv as managed dep; install before cargo and fish
uv is now listed first in the catalog (before cargo and fish) so it is installed automatically before the fish source build is attempted. Install uses the official curl script; update uses `uv self update`. Catalog order is now: uv → cargo → fish → … ensuring prerequisites are in place before any dependent install method runs. README updated: uv and cargo added to the Required table, warning callout and dependency management note reflect the automatic install flow.
This commit is contained in:
@@ -11,32 +11,32 @@
|
||||
# _fdc_pm — system PM package name, or "" if not in repos
|
||||
# _fdc_special — special install key: rustup-installer | fisher-bootstrap |
|
||||
# fzf-update | paru-build | pipx | curl-installer |
|
||||
# git-cargo-fish | "" (none)
|
||||
# git-cargo-fish | curl-uv | "" (none)
|
||||
#
|
||||
# cargo is listed second so it is installed before Rust tools that depend on it.
|
||||
# uv and cargo are listed first so both are available before fish and other Rust tools.
|
||||
function _fish_deps_catalog
|
||||
set -g _fdc_bins \
|
||||
fish cargo fisher starship fzf zoxide direnv paru \
|
||||
uv cargo fish fisher starship fzf zoxide direnv paru \
|
||||
wakatime tailscale \
|
||||
eza lsd bat btop dust duf prettyping most rg lazygit lazydocker trash kitty wezterm
|
||||
|
||||
set -g _fdc_tiers \
|
||||
req req req req req req req rec \
|
||||
req req req req req req req req rec \
|
||||
int int \
|
||||
rec rec rec rec rec rec rec rec rec rec rec rec rec rec
|
||||
|
||||
set -g _fdc_cargo \
|
||||
"" "" "" starship "" zoxide "" "" \
|
||||
"" "" "" "" starship "" zoxide "" "" \
|
||||
"" "" \
|
||||
eza lsd bat "" du-dust "" "" "" ripgrep "" "" trashy "" ""
|
||||
|
||||
set -g _fdc_pm \
|
||||
fish cargo "" starship fzf zoxide direnv "" \
|
||||
uv cargo fish "" starship fzf zoxide direnv "" \
|
||||
wakatime tailscale \
|
||||
eza lsd bat btop dust duf prettyping most ripgrep lazygit lazydocker trash kitty wezterm
|
||||
|
||||
set -g _fdc_special \
|
||||
git-cargo-fish rustup-installer fisher-bootstrap curl-installer fzf-update "" "" paru-build \
|
||||
curl-uv rustup-installer git-cargo-fish fisher-bootstrap curl-installer fzf-update "" "" paru-build \
|
||||
wakatime-binary "" \
|
||||
"" "" "" "" "" "" "" "" "" "" curl-lazydocker "" "" ""
|
||||
end
|
||||
|
||||
@@ -47,6 +47,9 @@ function _fish_deps_install
|
||||
|
||||
# Preferred special methods — listed before system PM so they are the default
|
||||
switch $special
|
||||
case curl-uv
|
||||
set -a methods special-uv
|
||||
set -a method_labels "curl installer (official script)"
|
||||
case git-cargo-fish
|
||||
if type -q cargo; and type -q uv
|
||||
set -a methods special-git-cargo-fish
|
||||
@@ -206,6 +209,20 @@ function _fish_deps_install
|
||||
and makepkg -si --noconfirm
|
||||
and popd
|
||||
rm -rf $_build_dir
|
||||
case special-uv
|
||||
curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
# Add uv to PATH for the rest of this session
|
||||
for _d in "$HOME/.local/bin" "$HOME/.cargo/bin"
|
||||
if test -d "$_d"
|
||||
fish_add_path "$_d"
|
||||
break
|
||||
end
|
||||
end
|
||||
if not type -q uv
|
||||
set_color yellow
|
||||
echo " uv not yet in PATH — restart your shell if subsequent installs fail."
|
||||
set_color normal
|
||||
end
|
||||
case special-git-cargo-fish
|
||||
set -l _tmpdir (mktemp -d)
|
||||
set -l _build_ok 0
|
||||
|
||||
@@ -93,6 +93,15 @@ function _fish_deps_update
|
||||
continue
|
||||
end
|
||||
|
||||
# uv: use built-in self-updater
|
||||
if test "$special" = curl-uv
|
||||
echo "Updating $bin..."
|
||||
uv self update
|
||||
set updated_any 1
|
||||
set i (math $i + 1)
|
||||
continue
|
||||
end
|
||||
|
||||
# fish: prefer build from source via git + cargo; fall back to PM
|
||||
if test "$special" = git-cargo-fish
|
||||
if type -q cargo; and type -q uv
|
||||
|
||||
Reference in New Issue
Block a user