Skip to content

Commit 6558345

Browse files
nh2teggotic
authored andcommitted
zstd: Add enableStatic. See NixOS#61575
nixpkgs upstreaming PR: NixOS#243161
1 parent 8cbca2c commit 6558345

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
@@ -2,7 +2,8 @@
22
, fixDarwinDylibNames
33
, file
44
, legacySupport ? false
5-
, static ? stdenv.hostPlatform.isStatic
5+
, static ? stdenv.hostPlatform.isStatic # generates static libraries *only*
6+
, enableStatic ? static
67
# these need to be ran on the host, thus disable when cross-compiling
78
, buildContrib ? stdenv.hostPlatform == stdenv.buildPlatform
89
, doCheck ? stdenv.hostPlatform == stdenv.buildPlatform
@@ -54,7 +55,7 @@ stdenv.mkDerivation rec {
5455
cmakeFlags = lib.attrsets.mapAttrsToList
5556
(name: value: "-DZSTD_${name}:BOOL=${if value then "ON" else "OFF"}") {
5657
BUILD_SHARED = !static;
57-
BUILD_STATIC = static;
58+
BUILD_STATIC = enableStatic;
5859
BUILD_CONTRIB = buildContrib;
5960
PROGRAMS_LINK_SHARED = !static;
6061
LEGACY_SUPPORT = legacySupport;

0 commit comments

Comments
 (0)