fix fd and yazi
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
## force_git: _bool_ optional, default true. Force clone, overwriting existing dir
|
||||
## recursive: _bool_ optional, default true. Do a recursive clone
|
||||
## 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
|
||||
---
|
||||
- name: Cargo source install helper
|
||||
@@ -24,9 +25,14 @@
|
||||
ansible.builtin.include_tasks: helpers/git.yml
|
||||
|
||||
- name: Build cargo release
|
||||
ansible.builtin.command:
|
||||
chdir: "{{ pkg.source_dir }}"
|
||||
argv: "{{ ['cargo', 'build'] + pkg.build_flags }}"
|
||||
become: "{{ install_become }}"
|
||||
become_user: "{{ install_become_user }}"
|
||||
community.general.cargo:
|
||||
directory: "{{ pkg.source_dir }}"
|
||||
path: "{{ install_prefix }}"
|
||||
name: "{{ pkg.name }}"
|
||||
version: "{{ pkg.version }}"
|
||||
locked: "{{ pkg.locked }}"
|
||||
|
||||
- name: Clean existing install
|
||||
vars:
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
block:
|
||||
- name: Queue fd for system install
|
||||
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
|
||||
ansible.builtin.set_fact:
|
||||
|
||||
@@ -2,38 +2,39 @@
|
||||
---
|
||||
- name: Configure yazi installation # {{{
|
||||
ansible.builtin.set_fact:
|
||||
methods:
|
||||
- source
|
||||
version: v26.1.22
|
||||
git:
|
||||
repo: https://github.com/sxyazi/yazi.git
|
||||
pkgname: yazi
|
||||
pkg_depends:
|
||||
- fd
|
||||
- ripgrep
|
||||
- fzf
|
||||
- zoxide
|
||||
build_depends:
|
||||
RedHat:
|
||||
- ImageMagick
|
||||
- ffmpeg-free
|
||||
- file
|
||||
- jq
|
||||
- oniguruma
|
||||
- oniguruma-devel
|
||||
- p7zip-plugins
|
||||
- poppler
|
||||
- wl-clipboard
|
||||
- "@c-development"
|
||||
- "@development-tools"
|
||||
Darwin:
|
||||
- ffmpeg
|
||||
- file
|
||||
- imagemagick
|
||||
- jq
|
||||
- oniguruma
|
||||
- p7zip
|
||||
- poppler
|
||||
yazi:
|
||||
methods:
|
||||
- source
|
||||
version: v26.1.22
|
||||
git:
|
||||
repo: https://github.com/sxyazi/yazi.git
|
||||
pkgname: yazi
|
||||
pkg_depends:
|
||||
- fd
|
||||
- ripgrep
|
||||
- fzf
|
||||
- zoxide
|
||||
build_depends:
|
||||
RedHat:
|
||||
- ImageMagick
|
||||
- ffmpeg-free
|
||||
- file
|
||||
- jq
|
||||
- oniguruma
|
||||
- oniguruma-devel
|
||||
- p7zip-plugins
|
||||
- poppler
|
||||
- wl-clipboard
|
||||
- "@c-development"
|
||||
- "@development-tools"
|
||||
Darwin:
|
||||
- ffmpeg
|
||||
- file
|
||||
- imagemagick
|
||||
- jq
|
||||
- oniguruma
|
||||
- p7zip
|
||||
- poppler
|
||||
# }}}
|
||||
- name: Configure yazi install
|
||||
when:
|
||||
@@ -43,40 +44,45 @@
|
||||
when:
|
||||
- yazi_imethod is undefined
|
||||
ansible.builtin.set_fact:
|
||||
- name: Configure yazi source install
|
||||
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
|
||||
yazi_imethod: "{{ imethod if imethod in yazi.methods else yazi.methods[0] }}"
|
||||
|
||||
- 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:
|
||||
- __yazi_configured is undefined or
|
||||
not __yazi_configured
|
||||
ansible.builtin.set_fact:
|
||||
__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 }}"
|
||||
|
||||
Reference in New Issue
Block a user