diff --git a/dynamic.nix b/dynamic.nix index d4e75f9..ee45a67 100644 --- a/dynamic.nix +++ b/dynamic.nix @@ -136,6 +136,7 @@ pkgs.mkShell { jq libblst libsodium-vrf + lmdb # required by ouroboros-consensus (cardano-lmdb) secp256k1 yq-go ] diff --git a/flake.nix b/flake.nix index efdba66..8c68cac 100644 --- a/flake.nix +++ b/flake.nix @@ -34,6 +34,13 @@ ''; postFixup = ""; }); + # lmdb uses a plain Makefile (no autoconf), so we strip the .so + # target the same way nixpkgs does for isStatic platforms. + static-lmdb = final.lmdb.overrideAttrs (old: { + postPatch = (old.postPatch or "") + '' + sed 's/^ILIBS\>.*/ILIBS = liblmdb.a/' -i Makefile + ''; + }); }); # nixpkgs defines happy = justStaticExecutables haskellPackages.happy diff --git a/static.nix b/static.nix index 1084cd7..54b2cc4 100644 --- a/static.nix +++ b/static.nix @@ -50,6 +50,7 @@ let tool-version-map = (import ./tool-map.nix) self; --ghc-option=-L${lib.getLib static-libsodium-vrf}/lib \ --ghc-option=-L${lib.getLib static-secp256k1}/lib \ --ghc-option=-L${lib.getLib static-libblst}/lib \ + --ghc-option=-L${lib.getLib static-lmdb}/lib \ --ghc-option=-L${lib.getLib static-openssl}/lib ;; clean|unpack) @@ -136,6 +137,7 @@ pkgs.mkShell (rec { ] ++ lib.optionals withIOG [ static-libblst static-libsodium-vrf + static-lmdb # required by ouroboros-consensus (cardano-lmdb) static-secp256k1 icu # for cardano-cli gh