zstd: Add enableStatic. See #61575
This commit is contained in:
@@ -3,7 +3,8 @@
|
||||
, file
|
||||
, fetchpatch
|
||||
, legacySupport ? false
|
||||
, static ? stdenv.hostPlatform.isStatic
|
||||
, static ? stdenv.hostPlatform.isStatic # generates static libraries *only*
|
||||
, enableStatic ? static
|
||||
# these need to be ran on the host, thus disable when cross-compiling
|
||||
, buildContrib ? stdenv.hostPlatform == stdenv.buildPlatform
|
||||
, doCheck ? stdenv.hostPlatform == stdenv.buildPlatform
|
||||
@@ -55,7 +56,7 @@ stdenv.mkDerivation rec {
|
||||
cmakeFlags = lib.attrsets.mapAttrsToList
|
||||
(name: value: "-DZSTD_${name}:BOOL=${if value then "ON" else "OFF"}") {
|
||||
BUILD_SHARED = !static;
|
||||
BUILD_STATIC = static;
|
||||
BUILD_STATIC = enableStatic;
|
||||
BUILD_CONTRIB = buildContrib;
|
||||
PROGRAMS_LINK_SHARED = !static;
|
||||
LEGACY_SUPPORT = legacySupport;
|
||||
|
||||
Reference in New Issue
Block a user