From 48c25dcaf2deb249615707a310af23ccb42b04c3 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Fri, 30 Jun 2023 15:08:07 +0300 Subject: [PATCH] spdlog: reformat expression arguments, and comment about fmt_9 --- .../electronics/hal-hardware-analyzer/default.nix | 2 +- pkgs/development/libraries/spdlog/default.nix | 12 ++++++++++-- pkgs/top-level/all-packages.nix | 4 +--- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/science/electronics/hal-hardware-analyzer/default.nix b/pkgs/applications/science/electronics/hal-hardware-analyzer/default.nix index 296fae0a0ed6..5ee77fce963a 100644 --- a/pkgs/applications/science/electronics/hal-hardware-analyzer/default.nix +++ b/pkgs/applications/science/electronics/hal-hardware-analyzer/default.nix @@ -41,7 +41,7 @@ let # no stable hal release yet with recent spdlog/fmt support, remove # once 4.0.0 is released - see https://github.com/emsec/hal/issues/452 spdlog' = spdlog.override { - fmt = fmt_8.overrideAttrs (_: rec { + fmt_9 = fmt_8.overrideAttrs (_: rec { version = "8.0.1"; src = fetchFromGitHub { owner = "fmtlib"; diff --git a/pkgs/development/libraries/spdlog/default.nix b/pkgs/development/libraries/spdlog/default.nix index bde66f292cf9..fe648a2ce7bf 100644 --- a/pkgs/development/libraries/spdlog/default.nix +++ b/pkgs/development/libraries/spdlog/default.nix @@ -1,4 +1,12 @@ -{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, fmt +{ lib +, stdenv +, fetchFromGitHub +, fetchpatch +, cmake +# Although we include upstream patches that fix compilation with fmt_10, we +# still use fmt_9 because this dependency is propagated, and many of spdlog's +# reverse dependencies don't support fmt_10 yet. +, fmt_9 , staticBuild ? stdenv.hostPlatform.isStatic # tests @@ -29,7 +37,7 @@ stdenv.mkDerivation rec { ]; nativeBuildInputs = [ cmake ]; - propagatedBuildInputs = [ fmt ]; + propagatedBuildInputs = [ fmt_9 ]; cmakeFlags = [ "-DSPDLOG_BUILD_SHARED=${if staticBuild then "OFF" else "ON"}" diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 41438b17e46f..256de4870d7b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -40672,9 +40672,7 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) Cocoa OpenGL; }; - spdlog = callPackage ../development/libraries/spdlog { - fmt = fmt_9; - }; + spdlog = callPackage ../development/libraries/spdlog { }; dart = callPackage ../development/compilers/dart { };