protobuf: format (#359703)
This commit is contained in:
commit
2202fa533b
@ -1,6 +1,9 @@
|
|||||||
{ callPackage, ... } @ args:
|
{ callPackage, ... }@args:
|
||||||
|
|
||||||
callPackage ./generic.nix ({
|
callPackage ./generic.nix (
|
||||||
version = "21.12";
|
{
|
||||||
hash = "sha256-VZQEFHq17UsTH5CZZOcJBKiScGV2xPJ/e6gkkVliRCU=";
|
version = "21.12";
|
||||||
} // args)
|
hash = "sha256-VZQEFHq17UsTH5CZZOcJBKiScGV2xPJ/e6gkkVliRCU=";
|
||||||
|
}
|
||||||
|
// args
|
||||||
|
)
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
{ callPackage, ... } @ args:
|
{ callPackage, ... }@args:
|
||||||
|
|
||||||
callPackage ./generic.nix ({
|
callPackage ./generic.nix (
|
||||||
version = "23.4";
|
{
|
||||||
hash = "sha256-eI+mrsZAOLEsdyTC3B+K+GjD3r16CmPx1KJ2KhCwFdg=";
|
version = "23.4";
|
||||||
} // args)
|
hash = "sha256-eI+mrsZAOLEsdyTC3B+K+GjD3r16CmPx1KJ2KhCwFdg=";
|
||||||
|
}
|
||||||
|
// args
|
||||||
|
)
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
{ callPackage, ... } @ args:
|
{ callPackage, ... }@args:
|
||||||
|
|
||||||
callPackage ./generic.nix ({
|
callPackage ./generic.nix (
|
||||||
version = "24.4";
|
{
|
||||||
hash = "sha256-I+Xtq4GOs++f/RlVff9MZuolXrMLmrZ2z6mkBayqQ2s=";
|
version = "24.4";
|
||||||
} // args)
|
hash = "sha256-I+Xtq4GOs++f/RlVff9MZuolXrMLmrZ2z6mkBayqQ2s=";
|
||||||
|
}
|
||||||
|
// args
|
||||||
|
)
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
{ callPackage, ... } @ args:
|
{ callPackage, ... }@args:
|
||||||
|
|
||||||
callPackage ./generic.nix ({
|
callPackage ./generic.nix (
|
||||||
version = "25.5";
|
{
|
||||||
hash = "sha256-DFLlk4T8ODo3lmvrANlkIsrmDXZHmqMPTYxDWaz56qA=";
|
version = "25.5";
|
||||||
} // args)
|
hash = "sha256-DFLlk4T8ODo3lmvrANlkIsrmDXZHmqMPTYxDWaz56qA=";
|
||||||
|
}
|
||||||
|
// args
|
||||||
|
)
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
{ callPackage, ... } @ args:
|
{ callPackage, ... }@args:
|
||||||
|
|
||||||
callPackage ./generic.nix ({
|
callPackage ./generic.nix (
|
||||||
version = "26.1";
|
{
|
||||||
hash = "sha256-9sA+MYeDqRZl1v6HV4mpy60vqTbVTtinp9er6zkg/Ng=";
|
version = "26.1";
|
||||||
} // args)
|
hash = "sha256-9sA+MYeDqRZl1v6HV4mpy60vqTbVTtinp9er6zkg/Ng=";
|
||||||
|
}
|
||||||
|
// args
|
||||||
|
)
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
{ callPackage, ... } @ args:
|
{ callPackage, ... }@args:
|
||||||
|
|
||||||
callPackage ./generic.nix ({
|
callPackage ./generic.nix (
|
||||||
version = "27.5";
|
{
|
||||||
hash = "sha256-wUXvdlz19VYpFGU9o0pap/PrwE2AkopLZJVUqfEpJVI=";
|
version = "27.5";
|
||||||
} // args)
|
hash = "sha256-wUXvdlz19VYpFGU9o0pap/PrwE2AkopLZJVUqfEpJVI=";
|
||||||
|
}
|
||||||
|
// args
|
||||||
|
)
|
||||||
|
@ -1,26 +1,27 @@
|
|||||||
# The cmake version of this build is meant to enable both cmake and .pc being exported
|
# The cmake version of this build is meant to enable both cmake and .pc being exported
|
||||||
# this is important because grpc exports a .cmake file which also expects for protobuf
|
# this is important because grpc exports a .cmake file which also expects for protobuf
|
||||||
# to have been exported through cmake as well.
|
# to have been exported through cmake as well.
|
||||||
{ lib
|
{
|
||||||
, stdenv
|
lib,
|
||||||
, abseil-cpp
|
stdenv,
|
||||||
, buildPackages
|
abseil-cpp,
|
||||||
, cmake
|
buildPackages,
|
||||||
, fetchFromGitHub
|
cmake,
|
||||||
, fetchpatch
|
fetchFromGitHub,
|
||||||
, gtest
|
fetchpatch,
|
||||||
, zlib
|
gtest,
|
||||||
, version
|
zlib,
|
||||||
, hash
|
version,
|
||||||
|
hash,
|
||||||
|
|
||||||
# downstream dependencies
|
# downstream dependencies
|
||||||
, python3
|
python3,
|
||||||
, grpc
|
grpc,
|
||||||
, enableShared ? !stdenv.hostPlatform.isStatic
|
enableShared ? !stdenv.hostPlatform.isStatic,
|
||||||
|
|
||||||
, testers
|
testers,
|
||||||
, protobuf
|
protobuf,
|
||||||
, ...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
@ -48,13 +49,15 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs =
|
||||||
cmake
|
[
|
||||||
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
cmake
|
||||||
# protoc of the same version must be available for build. For non-cross builds, it's able to
|
]
|
||||||
# re-use the executable generated as part of the build
|
++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
||||||
buildPackages."protobuf_${lib.versions.major version}"
|
# protoc of the same version must be available for build. For non-cross builds, it's able to
|
||||||
];
|
# re-use the executable generated as part of the build
|
||||||
|
buildPackages."protobuf_${lib.versions.major version}"
|
||||||
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
gtest
|
gtest
|
||||||
@ -68,15 +71,17 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
strictDeps = true;
|
strictDeps = true;
|
||||||
|
|
||||||
cmakeDir = if lib.versionOlder version "22" then "../cmake" else null;
|
cmakeDir = if lib.versionOlder version "22" then "../cmake" else null;
|
||||||
cmakeFlags = [
|
cmakeFlags =
|
||||||
"-Dprotobuf_USE_EXTERNAL_GTEST=ON"
|
[
|
||||||
"-Dprotobuf_ABSL_PROVIDER=package"
|
"-Dprotobuf_USE_EXTERNAL_GTEST=ON"
|
||||||
] ++ lib.optionals enableShared [
|
"-Dprotobuf_ABSL_PROVIDER=package"
|
||||||
"-Dprotobuf_BUILD_SHARED_LIBS=ON"
|
]
|
||||||
]
|
++ lib.optionals enableShared [
|
||||||
++ lib.optionals (!finalAttrs.finalPackage.doCheck) [
|
"-Dprotobuf_BUILD_SHARED_LIBS=ON"
|
||||||
"-Dprotobuf_BUILD_TESTS=OFF"
|
]
|
||||||
];
|
++ lib.optionals (!finalAttrs.finalPackage.doCheck) [
|
||||||
|
"-Dprotobuf_BUILD_TESTS=OFF"
|
||||||
|
];
|
||||||
|
|
||||||
doCheck =
|
doCheck =
|
||||||
# FIXME: investigate. 24.x and 23.x have different errors.
|
# FIXME: investigate. 24.x and 23.x have different errors.
|
||||||
|
Loading…
Reference in New Issue
Block a user