From 40d2db0cee0e72c5eaa051482f1c9cc62ed441b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= Date: Mon, 12 Jun 2023 23:53:35 +0000 Subject: [PATCH] zstd: Add `enableStatic`. See #61575 nixpkgs upstreaming PR: https://github.com/NixOS/nixpkgs/pull/243161 --- pkgs/tools/compression/zstd/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/compression/zstd/default.nix b/pkgs/tools/compression/zstd/default.nix index 3a51bdce190b2cf..346daf115820289 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;