pkgsStatic.lz4: fix build

This commit is contained in:
Tobias Mayer 2022-10-03 08:19:53 +02:00
parent 978895272f
commit a0a570bf78

View File

@ -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" ];