Merge pull request #244539 from tobim/pkgs/protobuf3_23
protobuf3: 21.12 -> 23.4
This commit is contained in:
commit
c0f799f9b1
|
@ -2,6 +2,7 @@
|
|||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, gtest
|
||||
, static ? stdenv.hostPlatform.isStatic
|
||||
, cxxStandard ? null
|
||||
}:
|
||||
|
@ -18,13 +19,19 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
};
|
||||
|
||||
cmakeFlags = [
|
||||
"-DABSL_BUILD_TEST_HELPERS=ON"
|
||||
"-DABSL_USE_EXTERNAL_GOOGLETEST=ON"
|
||||
"-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}"
|
||||
] ++ lib.optionals (cxxStandard != null) [
|
||||
"-DCMAKE_CXX_STANDARD=${cxxStandard}"
|
||||
];
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
buildInputs = [ gtest ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "An open-source collection of C++ code designed to augment the C++ standard library";
|
||||
homepage = "https://abseil.io/";
|
||||
|
|
6
pkgs/development/libraries/protobuf/3.23.nix
Normal file
6
pkgs/development/libraries/protobuf/3.23.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{ callPackage, ... } @ args:
|
||||
|
||||
callPackage ./generic-v3-cmake.nix ({
|
||||
version = "3.23.4";
|
||||
sha256 = "sha256-eI+mrsZAOLEsdyTC3B+K+GjD3r16CmPx1KJ2KhCwFdg=";
|
||||
} // args)
|
|
@ -72,12 +72,10 @@ let
|
|||
zlib
|
||||
];
|
||||
|
||||
# After 3.20, CMakeLists.txt can now be found at the top-level, however
|
||||
# a stub cmake/CMakeLists.txt still exists for compatibility with previous build assumptions
|
||||
cmakeDir = "../cmake";
|
||||
cmakeDir = if lib.versionOlder version "3.22" then "../cmake" else null;
|
||||
cmakeFlags = [
|
||||
"-Dprotobuf_ABSL_PROVIDER=package"
|
||||
] ++ lib.optionals (!stdenv.targetPlatform.isStatic) [
|
||||
] ++ lib.optionals (!stdenv.targetPlatform.isStatic) [
|
||||
"-Dprotobuf_BUILD_SHARED_LIBS=ON"
|
||||
]
|
||||
# Tests fail to build on 32-bit platforms; fixed in 3.22
|
||||
|
|
|
@ -24278,8 +24278,9 @@ with pkgs;
|
|||
|
||||
prospector = callPackage ../development/tools/prospector { };
|
||||
|
||||
protobuf = protobuf3_21;
|
||||
protobuf = protobuf3_23;
|
||||
|
||||
protobuf3_23 = callPackage ../development/libraries/protobuf/3.23.nix { };
|
||||
protobuf3_21 = callPackage ../development/libraries/protobuf/3.21.nix {
|
||||
abseil-cpp = abseil-cpp_202103;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue