diff --git a/pkgs/tools/compression/lz4/default.nix b/pkgs/tools/compression/lz4/default.nix index bf048eeb87df..579ee9b2094c 100644 --- a/pkgs/tools/compression/lz4/default.nix +++ b/pkgs/tools/compression/lz4/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, valgrind +{ lib, stdenv, fetchFromGitHub, fetchpatch, valgrind , enableStatic ? stdenv.hostPlatform.isStatic , enableShared ? !stdenv.hostPlatform.isStatic }: @@ -14,6 +14,16 @@ stdenv.mkDerivation rec { owner = pname; }; + patches = lib.optionals (!enableShared) [ + # This patch is already part of the `dev` branch. + # Remove when upgrading to the next version. + (fetchpatch { + name = "lz4-fix-BUILD_SHARED=no.patch"; + url = "https://github.com/lz4/lz4/commit/5ccbd38277989ae6a728171d59ae03bad6f2f4d5.patch"; + sha256 = "sha256-P+/uz3m7EAmHgXF/1Vncc0uKKxNVq6HNIsElx0rGxpw="; + }) + ]; + # TODO(@Ericson2314): Separate binaries and libraries outputs = [ "bin" "out" "dev" ];