Skip to content

Update nix dev env, add CI jobs to facilitate maintenance #10316

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

sveitser
Copy link

@sveitser sveitser commented Apr 16, 2025

Motivation

I would like to use the dev env provided by nix to build foundry but it's quite outdated. This PR makes it up to date and automates some of the maintenance.

Solution

Use solc from nixpkgs instead of custom flake. This will at least update solc when it's updated in nixpkgs versus remaining on the same solc version until someone manually edits flake.nix and makes a PR.

Add a CI job to ensure the nix dev env can be used to build foundry. I would like to make it possible to run all the tests too but this would requires more work to track down reasons for the individual test failures.

Example run of CI on my fork: https://github.com/sveitser/foundry/actions/runs/14489873502

I would like to use the dev env provided by nix to build foundry but
it's quite outdated. This PR makes it up to date and automated some of
the maintenance.

Use solc from nixpkgs instead of custom flake. This will at least update
solc when it's updated in nixpkgs versus remaining on the same version
until someone manually edits flake.nix and makes a PR.

Add a CI job to ensure the nix dev env can be used to build foundry. I
would like to make it possible to run all the tests too but this would
requires more work to track down reasons for the invididual test
failures.
@sveitser sveitser marked this pull request as ready for review April 16, 2025 09:37
Copy link
Member

@DaniPopes DaniPopes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM. I would like a review from previous contributors to nix files if possible, cc @beeb @rkrasiuk

Does this PR supersede any/all of the following?

Copy link
Contributor

@beeb beeb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks for the update and CI job!

@sveitser
Copy link
Author

sveitser commented Apr 17, 2025

Does this PR supersede any/all of the following?

* [chore: bump nix inputs and implement tikv-jemalloc-sys build fix #9848](https://github.com/foundry-rs/foundry/pull/9848)

* [nix: add build via crate2nix, simplify dev shell #9260](https://github.com/foundry-rs/foundry/pull/9260)

I think it would be good to set up a CI for it before making the flake more complex. That's also suggested in comments on #9260.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants