3
0
Fork 0
forked from mirrors/nixpkgs

zstd: Fix static build

This commit is contained in:
Pamplemousse 2021-08-16 17:52:13 -07:00
parent b02a72476f
commit 47fd767531

View file

@ -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) ''