diff options
author | Niklas Hambüchen <mail@nh2.me> | 2023-06-12 23:53:35 +0000 |
---|---|---|
committer | Niklas Hambüchen <mail@nh2.me> | 2023-10-20 19:59:30 +0000 |
commit | ef4c88d1f67efe6a36b40119ebf11ff134f40724 (patch) | |
tree | a132d751ded4665ed545277b4fc47be4a5741408 /pkgs/tools/compression/zstd | |
parent | e73b7f8d63d2f940ab8110001942b5491d07fd28 (diff) |
zstd: Add `enableStatic`. See #61575
Diffstat (limited to 'pkgs/tools/compression/zstd')
-rw-r--r-- | pkgs/tools/compression/zstd/default.nix | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pkgs/tools/compression/zstd/default.nix b/pkgs/tools/compression/zstd/default.nix index 3a51bdce190b..346daf115820 100644 --- a/pkgs/tools/compression/zstd/default.nix +++ b/pkgs/tools/compression/zstd/default.nix @@ -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; |