Skip to content

Commit 40d2db0

Browse files
committed
zstd: Add enableStatic. See NixOS#61575
nixpkgs upstreaming PR: NixOS#243161
1 parent 75378f1 commit 40d2db0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pkgs/tools/compression/zstd/default.nix

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
, file
44
, fetchpatch
55
, legacySupport ? false
6-
, static ? stdenv.hostPlatform.isStatic
6+
, static ? stdenv.hostPlatform.isStatic # generates static libraries *only*
7+
, enableStatic ? static
78
# these need to be ran on the host, thus disable when cross-compiling
89
, buildContrib ? stdenv.hostPlatform == stdenv.buildPlatform
910
, doCheck ? stdenv.hostPlatform == stdenv.buildPlatform
@@ -55,7 +56,7 @@ stdenv.mkDerivation rec {
5556
cmakeFlags = lib.attrsets.mapAttrsToList
5657
(name: value: "-DZSTD_${name}:BOOL=${if value then "ON" else "OFF"}") {
5758
BUILD_SHARED = !static;
58-
BUILD_STATIC = static;
59+
BUILD_STATIC = enableStatic;
5960
BUILD_CONTRIB = buildContrib;
6061
PROGRAMS_LINK_SHARED = !static;
6162
LEGACY_SUPPORT = legacySupport;

0 commit comments

Comments
 (0)