zigtools / zls

A Zig language server supporting Zig developers with features like autocomplete and goto definition
MIT License
2.86k stars 290 forks source link

Add a nix binary cache to for ZLS #2034

Closed ethanholz closed 1 week ago

ethanholz commented 1 week ago

Is there any way that we could potentially get a binary cache for the Nix build of ZLS? This would make installation much faster for those using Nix. From a CI perspective, this would require the setup of an action to install Nix, build ZLS, and then cache the derivations into something like cachix.

Techatrix commented 1 week ago

AFAIKT Cachix is unlikely to happen. ZLS provides prebuilt binaries (See https://github.com/zigtools/release-worker/) that need to be accessibly to non Nix users as well. Something similar to https://github.com/mitchellh/zig-overlay can be done to provide these binaries to Nix users.

On the topic of installation time for Nix, the checkPhase could be skipped to save some time running the tests.

ethanholz commented 1 week ago

Doing something like https://github.com/mitchellh/zig-overlay was what I was going to attempt if an official binary cache is not an option. Thanks for the response and I will dig into using the prebuilt binaries!

mocompute commented 6 days ago

@ethanholz If you do such a thing, please share. I also had to disable checkPhase recently because of some error that kept occurring. And there's always a FileNotFound during build, but I haven't investigated.