8 , staticBuild ? stdenv.hostPlatform.isStatic
14 stdenv.mkDerivation rec {
18 src = fetchFromGitHub {
22 hash = "sha256-cxTaOuLXHRU8xMz9gluYz0a93O0ez2xOxbloyc1m1ns=";
26 # Fix a broken test, remove with the next release.
28 url = "https://github.com/gabime/spdlog/commit/2ee8bac78e6525a8ad9a9196e65d502ce390d83a.patch";
29 hash = "sha256-L79yOkm3VY01jmxNctfneTLmOA5DEQeNNGC8LbpJiOc=";
33 nativeBuildInputs = [ cmake ];
34 # Required to build tests, even if they aren't executed
35 buildInputs = [ catch2_3 ];
36 propagatedBuildInputs = [ fmt ];
39 "-DSPDLOG_BUILD_SHARED=${if staticBuild then "OFF" else "ON"}"
40 "-DSPDLOG_BUILD_STATIC=${if staticBuild then "ON" else "OFF"}"
41 "-DSPDLOG_BUILD_EXAMPLE=OFF"
42 "-DSPDLOG_BUILD_BENCH=OFF"
43 "-DSPDLOG_BUILD_TESTS=ON"
44 "-DSPDLOG_FMT_EXTERNAL=ON"
47 outputs = [ "out" "doc" "dev" ] ;
50 mkdir -p $out/share/doc/spdlog
51 cp -rv ../example $out/share/doc/spdlog
61 description = "Very fast, header only, C++ logging library";
62 homepage = "https://github.com/gabime/spdlog";
63 license = licenses.mit;
64 maintainers = with maintainers; [ obadz ];
65 platforms = platforms.all;