Skip to content

Commit

Permalink
zstd: Add enableStatic. See NixOS#61575
Browse files Browse the repository at this point in the history
nixpkgs upstreaming PR: NixOS#243161
  • Loading branch information
nh2 authored and teggotic committed Sep 17, 2023
1 parent 8cbca2c commit 6558345
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkgs/tools/compression/zstd/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
, fixDarwinDylibNames
, file
, 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
Expand Down Expand Up @@ -54,7 +55,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;
Expand Down

0 comments on commit 6558345

Please sign in to comment.