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

build: support 'nix build' for cometbft archive #16

Merged
merged 2 commits into from
Oct 25, 2024
Merged

Commits on Oct 25, 2024

  1. build: support 'nix build' for cometbft archive

    The existing build.rs script assumes that go has been set up
    sufficiently, and calls out to it to build the static library for
    cometbft for linking against. That's rad, but naively calling out to
    `go build` from inside `nix build` fails, because the rust
    overlay doesn't know anything about golang, and forbids arbitrary
    network calls.
    
    Instead, we'll have to be explicit about preparing the `libcomebft.a` static lib
    as a discrete output, and consuming it as an input in the rust build.
    We can do so by opting in to using a prebuilt lib via env var in the
    `build.rs` script.
    
    This change improves the nix config, making it sufficiently defined to
    perform a `nix build` successfully. Careful attention was given to
    preserving the existing functionality so that `cargo build` will still
    do the right thing, as long as golang is available.
    conorsch committed Oct 25, 2024
    Configuration menu
    Copy the full SHA
    7822463 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fe192f4 View commit details
    Browse the repository at this point in the history