diff --git a/pkgs/development/libraries/spdlog/default.nix b/pkgs/development/libraries/spdlog/default.nix index 1c9e67f87675..a96cd455f554 100644 --- a/pkgs/development/libraries/spdlog/default.nix +++ b/pkgs/development/libraries/spdlog/default.nix @@ -1,32 +1,46 @@ { stdenv, fetchFromGitHub, cmake }: -stdenv.mkDerivation rec { - name = "spdlog-${version}"; - version = "0.14.0"; +let + generic = { version, sha256 }: + stdenv.mkDerivation { + name = "spdlog-${version}"; + inherit version; - src = fetchFromGitHub { - owner = "gabime"; - repo = "spdlog"; - rev = "v${version}"; + src = fetchFromGitHub { + owner = "gabime"; + repo = "spdlog"; + rev = "v${version}"; + inherit sha256; + }; + + nativeBuildInputs = [ cmake ]; + + # cmakeFlags = [ "-DSPDLOG_BUILD_EXAMPLES=ON" ]; + + outputs = [ "out" "doc" ]; + + postInstall = '' + mkdir -p $out/share/doc/spdlog + cp -rv ../example $out/share/doc/spdlog + ''; + + meta = with stdenv.lib; { + description = "Very fast, header only, C++ logging library."; + homepage = https://github.com/gabime/spdlog; + license = licenses.mit; + maintainers = with maintainers; [ obadz ]; + platforms = platforms.all; + }; + }; +in +{ + spdlog_1 = generic { + version = "1.1.0"; + sha256 = "0yckz5w02v8193jhxihk9v4i8f6jafyg2a33amql0iclhk17da8f"; + }; + + spdlog_0 = generic { + version = "0.14.0"; sha256 = "13730429gwlabi432ilpnja3sfvy0nn2719vnhhmii34xcdyc57q"; }; - - nativeBuildInputs = [ cmake ]; - - # cmakeFlags = [ "-DSPDLOG_BUILD_EXAMPLES=ON" ]; - - outputs = [ "out" "doc" ]; - - postInstall = '' - mkdir -p $out/share/doc/spdlog - cp -rv ../example $out/share/doc/spdlog - ''; - - meta = with stdenv.lib; { - description = "Very fast, header only, C++ logging library."; - homepage = https://github.com/gabime/spdlog; - license = licenses.mit; - maintainers = with maintainers; [ obadz ]; - platforms = platforms.all; - }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a7f3f7b05679..182eb55557e9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2347,7 +2347,9 @@ with pkgs; enblend-enfuse = callPackage ../tools/graphics/enblend-enfuse { }; - cryfs = callPackage ../tools/filesystems/cryfs { }; + cryfs = callPackage ../tools/filesystems/cryfs { + spdlog = spdlog_0; + }; encfs = callPackage ../tools/filesystems/encfs { tinyxml2 = tinyxml-2; @@ -22217,7 +22219,10 @@ with pkgs; bullet = callPackage ../development/libraries/bullet {}; - spdlog = callPackage ../development/libraries/spdlog { }; + inherit (callPackages ../development/libraries/spdlog { }) + spdlog_0 spdlog_1; + + spdlog = spdlog_1; dart = callPackage ../development/interpreters/dart { }; dart_stable = dart.override { version = "1.24.3"; };