@@ -14,7 +14,8 @@ let
1414 };
1515
1616 nativeBuildInputs = [ cmake ];
17− buildInputs = [ fmt ];
17+ # spdlog <1.3 uses a bundled version of fmt
18+ propagatedBuildInputs = lib.optional (lib.versionAtLeast version "1.3") fmt;
1819
1920 cmakeFlags = [
2021 "-DSPDLOG_BUILD_SHARED=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
@@ -25,7 +26,9 @@ let
2526 "-DSPDLOG_FMT_EXTERNAL=ON"
2627 ];
2728
28− outputs = [ "out" "doc" ];
29+ outputs = [ "out" "doc" ]
30+ # spdlog <1.4 is header only, no need to split libraries and headers
31+ ++ lib.optional (lib.versionAtLeast version "1.4") "dev";
2932
3033 postInstall = ''
3134 mkdir -p $out/share/doc/spdlog