core/pkgs/by-name/aw/aws-crt-cpp/default.nix

66 lines
1.4 KiB
Nix
Raw Normal View History

2024-05-13 21:24:10 +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
2024-05-02 00:46:19 +00:00
# for passthru.tests
# , nix
}:
stdenv.mkDerivation rec {
pname = "aws-crt-cpp";
version = "0.26.4";
outputs = [ "out" "dev" ];
src = fetchFromGitHub {
owner = "awslabs";
repo = "aws-crt-cpp";
rev = "v${version}";
sha256 = "sha256-H5ms6fhhlkARn9g8S5Ma8bnisZv8mfNizP0QpzsF1tA=";
};
patches = [
# Correct include path for split outputs.
# https://github.com/awslabs/aws-crt-cpp/pull/325
./0001-build-Make-includedir-properly-overrideable.patch
];
postPatch = ''
substituteInPlace CMakeLists.txt --replace '-Werror' ""
'';
2024-05-13 21:24:10 +00:00
nativeBuildInputs = [ cmake ];
2024-05-02 00:46:19 +00:00
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
];
2024-05-13 21:24:10 +00:00
cmakeFlags = [ "-DBUILD_DEPS=OFF" "-DBUILD_SHARED_LIBS=ON" ];
2024-05-02 00:46:19 +00:00
postInstall = ''
# Prevent dependency cycle.
moveToOutput lib/aws-crt-cpp/cmake "$dev"
'';
# passthru.tests = {
# inherit nix;
# };
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 ];
};
}