Skip to content

Commit

Permalink
Fix static LZ4 for macos
Browse files Browse the repository at this point in the history
  • Loading branch information
tvorogme committed Oct 1, 2024
1 parent 5be318f commit 73be749
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion assembly/nix/linux-arm64-static.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ stdenv.mkDerivation {
pkgsStatic.openssl microhttpdmy pkgsStatic.zlib pkgsStatic.libsodium.dev pkgsStatic.secp256k1 glibc.static
staticLibs.staticBoost
staticLibs.staticLibrdkafka
pkgsStatic.lz4
staticLibs.staticLZ4
];

makeStatic = true;
Expand Down
2 changes: 1 addition & 1 deletion assembly/nix/linux-x86-64-static.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ stdenv.mkDerivation {
pkgsStatic.openssl microhttpdmy pkgsStatic.zlib pkgsStatic.libsodium.dev pkgsStatic.secp256k1 glibc.static
staticLibs.staticBoost
staticLibs.staticLibrdkafka
pkgsStatic.lz4
staticLibs.staticLZ4
];

makeStatic = true;
Expand Down
2 changes: 1 addition & 1 deletion assembly/nix/macos-static.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pkgs.llvmPackages_14.stdenv.mkDerivation {
(libiconv.override { enableStatic = true; enableShared = false; })
pkgsStatic.boost
staticLibs.staticLibrdkafka
pkgsStatic.lz4
staticLibs.staticLZ4
];


Expand Down
10 changes: 9 additions & 1 deletion assembly/nix/static-libs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,15 @@ let
staticLibrdkafka = pkgs.rdkafka.overrideAttrs (oldAttrs: {
configureFlags = (oldAttrs.configureFlags or []) ++ ["--enable-static" "--disable-shared"];
});

staticLZ4 = lz4.overrideAttrs (oldAttrs: rec {
# Disable shared library building and ensure a static build
buildInputs = oldAttrs.buildInputs or [];

# Override the configure flags
configureFlags = [ "-DBUILD_SHARED_LIBS=OFF" "-DBUILD_STATIC_LIBS=ON" ];
});
in
{
inherit staticBoost staticLibrdkafka;
inherit staticBoost staticLibrdkafka staticLZ4;
}

0 comments on commit 73be749

Please sign in to comment.