fix fd and yazi

This commit is contained in:
Matthew Stobbs
2026-04-13 02:46:05 -06:00
parent 0fc65e8008
commit d062a1f372
4 changed files with 80 additions and 68 deletions

View File

@@ -9,6 +9,7 @@
## force_git: _bool_ optional, default true. Force clone, overwriting existing dir ## force_git: _bool_ optional, default true. Force clone, overwriting existing dir
## recursive: _bool_ optional, default true. Do a recursive clone ## recursive: _bool_ optional, default true. Do a recursive clone
## version: _string_ optional, default 'latest'. Version to checkout and build ## version: _string_ optional, default 'latest'. Version to checkout and build
## locked: _bool_ optional, default 'false'
## build_flags: _list[str]_ optional. If set, will append these to the build command ## build_flags: _list[str]_ optional. If set, will append these to the build command
--- ---
- name: Cargo source install helper - name: Cargo source install helper
@@ -24,9 +25,14 @@
ansible.builtin.include_tasks: helpers/git.yml ansible.builtin.include_tasks: helpers/git.yml
- name: Build cargo release - name: Build cargo release
ansible.builtin.command: become: "{{ install_become }}"
chdir: "{{ pkg.source_dir }}" become_user: "{{ install_become_user }}"
argv: "{{ ['cargo', 'build'] + pkg.build_flags }}" community.general.cargo:
directory: "{{ pkg.source_dir }}"
path: "{{ install_prefix }}"
name: "{{ pkg.name }}"
version: "{{ pkg.version }}"
locked: "{{ pkg.locked }}"
- name: Clean existing install - name: Clean existing install
vars: vars:

View File

@@ -34,7 +34,7 @@
block: block:
- name: Queue fd for system install - name: Queue fd for system install
ansible.builtin.set_fact: ansible.builtin.set_fact:
pkg_sys: "{{ pkg_sys + fd.pkgname[os_family] }}" pkg_sys: "{{ pkg_sys + [ fd.pkgname[os_family] ] }}"
- name: Finalise fd system install - name: Finalise fd system install
ansible.builtin.set_fact: ansible.builtin.set_fact:

View File

@@ -2,38 +2,39 @@
--- ---
- name: Configure yazi installation # {{{ - name: Configure yazi installation # {{{
ansible.builtin.set_fact: ansible.builtin.set_fact:
methods: yazi:
- source methods:
version: v26.1.22 - source
git: version: v26.1.22
repo: https://github.com/sxyazi/yazi.git git:
pkgname: yazi repo: https://github.com/sxyazi/yazi.git
pkg_depends: pkgname: yazi
- fd pkg_depends:
- ripgrep - fd
- fzf - ripgrep
- zoxide - fzf
build_depends: - zoxide
RedHat: build_depends:
- ImageMagick RedHat:
- ffmpeg-free - ImageMagick
- file - ffmpeg-free
- jq - file
- oniguruma - jq
- oniguruma-devel - oniguruma
- p7zip-plugins - oniguruma-devel
- poppler - p7zip-plugins
- wl-clipboard - poppler
- "@c-development" - wl-clipboard
- "@development-tools" - "@c-development"
Darwin: - "@development-tools"
- ffmpeg Darwin:
- file - ffmpeg
- imagemagick - file
- jq - imagemagick
- oniguruma - jq
- p7zip - oniguruma
- poppler - p7zip
- poppler
# }}} # }}}
- name: Configure yazi install - name: Configure yazi install
when: when:
@@ -43,40 +44,45 @@
when: when:
- yazi_imethod is undefined - yazi_imethod is undefined
ansible.builtin.set_fact: ansible.builtin.set_fact:
- name: Configure yazi source install yazi_imethod: "{{ imethod if imethod in yazi.methods else yazi.methods[0] }}"
ansible.builtin.set_fact:
yazi_src_install:
cargo_build_flags:
- --release --locked
name: "{{ yazi_pkgname }}"
repo: "{{ yazi_git_repo }}"
version: "{{ yazi_version }}"
bin_output: "target/release/yazi"
bin_name: "yazi"
install_prefix: "{{ install_prefix }}"
install_files:
target/release/ya: bin/ya
files_list:
- bin/yazi
- bin/ya
- name: Set _yazi_configured - name: Configure yazi source install
when:
- yazi_imethod == 'source'
block:
- name: Configure yazi cargo build
ansible.builtin.set_fact:
yazi_src_install:
cargo_build_flags:
- --release --locked
name: "{{ yazi.pkgname }}"
repo: "{{ yazi.git.repo }}"
source_dir: "{{ path_source }}/{{ yazi.pkgname }}"
version: "{{ yazi.version }}"
bin_output: "target/release/yazi"
bin_name: "yazi"
install_prefix: "{{ install_prefix }}"
install_files:
target/release/ya: bin/ya
files_list:
- bin/yazi
- bin/ya
- name: Append yazi-fm pkg_deps
loop: "{{ yazi.pkg_depends }}"
loop_control:
loop_var: dep
ansible.builtin.include_tasks: "pkgs/{{ dep }}.yml"
- name: Append yazi to pkg_cargo_build
ansible.builtin.set_fact:
pkg_sys: "{{ pkg_sys + yazi.build_depends[ansible_os_family] }}"
pkg_cargo_build: "{{ pkg_cargo + [ yazi_src_install ] }}"
yazi_install: "{{ yazi_imethod }}={{ yazi_src_install }}"
- name: Finalise yazi configuration
when: when:
- __yazi_configured is undefined or - __yazi_configured is undefined or
not __yazi_configured not __yazi_configured
ansible.builtin.set_fact: ansible.builtin.set_fact:
__yazi_configured: true __yazi_configured: true
- name: Append yazi-fm pkg_deps
loop: "{{ yazi_pkg_depends }}"
loop_control:
loop_var: yazi_pkg_dep
vars:
pkg: "{{ yazi_pkg_dep }}"
ansible.builtin.include_tasks:
file: "helpers/addpkg.yml"
- name: Append yazi to pkg_cargo_build
ansible.builtin.set_fact:
pkg_sys: "{{ pkg_sys + yazi_build_depends[ansible_os_family] }}"
pkg_cargo_build: "{{ pkg_cargo + yazi_src_install }}"

View File

@@ -54,7 +54,7 @@ path_profile:
neovim_version: master neovim_version: master
neovim_build_type: Release neovim_build_type: Release
# }}} # }}}
# {{{ nerdfonts # {{{ nerdfonts
nerdfonts_install_list: nerdfonts_install_list:
- JetBrainsMono - JetBrainsMono
- FiraCode - FiraCode