Skip to content

rust: build plutus-ledger-api from a local checkout - #299

Open
Benjmhart wants to merge 1 commit into
stagingfrom
local-plutus-ledger-api
Open

rust: build plutus-ledger-api from a local checkout#299
Benjmhart wants to merge 1 commit into
stagingfrom
local-plutus-ledger-api

Conversation

@Benjmhart

Copy link
Copy Markdown
Member

Removes the crates.io publish round-trip when developing plutus-ledger-api alongside lambda-buffers.

  • flake.nix: new plutus-ledger-api-rust input pointing at a local checkout of mlabs-haskell/plutus-ledger-api-rust.
  • lbt-plutus-rust/build.nix: add its plutus-ledger-api-rust-src and is-plutus-data-derive-rust-src to extraSources, so they land under .extras/plutus-ledger-api-3 and .extras/is-plutus-data-derive-0.
  • lbt-plutus-rust/Cargo.toml: [patch.crates-io] redirects plutus-ledger-api to .extras/plutus-ledger-api-3. Applied at the workspace root, so the generated lbf-* crates under .extras are redirected too and extras/lbf-nix/lbf-rust.nix's versionTable needs no change.
  • Cargo.lock: plutus-ledger-api and is-plutus-data-derive lose their source/checksum and become path entries.

lbt-plutus is the only crate in the repo depending on plutus-ledger-api. Verified with nix build .#lbt-plutus-rust (compiles plutus-ledger-api from .extras) and nix build .#checks.x86_64-linux.lbt-plutus-rust-test (131 passed, 0 failed).

NOTE: the input URL is an absolute developer-local path, so CI cannot build this branch as-is. The CI-safe form is
url = "github:mlabs-haskell/plutus-ledger-api-rust" combined with --override-input plutus-ledger-api-rust path:$PWD/../plutus-ledger-api-rust.

Claude-Session: https://claude.ai/code/session_01WgwCVCPP5z7vPAcfQGA86a

Removes the crates.io publish round-trip when developing plutus-ledger-api
alongside lambda-buffers.

- flake.nix: new `plutus-ledger-api-rust` input pointing at a local checkout
  of mlabs-haskell/plutus-ledger-api-rust.
- lbt-plutus-rust/build.nix: add its `plutus-ledger-api-rust-src` and
  `is-plutus-data-derive-rust-src` to `extraSources`, so they land under
  `.extras/plutus-ledger-api-3` and `.extras/is-plutus-data-derive-0`.
- lbt-plutus-rust/Cargo.toml: `[patch.crates-io]` redirects plutus-ledger-api
  to `.extras/plutus-ledger-api-3`. Applied at the workspace root, so the
  generated lbf-* crates under `.extras` are redirected too and
  `extras/lbf-nix/lbf-rust.nix`'s versionTable needs no change.
- Cargo.lock: plutus-ledger-api and is-plutus-data-derive lose their
  `source`/`checksum` and become path entries.

lbt-plutus is the only crate in the repo depending on plutus-ledger-api.
Verified with `nix build .#lbt-plutus-rust` (compiles plutus-ledger-api from
.extras) and `nix build .#checks.x86_64-linux.lbt-plutus-rust-test`
(131 passed, 0 failed).

NOTE: the input URL is an absolute developer-local path, so CI cannot build
this branch as-is. The CI-safe form is
`url = "github:mlabs-haskell/plutus-ledger-api-rust"` combined with
`--override-input plutus-ledger-api-rust path:$PWD/../plutus-ledger-api-rust`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WgwCVCPP5z7vPAcfQGA86a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant