Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv 2, fetchFromGitHub 3, aws-c-auth 4, aws-c-cal 5, aws-c-common 6, aws-c-compression 7, aws-c-event-stream 8, aws-c-http 9, aws-c-io 10, aws-c-mqtt 11, aws-c-s3 12, aws-checksums 13, cmake 14, s2n-tls 15, nix 16}: 17 18stdenv.mkDerivation rec { 19 pname = "aws-crt-cpp"; 20 version = "0.20.1"; 21 22 outputs = [ "out" "dev" ]; 23 24 src = fetchFromGitHub { 25 owner = "awslabs"; 26 repo = "aws-crt-cpp"; 27 rev = "v${version}"; 28 sha256 = "sha256-RfuJGHPJGDlajaKL1b2b20wFK3x4Vn+IRo87ppMOtvE="; 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 37 postPatch = '' 38 substituteInPlace CMakeLists.txt --replace '-Werror' "" 39 ''; 40 41 nativeBuildInputs = [ 42 cmake 43 ]; 44 45 propagatedBuildInputs = [ 46 aws-c-auth 47 aws-c-cal 48 aws-c-common 49 aws-c-compression 50 aws-c-event-stream 51 aws-c-http 52 aws-c-io 53 aws-c-mqtt 54 aws-c-s3 55 aws-checksums 56 s2n-tls 57 ]; 58 59 cmakeFlags = [ 60 "-DBUILD_DEPS=OFF" 61 "-DBUILD_SHARED_LIBS=ON" 62 ]; 63 64 postInstall = '' 65 # Prevent dependency cycle. 66 moveToOutput lib/aws-crt-cpp/cmake "$dev" 67 ''; 68 69 passthru.tests = { 70 inherit nix; 71 }; 72 73 meta = with lib; { 74 description = "C++ wrapper around the aws-c-* libraries"; 75 homepage = "https://github.com/awslabs/aws-crt-cpp"; 76 license = licenses.asl20; 77 platforms = platforms.unix; 78 maintainers = with maintainers; [ r-burns ]; 79 }; 80}