Skip to content

Commit efa4de0

Browse files
committed
Add new required dependencies for cardano-node 10.7
Add the following new dependencies: * snappy (cardano-rpc) * protobuf (cardano-rpc) * liburing (lmdb)
1 parent a621faa commit efa4de0

2 files changed

Lines changed: 22 additions & 5 deletions

File tree

flake.nix

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
static-openssl = (final.openssl.override { static = true; });
2626
static-zlib = final.zlib.override { shared = false; };
2727
static-pcre = final.pcre.override { shared = false; };
28+
static-snappy = final.snappy.override { static = true; };
2829
static-libblst = final.libblst.overrideDerivation (old: {
2930
configureFlags = old.configureFlags ++ [ "--enable-static" "--disable-shared" ];
3031
buildPhase = ''
@@ -41,6 +42,22 @@
4142
sed 's/^ILIBS\>.*/ILIBS = liblmdb.a/' -i Makefile
4243
'';
4344
});
45+
# liburing always builds both static and dynamic libraries, so we remove the .so
46+
# target the same way nixpkgs does for isStatic platforms.
47+
static-liburing = final.liburing.overrideAttrs (old: {
48+
dontdisableStatic = true;
49+
postInstall = ''
50+
# Always builds both static and dynamic libraries, so we need to remove the
51+
# dynamic libraries.
52+
rm $out/lib/liburing*.so*
53+
54+
# Copy the examples into $bin. Most reverse dependency of
55+
# this package should reference only the $out output
56+
for file in $(find ./examples -executable -type f); do
57+
install -Dm555 -t "$bin/bin" "$file"
58+
done
59+
'';
60+
});
4461
});
4562

4663
# nixpkgs defines happy = justStaticExecutables haskellPackages.happy

iog-libs.nix

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ in {
2222
# Present in ALL shell types (dynamic, static, cross-js, cross-windows).
2323
crypto = map resolve [ "libblst" "libsodium-vrf" "secp256k1" ];
2424

25-
# Data-storage libraries (ouroboros-consensus / cardano-lmdb).
25+
# Data-storage libraries (ouroboros-consensus / cardano-lmdb / cardano-rpc).
2626
# Dynamic and static shells only — not meaningful for JS/Windows cross.
27-
data = map resolve [ "lmdb" ];
27+
data = map resolve [ "lmdb" "liburing" "snappy" ];
2828

2929
# Development/CI tools (not linked into builds). Dynamic and static only.
30-
tools = with pkgs; [ cbor-diag cddl gh icu jq yq-go ];
30+
tools = with pkgs; [ cbor-diag cddl gh icu jq protobuf yq-go ];
3131

32-
# Minimal tool set for cross-compilation targets (CDDL/CBOR validation).
33-
cross-tools = with pkgs; [ cbor-diag cddl ];
32+
# Build tools for cross-compilation targets (validation / code generation).
33+
cross-tools = with pkgs; [ cbor-diag cddl protobuf ];
3434
}

0 commit comments

Comments
 (0)