about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/compression/zstd/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/compression/zstd/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/compression/zstd/default.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/compression/zstd/default.nix b/nixpkgs/pkgs/tools/compression/zstd/default.nix
index f87a144f7cc9..1f9b4a505ac4 100644
--- a/nixpkgs/pkgs/tools/compression/zstd/default.nix
+++ b/nixpkgs/pkgs/tools/compression/zstd/default.nix
@@ -1,6 +1,7 @@
 { lib, stdenv, fetchFromGitHub, cmake, bash, gnugrep
 , fixDarwinDylibNames
 , file
+, fetchpatch
 , legacySupport ? false
 , static ? stdenv.hostPlatform.isStatic
 # these need to be ran on the host, thus disable when cross-compiling
@@ -27,6 +28,12 @@ stdenv.mkDerivation rec {
     # This patches makes sure we do not attempt to use the MD5 implementation
     # of the host platform when running the tests
     ./playtests-darwin.patch
+
+    # Fixes linking for static builds
+    (fetchpatch {
+      url = "https://github.com/facebook/zstd/pull/2724/commits/e1f85dbca3a0ed5ef06c8396912a0914db8dea6a.patch";
+      sha256 = "sha256-PuYAqnJWAE+L9bsroOnnBGJhERW8LHrGSLtIEkKU9vg=";
+    })
   ];
 
   postPatch = lib.optionalString (!static) ''