Create Flake.nix for Nix users#52
Conversation
|
I would suggest vendoring all go dependencies in I made an attempt at this previously but encountered some issues with one of the dependencies (treesitter I believe). It referenced some |
|
Thanks for the contribution @lambdachad! I have never used Nix before, so I definitely appreciate the advice from @anddani. I'll see if some colleagues can take a look and I'll also see about trying this. Now that we have the tokenizer, I think we might be able to replace tree-sitter with it and remove the dependency, so that might not be a problem in the future. Is there any way we can automate version bumps in Nix? If not, we should also add logic to the release make task to do this. |
| { | ||
| packages.default = pkgs.buildGoModule { | ||
| pname = "dexter"; | ||
| version = "0.6.0"; |
There was a problem hiding this comment.
| version = "0.6.0"; | |
| version = self.shortRev or self.dirtyRev or "dev"; | |
|
Regarding vendoring. When I set I am not familiar with Go so I am not sure what the best course of action would be. I'll see if I can find some examples from other projects. But I think that if you are about to remove the treesitter Go dependency, this won't be a problem anymore. |
|
Yeah this error is why I had to include the modules like I did in the initial example. The tree sitter requires dependencies that aren't included by default. |
|
If tree sitter is removed then the flake.nix becomes really simple and easy to maintain. |
This provides a
flake.nixso Nix users can easily build and instally this library like so:nix build github:remoteoss/dexternix profile install github:remoteoss/dextergithub:remoteoss/dexteras input to flake.nix and installing it with by adding package asdexter.packages.x86_64-linux.default