You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a developer on the MPC project, I need to install several tools and system programs to be able to compile the project and do CI checks.
For example the clang version in the project needs to be < 20, otherwise the contract includes op codes not supported by the near runtime.
To make it easier to set up a working developer environment to work on the MPC project we should add support for nix shells which will create reproducible environments.
Furthremore, we also want to have reproducible CI checks locally, so these checks are great targets to nixify.
I have been suffering the clang issue since I started, so I can share the solution I ended up using. I found a tool https://direnv.net/ which together with the file .envrc at the repo root:
fixed my issues. Much easier than using nix, although it does not solve the issue of the CI checks tooling version missmatches. For those I simply install the correct version using cargo-binstall, which can be done in a special folder for the MPC project as well.
Anyway I am not against using nix here, but would probably not use it myself as it would add a lot of complexity.
Edit. The nix setup already works great, and the last issues are questionable. Closing this tracking issue and we'll keep the CI migration open for a while to consider it but there's a high probability we won't use nix in our CI.
Activity
gilcu3 commentedon Jan 12, 2026
I have been suffering the clang issue since I started, so I can share the solution I ended up using. I found a tool https://direnv.net/ which together with the file
.envrcat the repo root:fixed my issues. Much easier than using nix, although it does not solve the issue of the CI checks tooling version missmatches. For those I simply install the correct version using cargo-binstall, which can be done in a special folder for the MPC project as well.
Anyway I am not against using nix here, but would probably not use it myself as it would add a lot of complexity.
DSharifi commentedon Jan 12, 2026
Yes, I'm not intending to make it enforced. Just a way for those who want to use it to set up a dev env that's reproducible.
netrome commentedon Jan 12, 2026
Nice! This might also help new developers get up to speed fast.
[-]add nix shell support[/-][+]Nixify the MPC project[/+].envrcfile for nix devenv #1768netrome commentedon Mar 23, 2026
Still relevant.
netrome commentedon Mar 23, 2026
Edit. The nix setup already works great, and the last issues are questionable. Closing this tracking issue and we'll keep the CI migration open for a while to consider it but there's a high probability we won't use nix in our CI.