protobuf: format
This commit is contained in:
parent
07fc04c459
commit
54313579bb
@ -1,6 +1,9 @@
|
||||
{ callPackage, ... } @ args:
|
||||
{ callPackage, ... }@args:
|
||||
|
||||
callPackage ./generic.nix ({
|
||||
version = "21.12";
|
||||
hash = "sha256-VZQEFHq17UsTH5CZZOcJBKiScGV2xPJ/e6gkkVliRCU=";
|
||||
} // args)
|
||||
callPackage ./generic.nix (
|
||||
{
|
||||
version = "21.12";
|
||||
hash = "sha256-VZQEFHq17UsTH5CZZOcJBKiScGV2xPJ/e6gkkVliRCU=";
|
||||
}
|
||||
// args
|
||||
)
|
||||
|
@ -1,6 +1,9 @@
|
||||
{ callPackage, ... } @ args:
|
||||
{ callPackage, ... }@args:
|
||||
|
||||
callPackage ./generic.nix ({
|
||||
version = "23.4";
|
||||
hash = "sha256-eI+mrsZAOLEsdyTC3B+K+GjD3r16CmPx1KJ2KhCwFdg=";
|
||||
} // args)
|
||||
callPackage ./generic.nix (
|
||||
{
|
||||
version = "23.4";
|
||||
hash = "sha256-eI+mrsZAOLEsdyTC3B+K+GjD3r16CmPx1KJ2KhCwFdg=";
|
||||
}
|
||||
// args
|
||||
)
|
||||
|
@ -1,6 +1,9 @@
|
||||
{ callPackage, ... } @ args:
|
||||
{ callPackage, ... }@args:
|
||||
|
||||
callPackage ./generic.nix ({
|
||||
version = "24.4";
|
||||
hash = "sha256-I+Xtq4GOs++f/RlVff9MZuolXrMLmrZ2z6mkBayqQ2s=";
|
||||
} // args)
|
||||
callPackage ./generic.nix (
|
||||
{
|
||||
version = "24.4";
|
||||
hash = "sha256-I+Xtq4GOs++f/RlVff9MZuolXrMLmrZ2z6mkBayqQ2s=";
|
||||
}
|
||||
// args
|
||||
)
|
||||
|
@ -1,6 +1,9 @@
|
||||
{ callPackage, ... } @ args:
|
||||
{ callPackage, ... }@args:
|
||||
|
||||
callPackage ./generic.nix ({
|
||||
version = "25.5";
|
||||
hash = "sha256-DFLlk4T8ODo3lmvrANlkIsrmDXZHmqMPTYxDWaz56qA=";
|
||||
} // args)
|
||||
callPackage ./generic.nix (
|
||||
{
|
||||
version = "25.5";
|
||||
hash = "sha256-DFLlk4T8ODo3lmvrANlkIsrmDXZHmqMPTYxDWaz56qA=";
|
||||
}
|
||||
// args
|
||||
)
|
||||
|
@ -1,6 +1,9 @@
|
||||
{ callPackage, ... } @ args:
|
||||
{ callPackage, ... }@args:
|
||||
|
||||
callPackage ./generic.nix ({
|
||||
version = "26.1";
|
||||
hash = "sha256-9sA+MYeDqRZl1v6HV4mpy60vqTbVTtinp9er6zkg/Ng=";
|
||||
} // args)
|
||||
callPackage ./generic.nix (
|
||||
{
|
||||
version = "26.1";
|
||||
hash = "sha256-9sA+MYeDqRZl1v6HV4mpy60vqTbVTtinp9er6zkg/Ng=";
|
||||
}
|
||||
// args
|
||||
)
|
||||
|
@ -1,6 +1,9 @@
|
||||
{ callPackage, ... } @ args:
|
||||
{ callPackage, ... }@args:
|
||||
|
||||
callPackage ./generic.nix ({
|
||||
version = "27.5";
|
||||
hash = "sha256-wUXvdlz19VYpFGU9o0pap/PrwE2AkopLZJVUqfEpJVI=";
|
||||
} // args)
|
||||
callPackage ./generic.nix (
|
||||
{
|
||||
version = "27.5";
|
||||
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
|
||||
# this is important because grpc exports a .cmake file which also expects for protobuf
|
||||
# to have been exported through cmake as well.
|
||||
{ lib
|
||||
, stdenv
|
||||
, abseil-cpp
|
||||
, buildPackages
|
||||
, cmake
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, gtest
|
||||
, zlib
|
||||
, version
|
||||
, hash
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
abseil-cpp,
|
||||
buildPackages,
|
||||
cmake,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
gtest,
|
||||
zlib,
|
||||
version,
|
||||
hash,
|
||||
|
||||
# downstream dependencies
|
||||
, python3
|
||||
, grpc
|
||||
, enableShared ? !stdenv.hostPlatform.isStatic
|
||||
python3,
|
||||
grpc,
|
||||
enableShared ? !stdenv.hostPlatform.isStatic,
|
||||
|
||||
, testers
|
||||
, protobuf
|
||||
, ...
|
||||
testers,
|
||||
protobuf,
|
||||
...
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
@ -48,13 +49,15 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
||||
# 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}"
|
||||
];
|
||||
nativeBuildInputs =
|
||||
[
|
||||
cmake
|
||||
]
|
||||
++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
||||
# 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 = [
|
||||
gtest
|
||||
@ -68,15 +71,17 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
strictDeps = true;
|
||||
|
||||
cmakeDir = if lib.versionOlder version "22" then "../cmake" else null;
|
||||
cmakeFlags = [
|
||||
"-Dprotobuf_USE_EXTERNAL_GTEST=ON"
|
||||
"-Dprotobuf_ABSL_PROVIDER=package"
|
||||
] ++ lib.optionals enableShared [
|
||||
"-Dprotobuf_BUILD_SHARED_LIBS=ON"
|
||||
]
|
||||
++ lib.optionals (!finalAttrs.finalPackage.doCheck) [
|
||||
"-Dprotobuf_BUILD_TESTS=OFF"
|
||||
];
|
||||
cmakeFlags =
|
||||
[
|
||||
"-Dprotobuf_USE_EXTERNAL_GTEST=ON"
|
||||
"-Dprotobuf_ABSL_PROVIDER=package"
|
||||
]
|
||||
++ lib.optionals enableShared [
|
||||
"-Dprotobuf_BUILD_SHARED_LIBS=ON"
|
||||
]
|
||||
++ lib.optionals (!finalAttrs.finalPackage.doCheck) [
|
||||
"-Dprotobuf_BUILD_TESTS=OFF"
|
||||
];
|
||||
|
||||
doCheck =
|
||||
# FIXME: investigate. 24.x and 23.x have different errors.
|
||||
|
Loading…
Reference in New Issue
Block a user