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: neovim:
method: "{{ pkgconfig.neovim.methods[ansible_distribution] | default(pkgconfig.neovim.methods.default) }}" 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: ansible.builtin.set_fact:
neovim: neovim:
method: "{{ neovim.method }}" method: "{{ neovim.method }}"
vers: "v{{ pkgconfig.neovim.version }}"
pkgs: "{{ pkgconfig.neovim.pkgs[ansible_distribution] | default(pkgconfig.neovim.pkgs.default) }}" 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_repo: "{{ pkgconfig.neovim.git_repo }}"
git_path: "{{ d_tempdir.path }}/neovim"
build_type: "{{ pkgconfig.neovim.build_type }}"
- name: Set neovim config for appimage install - name: Set neovim config for appimage install
when: when:

View File

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

View File

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

View File

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