mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
fix(snap): use packages from the archive for dependencies
All of the dependencies previously specified here are available either in the Ubuntu archive, or as a snap. This commit uses those packages, which takes the complication out of selecting the right binaries per architecture, and also from keeping the version numbers up-to-date. One exception is the `magick` command which doesn't seem to ship in the `imagemagick` package on Ubuntu, so we build from source to ensure it's in-place.
This commit is contained in:
parent
b495f78dfe
commit
bc7d7bf851
2 changed files with 26 additions and 27 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -9,3 +9,5 @@ result-*
|
||||||
|
|
||||||
.idea/
|
.idea/
|
||||||
.vscode/
|
.vscode/
|
||||||
|
|
||||||
|
*.snap
|
||||||
|
|
|
||||||
|
|
@ -23,34 +23,31 @@ parts:
|
||||||
yazi:
|
yazi:
|
||||||
plugin: rust
|
plugin: rust
|
||||||
source: https://github.com/sxyazi/yazi.git
|
source: https://github.com/sxyazi/yazi.git
|
||||||
build-packages:
|
stage-snaps:
|
||||||
- wget
|
- jq
|
||||||
|
stage-packages:
|
||||||
|
- 7zip
|
||||||
|
- fd-find
|
||||||
|
- fzf
|
||||||
|
- ripgrep
|
||||||
|
- zoxide
|
||||||
override-build: |
|
override-build: |
|
||||||
craftctl default
|
craftctl default
|
||||||
craftctl set version=$(git describe --tags --abbrev=0)
|
craftctl set version=$(git describe --tags --abbrev=0)
|
||||||
|
organize:
|
||||||
|
# Ubuntu's `fd` package installs a binary named `fdfind`. Rename it in the snap.
|
||||||
|
usr/bin/fdfind: usr/bin/fd
|
||||||
|
|
||||||
wget ripgrep-14.1.1-aarch64-unknown-linux-gnu.tar.gz
|
# The Ubuntu `imagemagick` package does not ship a `magick` binary,
|
||||||
tar fxz ripgrep-*.tar.gz
|
# which `yazi` looks for. Building the package oursleves yields the
|
||||||
mv ripgrep-*/rg $CRAFT_PART_INSTALL/bin/
|
# expected binary without much overhead, and works across platforms.
|
||||||
|
magick:
|
||||||
wget https://github.com/sharkdp/fd/releases/download/v10.2.0/fd-v10.2.0-aarch64-unknown-linux-gnu.tar.gz
|
plugin: autotools
|
||||||
tar fxz fd-*.tar.gz
|
source: https://imagemagick.org/archive/ImageMagick.tar.gz
|
||||||
mv fd-*/fd $CRAFT_PART_INSTALL/bin/
|
source-type: tar
|
||||||
|
stage-packages:
|
||||||
wget https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-linux-amd64
|
- libgomp1
|
||||||
mv jq-linux-amd64 $CRAFT_PART_INSTALL/bin/jq
|
autotools-configure-parameters:
|
||||||
|
- --prefix=/usr
|
||||||
wget https://imagemagick.org/archive/binaries/magick
|
build-attributes:
|
||||||
mv magick $CRAFT_PART_INSTALL/bin/magick
|
- enable-patchelf
|
||||||
|
|
||||||
wget https://github.com/junegunn/fzf/releases/download/v0.56.2/fzf-0.56.2-linux_amd64.tar.gz
|
|
||||||
tar fxz fzf-*.tar.gz
|
|
||||||
mv fzf $CRAFT_PART_INSTALL/bin/
|
|
||||||
|
|
||||||
wget https://www.7-zip.org/a/7z2408-linux-x64.tar.xz
|
|
||||||
tar fxz 7z*.tar.xz
|
|
||||||
mv 7zz 7zzs $CRAFT_PART_INSTALL/bin/
|
|
||||||
|
|
||||||
wget https://github.com/ajeetdsouza/zoxide/releases/download/v0.9.6/zoxide-0.9.6-x86_64-unknown-linux-musl.tar.gz
|
|
||||||
tar fxz zoxide-*.tar.gz
|
|
||||||
mv zoxide $CRAFT_PART_INSTALL/bin/
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue