summary refs log tree commit diff
diff options
context:
space:
mode:
authorRobert Vollmert <rob@vllmrt.net>2022-09-19 14:58:23 +0200
committerRobert Vollmert <rob@vllmrt.net>2022-09-19 21:33:47 +0200
commit5d3373708fd1ffca38d2b79f49b5749115fd157d (patch)
tree01f16aac0d01dcfdaaae2e2eebad9b05243da48d
parent15967b867833ad004d6aeebeaa7952aaeda13299 (diff)
downloadnixpkgs-5d3373708fd1ffca38d2b79f49b5749115fd157d.tar
nixpkgs-5d3373708fd1ffca38d2b79f49b5749115fd157d.tar.gz
nixpkgs-5d3373708fd1ffca38d2b79f49b5749115fd157d.tar.bz2
nixpkgs-5d3373708fd1ffca38d2b79f49b5749115fd157d.tar.lz
nixpkgs-5d3373708fd1ffca38d2b79f49b5749115fd157d.tar.xz
nixpkgs-5d3373708fd1ffca38d2b79f49b5749115fd157d.tar.zst
nixpkgs-5d3373708fd1ffca38d2b79f49b5749115fd157d.zip
lz4: fix static build
-rw-r--r--pkgs/tools/compression/lz4/default.nix10
1 files changed, 9 insertions, 1 deletions
diff --git a/pkgs/tools/compression/lz4/default.nix b/pkgs/tools/compression/lz4/default.nix
index bf048eeb87d..af5342877c6 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, 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" ];