Skip to content
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

Enhance Nix packaging to build the crates and CometBFT #4145

Merged
merged 11 commits into from
Apr 2, 2024
Merged

Conversation

plaidfinch
Copy link
Collaborator

@plaidfinch plaidfinch commented Apr 2, 2024

Describe your changes

This PR enhances the Nix flake with additional derivations to build Penumbra's binaries and also CometBFT at the correctly compatible version.

Do nix build to build everything. Targets are: .#cometbft, .#pd, .#pcli, and .#pclientd.

Do nix develop to jump into a shell with everything set up (requires flake support to be turned on in your nix install).

Checklist before requesting a review

  • If this code contains consensus-breaking changes, I have added the "consensus-breaking" label. Otherwise, I declare my belief that there are not consensus-breaking changes, for the following reason:

    This is just adding a Nix derivation for building Penumbra.

@cratelyn cratelyn added the A-tooling Area: developer tooling for building Penumbra itself label Apr 2, 2024
Copy link
Contributor

@cratelyn cratelyn left a comment

Choose a reason for hiding this comment

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

this was such a pleasure to review. thank you for doing this, @plaidfinch. this is really lovely work that will likely pay some dividends for ease of deployment, and it's almost certainly going to make my day-to-day life better too.

i have some assorted notes below, but the point about pinning to a specific rust toolchain version is the one i am most interested in answering. the other notes are mostly requests for comments; flake files feel a little magical sometimes, and it'd be good to be particularly explicit about intent/purpose.

flake.nix Show resolved Hide resolved
flake.nix Outdated Show resolved Hide resolved
flake.nix Show resolved Hide resolved
flake.nix Outdated Show resolved Hide resolved
.envrc Outdated Show resolved Hide resolved
Copy link
Contributor

@conorsch conorsch 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 taking the time. I'm not yet using a nix shell, but more comprehensive coverage like this makes it enticing.

.envrc Outdated Show resolved Hide resolved
.gitignore Show resolved Hide resolved
Copy link
Contributor

@cratelyn cratelyn left a comment

Choose a reason for hiding this comment

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

this is tremendous work, thank you! 🎉

@cratelyn
Copy link
Contributor

cratelyn commented Apr 2, 2024

   thread 'main' panicked at crates/crypto/proof-params/build.rs:37:18:
  called `Result::unwrap()` on an `Err` value: "error downloading proving key: can download proving key: can get bytes from file: error decoding response body: operation timed out: operation timed out"

this seems like it is likely to be spurious, but otherwise this all LGTM! i've kicked off another run of the rustdoc-lint job.

@conorsch conorsch merged commit d7ef8f0 into main Apr 2, 2024
7 checks passed
@conorsch conorsch deleted the nix-packaging branch April 2, 2024 17:59
conorsch added a commit that referenced this pull request Apr 3, 2024
Docs builds broke after merge of [0], not because its settings were
incompatible, but because its inclusion of a `rust-toolchain.toml` file
busted the CI cache, and caused the `mdbook` dep to be freshly
installed, rather than retrieved from cache. We don't version-lock
mdbook and friends, and the latest version evidently bumped MSRV to
1.74, which is newer than what we set for MSRV. We should probably bump
MSRV too, but I'll do that separately. This commit is to unbreak the
docs builds.

[0] #4145
conorsch added a commit that referenced this pull request Apr 3, 2024
Docs builds broke after merge of [0], not because its settings were
incompatible, but because its inclusion of a `rust-toolchain.toml` file
busted the CI cache, and caused the `mdbook` dep to be freshly
installed, rather than retrieved from cache. We don't version-lock
mdbook and friends, and the latest version evidently bumped MSRV to
1.74, which is newer than what we set for MSRV. We should probably bump
MSRV too, but I'll do that separately. This commit is to unbreak the
docs builds.

[0] #4145
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tooling Area: developer tooling for building Penumbra itself
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants