summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorAnderson Torres <torres.anderson.85@protonmail.com>2022-07-24 13:27:49 -0300
committerGitHub <noreply@github.com>2022-07-24 13:27:49 -0300
commitf768f101891cf5c40601ffeb66342f6478ed1d06 (patch)
treede48cae21e330e0f7b997535ccc406af57f7be5d /pkgs
parentd0bc131a44e8c70e4933a978fcaff3f76bbddf43 (diff)
parent717ca91ade6b0f7f9eb93405786228f9d546c2a4 (diff)
Merge pull request #181779 from ken-matsui/patch-2
spdlog: enable static build through arguments
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/libraries/spdlog/default.nix8
1 files changed, 5 insertions, 3 deletions
diff --git a/pkgs/development/libraries/spdlog/default.nix b/pkgs/development/libraries/spdlog/default.nix
index 523fe798168cb..9c61ef70624db 100644
--- a/pkgs/development/libraries/spdlog/default.nix
+++ b/pkgs/development/libraries/spdlog/default.nix
@@ -1,4 +1,6 @@
-{ lib, stdenv, fetchFromGitHub, cmake, fmt_8 }:
+{ lib, stdenv, fetchFromGitHub, cmake, fmt_8
+, staticBuild ? stdenv.hostPlatform.isStatic
+}:
 
 let
   generic = { version, sha256 }:
@@ -18,8 +20,8 @@ let
       propagatedBuildInputs = lib.optional (lib.versionAtLeast version "1.3") fmt_8;
 
       cmakeFlags = [
-        "-DSPDLOG_BUILD_SHARED=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
-        "-DSPDLOG_BUILD_STATIC=${if stdenv.hostPlatform.isStatic then "ON" else "OFF"}"
+        "-DSPDLOG_BUILD_SHARED=${if staticBuild then "OFF" else "ON"}"
+        "-DSPDLOG_BUILD_STATIC=${if staticBuild then "ON" else "OFF"}"
         "-DSPDLOG_BUILD_EXAMPLE=OFF"
         "-DSPDLOG_BUILD_BENCH=OFF"
         "-DSPDLOG_BUILD_TESTS=ON"