nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 86 lines 1.8 kB view raw
1{ lib, stdenv 2, fetchFromGitHub 3, fetchpatch 4, aws-c-auth 5, aws-c-cal 6, aws-c-common 7, aws-c-compression 8, aws-c-event-stream 9, aws-c-http 10, aws-c-io 11, aws-c-mqtt 12, aws-c-s3 13, aws-checksums 14, cmake 15, s2n-tls 16}: 17 18stdenv.mkDerivation rec { 19 pname = "aws-crt-cpp"; 20 version = "0.17.28"; 21 22 outputs = [ "out" "dev" ]; 23 24 src = fetchFromGitHub { 25 owner = "awslabs"; 26 repo = "aws-crt-cpp"; 27 rev = "v${version}"; 28 sha256 = "sha256-4/BgwX8Pa5D2lEn0Dh3JlUiYUtA9u0rWpBixqmv1X/A="; 29 }; 30 31 patches = [ 32 # Correct include path for split outputs. 33 # https://github.com/awslabs/aws-crt-cpp/pull/325 34 ./0001-build-Make-includedir-properly-overrideable.patch 35 36 # Fix build with new input stream api 37 # https://github.com/awslabs/aws-crt-cpp/pull/341 38 # Remove with next release 39 (fetchpatch { 40 url = "https://github.com/awslabs/aws-crt-cpp/commit/8adb8490fd4f1d1fe65aad01b0a7dda0e52ac596.patch"; 41 excludes = [ "crt/*" ]; 42 sha256 = "190v8rlj6z0qllih6w3kqmdvqjifj66hc4bchsgr3gpfv18vpzid"; 43 }) 44 ]; 45 46 postPatch = '' 47 substituteInPlace CMakeLists.txt --replace '-Werror' "" 48 ''; 49 50 nativeBuildInputs = [ 51 cmake 52 ]; 53 54 propagatedBuildInputs = [ 55 aws-c-auth 56 aws-c-cal 57 aws-c-common 58 aws-c-compression 59 aws-c-event-stream 60 aws-c-http 61 aws-c-io 62 aws-c-mqtt 63 aws-c-s3 64 aws-checksums 65 s2n-tls 66 ]; 67 68 cmakeFlags = [ 69 "-DBUILD_DEPS=OFF" 70 "-DCMAKE_SKIP_BUILD_RPATH=OFF" 71 "-DBUILD_SHARED_LIBS=ON" 72 ]; 73 74 postInstall = '' 75 # Prevent dependency cycle. 76 moveToOutput lib/aws-crt-cpp/cmake "$dev" 77 ''; 78 79 meta = with lib; { 80 description = "C++ wrapper around the aws-c-* libraries"; 81 homepage = "https://github.com/awslabs/aws-crt-cpp"; 82 license = licenses.asl20; 83 platforms = platforms.unix; 84 maintainers = with maintainers; [ r-burns ]; 85 }; 86}