From 717ca91ade6b0f7f9eb93405786228f9d546c2a4 Mon Sep 17 00:00:00 2001 From: Ken Matsui <26405363+ken-matsui@users.noreply.github.com> Date: Sun, 17 Jul 2022 09:01:25 +0900 Subject: spdlog: enable static build through arguments --- pkgs/development/libraries/spdlog/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'pkgs/development/libraries') 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" -- cgit 1.4.1