diff options
-rw-r--r-- | snap/snapcraft.yaml | 35 |
1 files changed, 24 insertions, 11 deletions
diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 81ffb9adf3..e85c269f6b 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,5 +1,6 @@ -name: neovim -version: git +name: nvim +base: core18 +adopt-info: nvim summary: Vim-fork focused on extensibility and agility. description: | Neovim is a project that seeks to aggressively refactor Vim in order to: @@ -9,22 +10,33 @@ description: | Enable the implementation of new/modern user interfaces without any modifications to the core source Improve extensibility with a new plugin architecture For lots more details, see the wiki! + +grade: stable # must be 'stable' to release into candidate/stable channels confinement: classic apps: - neovim: - command: usr/local/bin/nvim - plugs: [network, network-bind, x11] + nvim: + command: usr/bin/nvim environment: HOME: /home/$USER - VIM: $SNAP/usr/local/share/nvim/runtime + VIM: $SNAP/usr/share/nvim/runtime parts: - neovim: + nvim: source: . + override-pull: | + snapcraftctl pull + major="$(awk '/NVIM_VERSION_MAJOR/{gsub(")","",$2); print $2}' CMakeLists.txt)" + minor="$(awk '/NVIM_VERSION_MINOR/{gsub(")","",$2); print $2}' CMakeLists.txt)" + patch="$(awk '/NVIM_VERSION_PATCH/{gsub(")","",$2); print $2}' CMakeLists.txt)" + version_prefix="v$major.$minor.$patch" + git_described="$(git describe --first-parent --dirty 2> /dev/null | perl -lpe 's/v\d.\d.\d-//g')" + git_described="${git_described:-$(git describe --first-parent --tags --always --dirty)}" + snapcraftctl set-version "${version_prefix}-${git_described}" plugin: make make-parameters: - CMAKE_BUILD_TYPE=Release + - CMAKE_INSTALL_PREFIX=/usr build-packages: - ninja-build - libtool @@ -33,9 +45,10 @@ parts: - automake - cmake - g++ + - git + - gettext - pkg-config - unzip - snap: - - usr/local/bin - - usr/local/share/nvim - - -usr/local/share/man + prime: + - -usr/share/man + |