diff options
author | Alyssa Ross <hi@alyssa.is> | 2022-02-22 10:43:06 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2022-03-11 16:17:56 +0000 |
commit | ca1aada113c0ebda1ab8667199f6453f8e01c4fc (patch) | |
tree | 55e402280096f62eb0bc8bcad5ce6050c5a0aec7 /nixpkgs/pkgs/development/libraries/aws-crt-cpp | |
parent | e4df5a52a6a6531f32626f57205356a773ac2975 (diff) | |
parent | 93883402a445ad467320925a0a5dbe43a949f25b (diff) | |
download | nixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.tar nixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.tar.gz nixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.tar.bz2 nixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.tar.lz nixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.tar.xz nixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.tar.zst nixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.zip |
Merge commit '93883402a445ad467320925a0a5dbe43a949f25b'
Conflicts: nixpkgs/nixos/modules/programs/ssh.nix nixpkgs/pkgs/applications/networking/browsers/firefox/packages.nix nixpkgs/pkgs/data/fonts/noto-fonts/default.nix nixpkgs/pkgs/development/go-modules/generic/default.nix nixpkgs/pkgs/development/interpreters/ruby/default.nix nixpkgs/pkgs/development/libraries/mesa/default.nix
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/aws-crt-cpp')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/aws-crt-cpp/0001-build-Make-includedir-properly-overrideable.patch | 58 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/aws-crt-cpp/default.nix | 13 |
2 files changed, 71 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/aws-crt-cpp/0001-build-Make-includedir-properly-overrideable.patch b/nixpkgs/pkgs/development/libraries/aws-crt-cpp/0001-build-Make-includedir-properly-overrideable.patch new file mode 100644 index 000000000000..ed08abfb48f8 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/aws-crt-cpp/0001-build-Make-includedir-properly-overrideable.patch @@ -0,0 +1,58 @@ +From 6be95cf45c4b5beae8b364468cef42d5c5880836 Mon Sep 17 00:00:00 2001 +From: Jan Tojnar <jtojnar@gmail.com> +Date: Sun, 9 Jan 2022 01:57:18 +0100 +Subject: [PATCH] build: Make includedir properly overrideable + +This is required by some package managers like Nix. +--- + CMakeLists.txt | 20 ++++++++++++-------- + 1 file changed, 12 insertions(+), 8 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ad50174..e0be58c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -54,6 +54,10 @@ elseif(NOT DEFINED CMAKE_INSTALL_LIBDIR) + set(CMAKE_INSTALL_LIBDIR "lib") + endif() + ++if(NOT DEFINED CMAKE_INSTALL_INCLUDEDIR) ++ set(CMAKE_INSTALL_INCLUDEDIR "include") ++endif() ++ + if (${CMAKE_INSTALL_LIBDIR} STREQUAL "lib64") + set(FIND_LIBRARY_USE_LIB64_PATHS true) + endif() +@@ -302,7 +306,7 @@ endif () + + target_include_directories(${PROJECT_NAME} PUBLIC + $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> +- $<INSTALL_INTERFACE:include>) ++ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>) + + aws_use_package(aws-c-http) + aws_use_package(aws-c-mqtt) +@@ -316,13 +320,13 @@ aws_use_package(aws-c-s3) + + target_link_libraries(${PROJECT_NAME} ${DEP_AWS_LIBS}) + +-install(FILES ${AWS_CRT_HEADERS} DESTINATION "include/aws/crt" COMPONENT Development) +-install(FILES ${AWS_CRT_AUTH_HEADERS} DESTINATION "include/aws/crt/auth" COMPONENT Development) +-install(FILES ${AWS_CRT_CRYPTO_HEADERS} DESTINATION "include/aws/crt/crypto" COMPONENT Development) +-install(FILES ${AWS_CRT_IO_HEADERS} DESTINATION "include/aws/crt/io" COMPONENT Development) +-install(FILES ${AWS_CRT_IOT_HEADERS} DESTINATION "include/aws/iot" COMPONENT Development) +-install(FILES ${AWS_CRT_MQTT_HEADERS} DESTINATION "include/aws/crt/mqtt" COMPONENT Development) +-install(FILES ${AWS_CRT_HTTP_HEADERS} DESTINATION "include/aws/crt/http" COMPONENT Development) ++install(FILES ${AWS_CRT_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt" COMPONENT Development) ++install(FILES ${AWS_CRT_AUTH_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/auth" COMPONENT Development) ++install(FILES ${AWS_CRT_CRYPTO_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/crypto" COMPONENT Development) ++install(FILES ${AWS_CRT_IO_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/io" COMPONENT Development) ++install(FILES ${AWS_CRT_IOT_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/iot" COMPONENT Development) ++install(FILES ${AWS_CRT_MQTT_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/mqtt" COMPONENT Development) ++install(FILES ${AWS_CRT_HTTP_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/http" COMPONENT Development) + + install( + TARGETS ${PROJECT_NAME} +-- +2.34.1 + diff --git a/nixpkgs/pkgs/development/libraries/aws-crt-cpp/default.nix b/nixpkgs/pkgs/development/libraries/aws-crt-cpp/default.nix index 5d4a44ccf159..9f70be5eb8d0 100644 --- a/nixpkgs/pkgs/development/libraries/aws-crt-cpp/default.nix +++ b/nixpkgs/pkgs/development/libraries/aws-crt-cpp/default.nix @@ -18,6 +18,8 @@ stdenv.mkDerivation rec { pname = "aws-crt-cpp"; version = "0.17.8"; + outputs = [ "out" "dev" ]; + src = fetchFromGitHub { owner = "awslabs"; repo = "aws-crt-cpp"; @@ -25,6 +27,12 @@ stdenv.mkDerivation rec { sha256 = "sha256-eHABIg3v5ycpQzacW/8C74PT6yDOXGmJqDa9P1hN7Mo="; }; + 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' "" ''; @@ -53,6 +61,11 @@ stdenv.mkDerivation rec { "-DBUILD_SHARED_LIBS=ON" ]; + postInstall = '' + # Prevent dependency cycle. + moveToOutput lib/aws-crt-cpp/cmake "$dev" + ''; + meta = with lib; { description = "C++ wrapper around the aws-c-* libraries"; homepage = "https://github.com/awslabs/aws-crt-cpp"; |