diff options
author | Ken Matsui <26405363+ken-matsui@users.noreply.github.com> | 2022-07-17 09:01:25 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-17 09:01:25 +0900 |
commit | 717ca91ade6b0f7f9eb93405786228f9d546c2a4 (patch) | |
tree | 65677fddf114d7c969a4d74be67ef161930e5159 /pkgs | |
parent | 2815ff97dd5384da30a928addf8ca6563e33b034 (diff) |
spdlog: enable static build through arguments
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/libraries/spdlog/default.nix | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pkgs/development/libraries/spdlog/default.nix b/pkgs/development/libraries/spdlog/default.nix index 5a21af12e33ca..9567a6ae170e2 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" |