lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

protobuf_21: init at 21.12, protobuf_23: init at 23.4, protobuf_24: init at 24.3

+144
+6
pkgs/development/libraries/protobuf/21.nix
··· 1 + { callPackage, ... } @ args: 2 + 3 + callPackage ./generic.nix ({ 4 + version = "21.12"; 5 + hash = "sha256-VZQEFHq17UsTH5CZZOcJBKiScGV2xPJ/e6gkkVliRCU="; 6 + } // args)
+6
pkgs/development/libraries/protobuf/23.nix
··· 1 + { callPackage, ... } @ args: 2 + 3 + callPackage ./generic.nix ({ 4 + version = "23.4"; 5 + hash = "sha256-eI+mrsZAOLEsdyTC3B+K+GjD3r16CmPx1KJ2KhCwFdg="; 6 + } // args)
+6
pkgs/development/libraries/protobuf/24.nix
··· 1 + { callPackage, ... } @ args: 2 + 3 + callPackage ./generic.nix ({ 4 + version = "24.3"; 5 + hash = "sha256-wXGQW/o674DeLXX2IlyZskl5OrBcSRptOMoJqLQGm94="; 6 + } // args)
+116
pkgs/development/libraries/protobuf/generic.nix
··· 1 + # The cmake version of this build is meant to enable both cmake and .pc being exported 2 + # this is important because grpc exports a .cmake file which also expects for protobuf 3 + # to have been exported through cmake as well. 4 + { lib 5 + , stdenv 6 + , abseil-cpp 7 + , buildPackages 8 + , cmake 9 + , fetchFromGitHub 10 + , fetchpatch 11 + , gtest 12 + , zlib 13 + , version 14 + , hash 15 + 16 + # downstream dependencies 17 + , python3 18 + , grpc 19 + , enableShared ? !stdenv.hostPlatform.isStatic 20 + 21 + , ... 22 + }: 23 + 24 + stdenv.mkDerivation (finalAttrs: { 25 + pname = "protobuf"; 26 + inherit version; 27 + 28 + src = fetchFromGitHub { 29 + owner = "protocolbuffers"; 30 + repo = "protobuf"; 31 + rev = "v${version}"; 32 + sha256 = hash; 33 + }; 34 + 35 + postPatch = lib.optionalString stdenv.isDarwin '' 36 + substituteInPlace src/google/protobuf/testing/googletest.cc \ 37 + --replace 'tmpnam(b)' '"'$TMPDIR'/foo"' 38 + ''; 39 + 40 + patches = lib.optionals (lib.versionOlder version "22") [ 41 + # fix protobuf-targets.cmake installation paths, and allow for CMAKE_INSTALL_LIBDIR to be absolute 42 + # https://github.com/protocolbuffers/protobuf/pull/10090 43 + (fetchpatch { 44 + url = "https://github.com/protocolbuffers/protobuf/commit/a7324f88e92bc16b57f3683403b6c993bf68070b.patch"; 45 + sha256 = "sha256-SmwaUjOjjZulg/wgNmR/F5b8rhYA2wkKAjHIOxjcQdQ="; 46 + }) 47 + ] ++ lib.optionals stdenv.hostPlatform.isStatic [ 48 + ./static-executables-have-no-rpath.patch 49 + ]; 50 + 51 + nativeBuildInputs = 52 + let 53 + protobufVersion = "${lib.versions.major version}_${lib.versions.minor version}"; 54 + in 55 + [ 56 + cmake 57 + ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ 58 + # protoc of the same version must be available for build. For non-cross builds, it's able to 59 + # re-use the executable generated as part of the build 60 + buildPackages."protobuf${protobufVersion}" 61 + ]; 62 + 63 + buildInputs = [ 64 + gtest 65 + zlib 66 + ]; 67 + 68 + propagatedBuildInputs = [ 69 + abseil-cpp 70 + ]; 71 + 72 + strictDeps = true; 73 + 74 + cmakeDir = if lib.versionOlder version "22" then "../cmake" else null; 75 + cmakeFlags = [ 76 + "-Dprotobuf_USE_EXTERNAL_GTEST=ON" 77 + "-Dprotobuf_ABSL_PROVIDER=package" 78 + ] ++ lib.optionals enableShared [ 79 + "-Dprotobuf_BUILD_SHARED_LIBS=ON" 80 + ] 81 + # Tests fail to build on 32-bit platforms; fixed in 22.x 82 + # https://github.com/protocolbuffers/protobuf/issues/10418 83 + ++ lib.optionals (stdenv.targetPlatform.is32bit && lib.versionOlder version "22") [ 84 + "-Dprotobuf_BUILD_TESTS=OFF" 85 + ]; 86 + 87 + # FIXME: investigate. 24.x and 23.x have different errors. 88 + # At least some of it is not reproduced on some other machine; example: 89 + # https://hydra.nixos.org/build/235677717/nixlog/4/tail 90 + doCheck = !(stdenv.isDarwin && lib.versionAtLeast version "23"); 91 + 92 + passthru = { 93 + tests = { 94 + pythonProtobuf = python3.pkgs.protobuf.override (_: { 95 + protobuf = finalAttrs.finalPackage; 96 + }); 97 + inherit grpc; 98 + }; 99 + 100 + inherit abseil-cpp; 101 + }; 102 + 103 + meta = { 104 + description = "Google's data interchange format"; 105 + longDescription = '' 106 + Protocol Buffers are a way of encoding structured data in an efficient 107 + yet extensible format. Google uses Protocol Buffers for almost all of 108 + its internal RPC protocols and file formats. 109 + ''; 110 + license = lib.licenses.bsd3; 111 + platforms = lib.platforms.all; 112 + homepage = "https://protobuf.dev/"; 113 + maintainers = with lib.maintainers; [ jonringer ]; 114 + mainProgram = "protoc"; 115 + }; 116 + })
+10
pkgs/top-level/all-packages.nix
··· 24591 24591 24592 24592 protobuf = protobuf3_24; 24593 24593 24594 + # C++ 4.24 runtime, Python 4.24 runtime 24595 + protobuf_24 = callPackage ../development/libraries/protobuf/24.nix { }; 24596 + # C++ 4.23 runtime, Python 4.23 runtime 24597 + protobuf_23 = callPackage ../development/libraries/protobuf/23.nix { }; 24598 + # C++ 3.21 runtime, Python 4.21 runtime 24599 + protobuf_21 = callPackage ../development/libraries/protobuf/21.nix { 24600 + abseil-cpp = abseil-cpp_202103; 24601 + }; 24602 + 24594 24603 protobuf3_24 = callPackage ../development/libraries/protobuf/3.24.nix { }; 24595 24604 protobuf3_23 = callPackage ../development/libraries/protobuf/3.23.nix { }; 24596 24605 protobuf3_21 = callPackage ../development/libraries/protobuf/3.21.nix { 24597 24606 abseil-cpp = abseil-cpp_202103; 24598 24607 }; 24608 + 24599 24609 protobuf3_20 = callPackage ../development/libraries/protobuf/3.20.nix { 24600 24610 abseil-cpp = abseil-cpp_202103; 24601 24611 };