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:
@@ -257,7 +257,7 @@ rm -f file.txt # Falls through to standard rm -f
|
|||||||
Install method priority: **git+cargo source build** (fish) → **cargo** (other Rust tools, gets latest crate) → **system PM** (paru/apt/brew/etc.) → **git clone** (fzf) → **curl installer** (starship, fisher) → **pipx** (Python tools). When multiple methods are available for a tool, you are prompted to choose.
|
Install method priority: **git+cargo source build** (fish) → **cargo** (other Rust tools, gets latest crate) → **system PM** (paru/apt/brew/etc.) → **git clone** (fzf) → **curl installer** (starship, fisher) → **pipx** (Python tools). When multiple methods are available for a tool, you are prompted to choose.
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> Upgrading Fish from source requires **cargo** and **[uv](https://docs.astral.sh/uv/)**. If either is missing, `fish-deps install`/`update` will fall back to the system package manager instead.
|
> Upgrading Fish from source requires **cargo** and **[uv](https://docs.astral.sh/uv/)**. Both are managed dependencies — `fish-deps install` will offer to install them before attempting the Fish build. If both are unavailable, `fish-deps update` falls back to the system package manager.
|
||||||
|
|
||||||
### Docker
|
### Docker
|
||||||
|
|
||||||
@@ -496,6 +496,8 @@ Named context shortcuts (e.g. `dcr`, `dck`) live in `~/.config/.user-dots/fish/l
|
|||||||
|
|
||||||
| Tool | Version | Purpose |
|
| Tool | Version | Purpose |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|
| [uv](https://docs.astral.sh/uv/) | any | Python runner (needed to build Fish from source) |
|
||||||
|
| [Rust / cargo](https://www.rust-lang.org/tools/install) | any | Installs Rust-based tools; required to build Fish |
|
||||||
| [Fish](https://fishshell.com/) | **≥ 4.0** | Shell |
|
| [Fish](https://fishshell.com/) | **≥ 4.0** | Shell |
|
||||||
| [Fisher](https://github.com/jorgebucaran/fisher) | any | Plugin manager |
|
| [Fisher](https://github.com/jorgebucaran/fisher) | any | Plugin manager |
|
||||||
| [Starship](https://starship.rs/) | any | Prompt |
|
| [Starship](https://starship.rs/) | any | Prompt |
|
||||||
@@ -505,7 +507,7 @@ Named context shortcuts (e.g. `dcr`, `dck`) live in `~/.config/.user-dots/fish/l
|
|||||||
|
|
||||||
> [!WARNING]
|
> [!WARNING]
|
||||||
> Fish **4.0 or newer is required.** This config uses `test` syntax and other constructs that are incompatible with Fish 3.x. Older versions will produce errors on startup.
|
> Fish **4.0 or newer is required.** This config uses `test` syntax and other constructs that are incompatible with Fish 3.x. Older versions will produce errors on startup.
|
||||||
> If you are on an older Fish, run `fish-deps install` or `fish-deps update` — it will build and install the latest Fish from source using git + cargo (requires cargo and uv).
|
> Run `fish-deps install` or `fish-deps update` to upgrade — it will install `uv` and `cargo` automatically if missing, then build the latest Fish from source.
|
||||||
|
|
||||||
### Recommended
|
### Recommended
|
||||||
|
|
||||||
|
|||||||
@@ -11,32 +11,32 @@
|
|||||||
# _fdc_pm — system PM package name, or "" if not in repos
|
# _fdc_pm — system PM package name, or "" if not in repos
|
||||||
# _fdc_special — special install key: rustup-installer | fisher-bootstrap |
|
# _fdc_special — special install key: rustup-installer | fisher-bootstrap |
|
||||||
# fzf-update | paru-build | pipx | curl-installer |
|
# 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
|
function _fish_deps_catalog
|
||||||
set -g _fdc_bins \
|
set -g _fdc_bins \
|
||||||
fish cargo fisher starship fzf zoxide direnv paru \
|
uv cargo fish fisher starship fzf zoxide direnv paru \
|
||||||
wakatime tailscale \
|
wakatime tailscale \
|
||||||
eza lsd bat btop dust duf prettyping most rg lazygit lazydocker trash kitty wezterm
|
eza lsd bat btop dust duf prettyping most rg lazygit lazydocker trash kitty wezterm
|
||||||
|
|
||||||
set -g _fdc_tiers \
|
set -g _fdc_tiers \
|
||||||
req req req req req req req rec \
|
req req req req req req req req rec \
|
||||||
int int \
|
int int \
|
||||||
rec rec rec rec rec rec rec rec rec rec rec rec rec rec
|
rec rec rec rec rec rec rec rec rec rec rec rec rec rec
|
||||||
|
|
||||||
set -g _fdc_cargo \
|
set -g _fdc_cargo \
|
||||||
"" "" "" starship "" zoxide "" "" \
|
"" "" "" "" starship "" zoxide "" "" \
|
||||||
"" "" \
|
"" "" \
|
||||||
eza lsd bat "" du-dust "" "" "" ripgrep "" "" trashy "" ""
|
eza lsd bat "" du-dust "" "" "" ripgrep "" "" trashy "" ""
|
||||||
|
|
||||||
set -g _fdc_pm \
|
set -g _fdc_pm \
|
||||||
fish cargo "" starship fzf zoxide direnv "" \
|
uv cargo fish "" starship fzf zoxide direnv "" \
|
||||||
wakatime tailscale \
|
wakatime tailscale \
|
||||||
eza lsd bat btop dust duf prettyping most ripgrep lazygit lazydocker trash kitty wezterm
|
eza lsd bat btop dust duf prettyping most ripgrep lazygit lazydocker trash kitty wezterm
|
||||||
|
|
||||||
set -g _fdc_special \
|
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 "" \
|
wakatime-binary "" \
|
||||||
"" "" "" "" "" "" "" "" "" "" curl-lazydocker "" "" ""
|
"" "" "" "" "" "" "" "" "" "" curl-lazydocker "" "" ""
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -47,6 +47,9 @@ function _fish_deps_install
|
|||||||
|
|
||||||
# Preferred special methods — listed before system PM so they are the default
|
# Preferred special methods — listed before system PM so they are the default
|
||||||
switch $special
|
switch $special
|
||||||
|
case curl-uv
|
||||||
|
set -a methods special-uv
|
||||||
|
set -a method_labels "curl installer (official script)"
|
||||||
case git-cargo-fish
|
case git-cargo-fish
|
||||||
if type -q cargo; and type -q uv
|
if type -q cargo; and type -q uv
|
||||||
set -a methods special-git-cargo-fish
|
set -a methods special-git-cargo-fish
|
||||||
@@ -206,6 +209,20 @@ function _fish_deps_install
|
|||||||
and makepkg -si --noconfirm
|
and makepkg -si --noconfirm
|
||||||
and popd
|
and popd
|
||||||
rm -rf $_build_dir
|
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
|
case special-git-cargo-fish
|
||||||
set -l _tmpdir (mktemp -d)
|
set -l _tmpdir (mktemp -d)
|
||||||
set -l _build_ok 0
|
set -l _build_ok 0
|
||||||
|
|||||||
@@ -93,6 +93,15 @@ function _fish_deps_update
|
|||||||
continue
|
continue
|
||||||
end
|
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
|
# fish: prefer build from source via git + cargo; fall back to PM
|
||||||
if test "$special" = git-cargo-fish
|
if test "$special" = git-cargo-fish
|
||||||
if type -q cargo; and type -q uv
|
if type -q cargo; and type -q uv
|
||||||
|
|||||||
Reference in New Issue
Block a user