configure neovim properly for building

This commit is contained in:
Matthew Stobbs
2025-03-16 17:38:54 -06:00
parent efd62e94eb
commit 43f539253f
4 changed files with 73 additions and 20 deletions

View File

@@ -5,13 +5,25 @@
neovim:
method: "{{ pkgconfig.neovim.methods[ansible_distribution] | default(pkgconfig.neovim.methods.default) }}"
- name: Set neovim config
- name: Set neovim sys package manager config
when:
- neovim.method == 'sys'
ansible.builtin.set_fact:
neovim:
method: "{{ neovim.method }}"
vers: "v{{ pkgconfig.neovim.version }}"
pkgs: "{{ pkgconfig.neovim.pkgs[ansible_distribution] | default(pkgconfig.neovim.pkgs.default) }}"
- name: Set neovim src build config
when:
- neovim.method == 'src'
ansible.builtin.set_fact:
neovim:
method: "{{ neovim.method }}"
vers: "{{ pkgconfig.neovim.git_branch }}"
build_deps: "{{ pkgconfig.neovim.build_deps[ansible_os_family] }}"
git_repo: "{{ pkgconfig.neovim.git_repo }}"
git_path: "{{ d_tempdir.path }}/neovim"
build_type: "{{ pkgconfig.neovim.build_type }}"
- name: Set neovim config for appimage install
when:

View File

@@ -24,6 +24,7 @@
when:
- neovim.method == 'src'
ansible.builtin.set_fact:
pkg_sys: "{{ pkg_sys + neovim.build_deps }}"
pkg_src: "{{ pkg_src + ['neovim'] }}"
- name: Set neovim_configured

View File

@@ -3,15 +3,17 @@
- name: Clone neovim git repository
ansible.builtin.git:
depth: 1
dest: "{{ d_tempdir.path }}/neovim"
dest: "{{ neovim.git_path }}"
repo: "{{ neovim.git_repo }}"
version: "{{ neovim.vers }}"
recursive: true
- name: Build and install neovim
become: "{{ ext_become }}"
ansible.builtin.make:
chdir: "{{ d_tempdir.path }}/neovim"
community.general.make:
chdir: "{{ neovim.git_path }}"
params:
CMAKE_BUILD_TYPE: "{{ neovim.build_type }}"
CMAKE_INSTALL_PREFIX: "{{ path.prefix }}"
CMAKE_EXTRA_FLAGS: "-DCMAKE_INSTALL_PREFIX={{ path.prefix }}"
target: install
jobs: "{{ ansible_processor_nproc | int }}"