Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NixOS support #906

Merged
merged 32 commits into from
Aug 19, 2023
Merged

NixOS support #906

merged 32 commits into from
Aug 19, 2023

Conversation

misumisumi
Copy link
Collaborator

@misumisumi misumisumi commented Jul 28, 2023

  • TSInstall all installs and builds all treesitter
  • Binaries installed with mason.nvim work
    • checked lua-language-server, pylsp, marksman.
    • Need to check for all binary packages? (maybe checking their dependencies instead, see below)
  • Can build from sources installed with mason.nvim
    • Some packages have no upstream problem or identification of the cause. detail
  • wiki needs NixOS support description

@misumisumi misumisumi changed the title Nixos support using mason Nixos support Jul 28, 2023
@misumisumi misumisumi changed the title Nixos support NixOS support Jul 28, 2023
neovim-remote
ripgrep
sqlite
xclip
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not everyone are using desktop under X11, maybe it should be 2 options withWaylandClipboard (boolean) and withX11Clipboard (boolean) or withClipboard (string: 'wayland'|'x11').
Besides, most of the desktop users have already installed the related clipboard tools to their desktop as NeoVim is not the only program which need its support, so maybe it's also not necessary to install them at here, inside a NeoVim configuration.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your review.
It is certainly so. It contained settings tailored to my environment.
As you can see from doc there are many options, so I won't support them here.
Note about the clipboard should be documented in the wiki.

@Jint-lzxy
Copy link
Collaborator

Need to check for all binary packages?

IMO it's unnecessary to check all those packages, it takes too much time as well as ur disk space. After #886 (comment), I installed all those packages on an external disk and dumped their dependencies using otool. I just did some sed-, sort- and uniqing, and these are the dependencies required by existing Mason packages (excluding dependencies managed by those "install mediums"):

libamd     <==> https://github.com/zship/libamd
libc       <==> https://www.gnu.org/software/libc/
  [OR] libc++ <==> https://libcxx.llvm.org/
libevent   <==> https://libevent.org/
libiconv   <==> https://www.gnu.org/software/libiconv/
libmsgpack <==> http://msgpack.org/
libz       <==> https://www.zlib.net/
libzstd    <==> https://github.com/facebook/zstd

FWIW this is actually similar to the compiling Treesitter's parsers, as long as all those dependencies are satisfied (and the dynamic linker is properly initialized), these executables should run with ease :D

@misumisumi
Copy link
Collaborator Author

misumisumi commented Jul 28, 2023

IMO it's unnecessary to check all those packages, it takes too much time as well as ur disk space.

I understand remove from task

At least the LSP and Debugger, which were installed by default, have been built and verified.
We've made it possible to optionally include dependencies for the behavior of other packages, so you should be able to investigate and respond to them yourself.
It is enough to describe the method of investigation on the wiki.

@Jint-lzxy
Copy link
Collaborator

We've made it possible to optionally include dependencies for the behavior of other packages, so you should be able to investigate and respond to them yourself.
It is enough to describe the method of investigation on the wiki.

I think the same applies to "Some packages have no upstream problem or identification of the cause" too. If one really needs these individual builds, he can further tweak the base config to make that work (and usually they have such environment setup so fixing this won't be that difficult).

@misumisumi
Copy link
Collaborator Author

I understand Mark as completed.
Where should I submit a PR for the wiki description?
I'll post the base here if only admins can edit it.

@ayamir
Copy link
Owner

ayamir commented Jul 28, 2023

I'll post the base here if only admins can edit it.

You can edit it too.

@Jint-lzxy
Copy link
Collaborator

Where should I submit a PR for the wiki description?
I'll post the base here if only admins can edit it.

I remember last year we did tweak those wiki pages so that everyone can edit them. But if ur patch contains a lot of additions, it would be better to open an issue where we could do some proofreading before adding this (like #185).

@misumisumi
Copy link
Collaborator Author

yes.
Since this was created as a module for home-manager, it can also be used in nix-darwin as long as general user settings are configured with home-manager.

Copy link
Collaborator

@aarnphm aarnphm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be cool to also make this flake.nix compatible on darwin as well.

nixos/neovim/default.nix Show resolved Hide resolved
nixos/default.nix Show resolved Hide resolved
@aarnphm
Copy link
Collaborator

aarnphm commented Aug 9, 2023

yes. Since this was created as a module for home-manager, it can also be used in nix-darwin as long as general user settings are configured with home-manager.

need to migrate my setup to home-manager 😄

nixos/neovim/default.nix Outdated Show resolved Hide resolved
@ayamir
Copy link
Owner

ayamir commented Aug 18, 2023

Can it be merged?

@misumisumi
Copy link
Collaborator Author

Yeah.
After checking at hand, you can merge to main without conflict.

Copy link
Collaborator

@aarnphm aarnphm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I thought I submitted my review 😄 LGTM

nixos/neovim/default.nix Outdated Show resolved Hide resolved
@Jint-lzxy
Copy link
Collaborator

I'll merge this after updating the docs :-) Thanks again for all the work here!

Copy link
Collaborator

@Jint-lzxy Jint-lzxy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I will merge this if u think the Wiki Page is good (I made some minor modifications) 😄

cc @misumisumi @vollowx

This was linked to issues Aug 19, 2023
@vollowx
Copy link

vollowx commented Aug 19, 2023

The link here should be updated as it may change in the future. Others are enough in my use case. 👍

@Jint-lzxy
Copy link
Collaborator

The link here should be updated as it may change in the future.

I will update this (using permalinks) after merging this PR, cause we currently don't have the stub for this file in the source tree :D

@misumisumi
Copy link
Collaborator Author

LGTM😄

@Jint-lzxy Jint-lzxy merged commit 3a51040 into ayamir:main Aug 19, 2023
2 checks passed
@misumisumi misumisumi deleted the nixos-support-using-mason branch August 28, 2023 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[doc] Add NixOS and home-manager entry to wiki NixOS support
6 participants