Conversation
|
I am not a fan of adding specific configuration for each distros :/ |
Well most of the patch only eases Nix integration (not NixOS), which aside of being a package manager, also serves as a development environment manager with flakes (so exactly that kind of use case) Also, the patch of I understand that is a kind of arbitrary addition to the repository, but I think providing a simple way to build the project for newcomers and potential contributors is in our interest, even if it is something else than nix flakes |
| @@ -0,0 +1,5 @@ | |||
| if ! has nix_direnv_version || ! nix_direnv_version 3.0.6; then | |||
There was a problem hiding this comment.
i don't like the hardcoded versions here?
is there a better way?
or can we just land flake.nix ?
There was a problem hiding this comment.
To explain what's going on, direnv naturally supports the use flake directive. However, with the default implementation, we are doomed to re-computing the flake each time we get in/out of the directory.
This line allows to use an implementation that is made by the nix community and which caches the flake's build.
As for the version check, I guess we could remove it. I'm not very familiar with the previous versions, so I don't really know what this will imply.
|
GNU testsuite comparison: |
f07db1b to
8e42ecb
Compare
|
GNU testsuite comparison: |
8e42ecb to
8fd4e1c
Compare
|
GNU testsuite comparison: |
|
Coming back to this PR, I am not sure this is useful if barely anyone makes use of Nix for handling the project environment. However, I feel like having a streamlined, easy to setup, replicatable development environment would greatly improve contributors' lives, and maybe make it more accessible to new comers. If Nix is not a popular enough solution, I suggest we could setup a devcontainer which may be more widespread among the community. WDYT @sylvestre ? |
|
ok, let's do it |
|
@RenjiSann I noticed that you used |
|
That's right, though in a second thought, it may not be ideal 😅 Feel free to open a PR to change that :) |
I don't really know if this has its place here, but I've been using a nix flake to setup my dev environment for a while, and I thought I might share it here, and maybe integrate it to the main branch if it's coherent.
To make use of these scripts, you'll first need to install the Nix package manager (instructions)
Then, install the
direnvpackage from your preferred distro (instructions)Once that's done, open a shell and type
in the repository. The initial setup will take 1-2min.
After that, your environment will be instantly loaded every time you
cdto this folder !I note that for rust-analyzer to work in VS Code, I installed the
direnvextension, which allows VS Code to load the.envrc.