diff --git a/pkgs/applications/networking/localproxy/default.nix b/pkgs/applications/networking/localproxy/default.nix index ed2817ed10a4..019da4695124 100644 --- a/pkgs/applications/networking/localproxy/default.nix +++ b/pkgs/applications/networking/localproxy/default.nix @@ -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; + }; +}) diff --git a/pkgs/development/libraries/protobuf/generic-v3-cmake.nix b/pkgs/development/libraries/protobuf/generic-v3-cmake.nix index 53cbfab1fb24..dd31aba434ce 100644 --- a/pkgs/development/libraries/protobuf/generic-v3-cmake.nix +++ b/pkgs/development/libraries/protobuf/generic-v3-cmake.nix @@ -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