elvish icon indicating copy to clipboard operation
elvish copied to clipboard

CI configs: add nix flake

Open aca opened this issue 1 year ago • 1 comments

elvish is already packaged in nix, but adding flake file in the project can provide reproducible build, develop environment. And helpful for someone who wants to package any version of elvish they want (nightly build or even fork..).

aca avatar May 25 '24 09:05 aca

Hi, sorry for not getting to this. I've wanted to try Nix for a while, so I've been sitting on this PR thinking that I'd get to it once I learned enough Nix to understand what's going on. But it's taken a bit too long, so I thought I should at least post a response.

I try to ensure that I can maintain the entire Elvish codebase, so in general I don't accept code that I don't fully understand unless there's a very compelling reason to do so. Can you tell me:

  • I see there's already an Elvish package in nixpkgs. What's the relationship between it and this PR?

  • Can the files in the PR reasonably live in a separate repo?

xiaq avatar Sep 26 '24 20:09 xiaq

Nix definition declared inside nixpkgs has fixed reference (official elvish release version) of elvish.

With flake.nix inside the project, any user who have nix package manager installed (not nixOS) can test nightly verison of elvish with single command. nix run "github:elvish/elvish/master#elvish"

Elvish developer can also have fixed development environment with flake.nix

git clone https://github.com/elves/elvish && cd elvish 
nix develop # which can be automated with direnv

Will install all dependanices like go, gopls, gofumpt and so on.

I've found some go project like templ which uses nix extensively.

nix-community maintains flake in seperate repo for some projects like https://github.com/nix-community/neovim-nightly-overlay But reason this repository exists is solely to provide the lately version of the binary.

aca avatar Dec 10 '24 08:12 aca

Thanks. I made some updates on the branch itself.

xiaq avatar Jan 03 '25 19:01 xiaq