From 0819d62c32b89c02353c117f19cd1869a3420841 Mon Sep 17 00:00:00 2001 From: Sean D Gillespie Date: Wed, 17 Sep 2025 17:06:01 -0400 Subject: [PATCH 1/2] Add liblmdb to IOG profiles Add the lmdb dev library to IOG profile, since it is required by ouroboros-consensus and cardano-lmdb. It fixes the GitHub build failure: [__2] next goal: cardano-lmdb (dependency of ouroboros-consensus) [__2] rejecting: cardano-lmdb; 0.4.0.3, 0.4.0.2, 0.4.0.1, 0.4.0.0 (conflict: pkg-config package lmdb>=0.9 && <0.10, not found in the pkg-config database) [__2] rejecting: cardano-lmdb-0.3.0.0 (conflict: ouroboros-consensus => cardano-lmdb>=0.4) [__2] fail (backjumping, conflict set: cardano-lmdb, ouroboros-consensus) After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: ouroboros-consensus, cardano-chain-gen, cardano-node, cardano-db-sync, cardano-lmdb Try running with --minimize-conflict-set to improve the error message. Note that I had to copy the postPatch from nixpkgs, since musl64 is not considered a static platform. --- dynamic.nix | 1 + flake.nix | 6 ++++++ static.nix | 1 + 3 files changed, 8 insertions(+) diff --git a/dynamic.nix b/dynamic.nix index 1282e10..06a8d26 100644 --- a/dynamic.nix +++ b/dynamic.nix @@ -124,6 +124,7 @@ pkgs.mkShell { jq libblst libsodium-vrf + lmdb # for cardano-lmdb/ouroboros-consensus secp256k1 yq-go ] diff --git a/flake.nix b/flake.nix index 5a62054..67a9587 100644 --- a/flake.nix +++ b/flake.nix @@ -36,6 +36,12 @@ ''; postFixup = ""; }); + static-lmdb = final.lmdb.overrideDerivation (old: { + # Don't attempt the .so if static, as it would fail. + postPatch = '' + sed 's/^ILIBS\>.*/ILIBS = liblmdb.a/' -i Makefile + ''; + }); }); cddl-tools = (final: prev: { diff --git a/static.nix b/static.nix index 5f91545..1ed6bb2 100644 --- a/static.nix +++ b/static.nix @@ -128,6 +128,7 @@ pkgs.mkShell (rec { static-libblst static-libsodium-vrf static-secp256k1 + static-lmdb # for cardano-lmdb/ouroboros-consensus icu # for cardano-cli gh jq From ef59425b60477398e1b271e84797e505c7be0a72 Mon Sep 17 00:00:00 2001 From: Sean D Gillespie Date: Thu, 25 Sep 2025 15:29:49 -0400 Subject: [PATCH 2/2] Update head hackage cabal repository sha256 This fixes the error: error: hash mismatch in fixed-output derivation '/nix/store/...-head.hackage.ghc.haskell.org.drv': specified: sha256-+hzciiQqWb5oOzQ2JZ2lzJGfGuwA3ZigeWgAQ8Dz+kk= got: sha256-YVcHIBJ8qo2fCBkuRM+vCVVoEEzGcFqNPMukSCBbcJw= --- tool-map.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tool-map.nix b/tool-map.nix index bc5fe54..6904dbe 100644 --- a/tool-map.nix +++ b/tool-map.nix @@ -15,7 +15,7 @@ let f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89 26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d - --sha256: sha256-+hzciiQqWb5oOzQ2JZ2lzJGfGuwA3ZigeWgAQ8Dz+kk= + --sha256: sha256-YVcHIBJ8qo2fCBkuRM+vCVVoEEzGcFqNPMukSCBbcJw= if impl(ghc < 9.13) active-repositories: hackage.haskell.org