diff options
author | Pamplemousse <xav.maso@gmail.com> | 2021-08-16 17:52:13 -0700 |
---|---|---|
committer | Pamplemousse <xav.maso@gmail.com> | 2021-08-16 17:52:13 -0700 |
commit | 47fd767531f60d5e8703597da62fd95df82924be (patch) | |
tree | 84b5f9eadfe4deaa7fcfae569a61acf32f7120e0 /pkgs/tools/compression | |
parent | b02a72476fe4f2f2b7c6c9285b772e4a827209f4 (diff) |
zstd: Fix static build
Diffstat (limited to 'pkgs/tools/compression')
-rw-r--r-- | pkgs/tools/compression/zstd/default.nix | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pkgs/tools/compression/zstd/default.nix b/pkgs/tools/compression/zstd/default.nix index f87a144f7cc9..1f9b4a505ac4 100644 --- a/pkgs/tools/compression/zstd/default.nix +++ b/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) '' |