Skip to content

Add lmdb to IOG profiles#238

Merged
angerman merged 1 commit into
mainfrom
feature/add-lmdb
Feb 27, 2026
Merged

Add lmdb to IOG profiles#238
angerman merged 1 commit into
mainfrom
feature/add-lmdb

Conversation

@angerman
Copy link
Copy Markdown
Collaborator

Summary

  • Add lmdb to dynamic shell IOG buildInputs (dynamic.nix)
  • Add static-lmdb overlay to flake.nix (static-only build, strips .so target using the same ILIBS Makefile patching that nixpkgs uses for isStatic platforms)
  • Add static-lmdb to static shell IOG buildInputs and wrapped-cabal -L flags (static.nix)

Context

Since UTxO-HD was integrated in Cardano Node 10.4.1, lmdb is required to compile ouroboros-consensus, cardano-node, and cardano-db-sync. The ouroboros-consensus package cardano-lmdb has a pkg-config dependency on lmdb >= 0.9 && < 0.10.

Without lmdb in devx, downstream CI (e.g. cardano-db-sync) resorts to fragile workarounds like nix-env -f '<nixpkgs>' -iA lmdb + manual PKG_CONFIG_PATH injection.

Files changed

File Change
dynamic.nix Add lmdb to withIOG buildInputs
flake.nix Add static-lmdb overlay (static-only via Makefile ILIBS patch)
static.nix Add static-lmdb to withIOG buildInputs + --ghc-option=-L in wrapped-cabal

Test plan

  • nix develop .#ghc96-iog -c pkg-config --modversion lmdb returns 0.9.x
  • nix develop .#ghc96-static-iog -c pkg-config --modversion lmdb returns 0.9.x
  • Hydra CI evaluates successfully on all 3 platforms (x86_64-linux, x86_64-darwin, aarch64-darwin)
  • nix develop .#ghc96-iog -c cabal build cardano-lmdb succeeds in an ouroboros-consensus checkout

Closes #218
Supersedes #221

ouroboros-consensus depends on cardano-lmdb which requires the lmdb
system library (pkg-config: lmdb>=0.9 && <0.10). Since UTxO-HD was
integrated in Cardano Node 10.4.1, lmdb is required for all Cardano
development.

Adds lmdb to dynamic shells and static-lmdb (static-only build via
Makefile ILIBS patching, matching nixpkgs isStatic pattern) to static
shells. The wrapped-cabal in static.nix gets the corresponding -L flag
so GHC finds the static library.

Closes #218
Supersedes #221
@angerman angerman added this pull request to the merge queue Feb 27, 2026
Merged via the queue into main with commit 638bd90 Feb 27, 2026
894 of 899 checks passed
@angerman angerman deleted the feature/add-lmdb branch February 27, 2026 07:11
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.

Add lmdb

1 participant