2021-09-25 19:20:06 +00:00
|
|
|
{ lib, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, aws-c-auth
|
|
|
|
, aws-c-cal
|
|
|
|
, aws-c-common
|
|
|
|
, aws-c-compression
|
|
|
|
, aws-c-event-stream
|
|
|
|
, aws-c-http
|
|
|
|
, aws-c-io
|
|
|
|
, aws-c-mqtt
|
|
|
|
, aws-c-s3
|
|
|
|
, aws-checksums
|
|
|
|
, cmake
|
|
|
|
, s2n-tls
|
2022-11-11 00:09:09 +00:00
|
|
|
, nix
|
2021-09-25 19:20:06 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "aws-crt-cpp";
|
2023-06-13 23:21:31 +00:00
|
|
|
version = "0.20.2";
|
2021-09-25 19:20:06 +00:00
|
|
|
|
2022-01-08 23:50:22 +00:00
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2021-09-25 19:20:06 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "awslabs";
|
|
|
|
repo = "aws-crt-cpp";
|
|
|
|
rev = "v${version}";
|
2023-06-13 23:21:31 +00:00
|
|
|
sha256 = "sha256-6oRVAL4pn+1+/LqLijKiBV6fZy3k9fZySwMwYHB1aUY=";
|
2021-09-25 19:20:06 +00:00
|
|
|
};
|
|
|
|
|
2022-01-08 23:50:22 +00:00
|
|
|
patches = [
|
|
|
|
# Correct include path for split outputs.
|
|
|
|
# https://github.com/awslabs/aws-crt-cpp/pull/325
|
|
|
|
./0001-build-Make-includedir-properly-overrideable.patch
|
|
|
|
];
|
|
|
|
|
2021-09-25 19:20:06 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace CMakeLists.txt --replace '-Werror' ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aws-c-auth
|
|
|
|
aws-c-cal
|
|
|
|
aws-c-common
|
|
|
|
aws-c-compression
|
|
|
|
aws-c-event-stream
|
|
|
|
aws-c-http
|
|
|
|
aws-c-io
|
|
|
|
aws-c-mqtt
|
|
|
|
aws-c-s3
|
|
|
|
aws-checksums
|
|
|
|
s2n-tls
|
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DBUILD_DEPS=OFF"
|
|
|
|
"-DBUILD_SHARED_LIBS=ON"
|
|
|
|
];
|
|
|
|
|
2022-01-08 23:50:22 +00:00
|
|
|
postInstall = ''
|
|
|
|
# Prevent dependency cycle.
|
|
|
|
moveToOutput lib/aws-crt-cpp/cmake "$dev"
|
|
|
|
'';
|
|
|
|
|
2022-11-11 00:09:09 +00:00
|
|
|
passthru.tests = {
|
|
|
|
inherit nix;
|
|
|
|
};
|
|
|
|
|
2021-09-25 19:20:06 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "C++ wrapper around the aws-c-* libraries";
|
|
|
|
homepage = "https://github.com/awslabs/aws-crt-cpp";
|
|
|
|
license = licenses.asl20;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ r-burns ];
|
|
|
|
};
|
|
|
|
}
|