Merge pull request #256427 from aaronjheng/localproxy

localproxy: use protobuf3_21
This commit is contained in:
Weijia Wang 2023-10-01 01:55:24 +02:00 committed by GitHub
commit 3dafbb577b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 17 deletions

View file

@ -3,37 +3,38 @@
, fetchFromGitHub
, cmake
, openssl
, protobuf3_19
, protobuf3_21
, catch2
, boost181
, icu
}:
let
boost = boost181.override { enableStatic = true; };
protobuf = protobuf3_21.override { enableShared = false; };
in
stdenv.mkDerivation (finalAttrs: {
pname = "localproxy";
version = "3.1.0";
src = fetchFromGitHub {
owner = "aws-samples";
repo = "aws-iot-securetunneling-localproxy";
rev = "v${finalAttrs.version}";
hash = "sha256-ec72bvBkRBj4qlTNfzNPeQt02OfOPA8y2PoejHpP9cY=";
};
src = fetchFromGitHub {
owner = "aws-samples";
repo = "aws-iot-securetunneling-localproxy";
rev = "v${finalAttrs.version}";
hash = "sha256-ec72bvBkRBj4qlTNfzNPeQt02OfOPA8y2PoejHpP9cY=";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ openssl protobuf3_19 catch2 boost icu ];
buildInputs = [ openssl protobuf catch2 boost icu ];
# causes redefinition of _FORTIFY_SOURCE
hardeningDisable = [ "fortify3" ];
meta = with lib; {
description = "AWS IoT Secure Tunneling Local Proxy Reference Implementation C++";
homepage = "https://github.com/aws-samples/aws-iot-securetunneling-localproxy";
license = licenses.asl20;
maintainers = with maintainers; [spalf];
platforms = platforms.unix;
};
})
meta = with lib; {
description = "AWS IoT Secure Tunneling Local Proxy Reference Implementation C++";
homepage = "https://github.com/aws-samples/aws-iot-securetunneling-localproxy";
license = licenses.asl20;
maintainers = with maintainers; [ spalf ];
platforms = platforms.unix;
};
})

View file

@ -16,6 +16,7 @@
# downstream dependencies
, python3
, grpc
, enableShared ? !stdenv.hostPlatform.isStatic
, ...
}:
@ -74,7 +75,7 @@ stdenv.mkDerivation (finalAttrs: {
cmakeFlags = [
"-Dprotobuf_USE_EXTERNAL_GTEST=ON"
"-Dprotobuf_ABSL_PROVIDER=package"
] ++ lib.optionals (!stdenv.targetPlatform.isStatic) [
] ++ lib.optionals enableShared [
"-Dprotobuf_BUILD_SHARED_LIBS=ON"
]
# Tests fail to build on 32-bit platforms; fixed in 3.22