jsnjack / grm

An experimental package manager for GitHub Releases
16 stars 2 forks source link

Trouble installing neovim using grm, it cannot find binary path #4

Closed Lilja closed 1 year ago

Lilja commented 1 year ago

The neovim bundle has a file structure like this:

  nvim-macos/bin/nvim                                application/x-mach-binary
  nvim-macos/lib/nvim/parser/c.so                    application/x-mach-binary
  nvim-macos/lib/nvim/parser/help.so                 application/x-mach-binary
  nvim-macos/lib/nvim/parser/lua.so                  application/x-mach-binary
  nvim-macos/lib/nvim/parser/vim.so                  application/x-mach-binary

When I let grm install it, it picked a random .mo file and installed that into /usr/bin:

$ grm install neovim/neovim -f nvim-macos/bin/nvim
Found release stable
Inspecting assets...
Found 2 suitable assets
  0) nvim-macos.tar.gz
  1) nvim-macos.tar.gz.sha256sum
Select suitable asset: [0-1] 0
Selected asset: nvim-macos.tar.gz
 100% |████████████████████████████████████████| (6.2 MB/s) [1s:0s]
Unpacking archive... nvim-macos.tar.gz
Looking for a binary file...
  nvim-macos/bin/nvim                                application/x-mach-binary
  nvim-macos/lib/nvim/parser/c.so                    application/x-mach-binary
  nvim-macos/lib/nvim/parser/help.so                 application/x-mach-binary
  nvim-macos/lib/nvim/parser/lua.so                  application/x-mach-binary
  nvim-macos/lib/nvim/parser/vim.so                  application/x-mach-binary
  nvim-macos/share/locale/af/LC_MESSAGES/nvim.mo     application/octet-stream
  <removed for brevity>
  nvim-macos/share/nvim/runtime/tools/check_colors.vim text/plain; charset=utf-8
  nvim-macos/share/nvim/runtime/tools/emoji_list.vim text/plain; charset=utf-8
  nvim-macos/share/nvim/runtime/tutor/en/vim-01-beginner.tutor text/plain; charset=utf-8
  nvim-macos/share/nvim/runtime/tutor/en/vim-01-beginner.tutor.json application/json
  nvim-macos/share/nvim/runtime/tutor/tutor.tutor    text/plain; charset=utf-8
  nvim-macos/share/nvim/runtime/tutor/tutor.tutor.json application/json
  nvim-macos.tar.gz                                  application/gzip
Installing nvim-macos/share/locale/af/LC_MESSAGES/nvim.mo in /usr/local/bin/...
done

Also, specifying this filter would not really be ideal because if I were to version control it in git, then this wouldn't really work on my linux/WSL machine.

jsnjack commented 1 year ago

I have just tried the build on linux and it worked fine, however, it seems that neovim is not the best package to install with grm as it doesn't come with all dependencies bundled in one binary :/ (the application starts, but complains about missing syntax file). You would probably be better off installing it with appimage file

jsnjack commented 1 year ago

Looks like the fix for https://github.com/jsnjack/grm/issues/5 will allow you to install the correct nvim binary