lz4: fix static build

This commit is contained in:
Robert Vollmert 2022-09-19 14:58:23 +02:00
parent 15967b8678
commit 5d3373708f

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, valgrind
{ lib, stdenv, fetchFromGitHub, valgrind, fetchpatch
, enableStatic ? stdenv.hostPlatform.isStatic
, enableShared ? !stdenv.hostPlatform.isStatic
}:
@ -14,6 +14,14 @@ stdenv.mkDerivation rec {
owner = pname;
};
patches = [
(fetchpatch { # https://github.com/lz4/lz4/pull/1162
name = "build-shared-no.patch";
url = "https://github.com/lz4/lz4/commit/851ef4b23c7cbf4ceb2ba1099666a8b5ec4fa195.patch";
sha256 = "sha256-P+/uz3m7EAmHgXF/1Vncc0uKKxNVq6HNIsElx0rGxpw=";
})
];
# TODO(@Ericson2314): Separate binaries and libraries
outputs = [ "bin" "out" "dev" ];