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 }}"

View File

@@ -1,31 +1,69 @@
neovim:
version: nightly
version: v0.10.4
build_type: Release
git_repo: https://github.com/neovim/neovim
git_branch: nightly
appimage:
base_url: https://github.com/neovim/neovim/releases/download
link_name: nvim
methods:
default: src
AlmaLinux: appimage
Alpine: src
Debian: appimage
Fedora: src
Ubuntu: sys
MacOSX: sys
RedHat: appimage
Rocky: appimage
Ubuntu: src
pkgs:
default:
- neovim
Alpine:
- neovim
Arch:
- neovim
- python-pynvim
RedHat: &rhelbased
- neovim
- python3-neovim
AlmaLinux: *rhelbased
Rocky: *rhelbased
Debian:
- neovim
- python3-neovim
Fedora:
- neovim
- python3-neovim
Ubuntu:
- neovim
- python3-neovim
FreeBSD:
- neovim
- py36-pynvim
build_deps:
RedHat: []
Debian: []
Darwin: []
RedHat:
- cmake
- curl
- gcc
- gettext
- glibc-gconv-extra
- make
- ninja-build
Debian:
- build-essential
- cmake
- curl
- gettext
- ninja-build
Darwin:
- cmake
- curl
- gettext
- ninja
Alpine:
- build-base
- cmake
- libuv-dev
- libuv
- libluv
- lua-luv-dev
- utf8proc-dev
- luajit-dev
- luajit
- lua-lpeg-dev
- unibilium-dev
- coreutils
- curl
- gettext-tiny-dev