From d5541617841834d8638ae9a12096d02d9403b4e5 Mon Sep 17 00:00:00 2001 From: Trolli Schmittlauch Date: Wed, 9 Oct 2019 00:54:56 +0200 Subject: [PATCH] make all dependecies build by working around libevhtp issues --- libevhtp/default.nix | 6 +++++- libevhtp/pkgconfig-librarypath.patch | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 libevhtp/pkgconfig-librarypath.patch diff --git a/libevhtp/default.nix b/libevhtp/default.nix index 12ede04..e1a5dc6 100644 --- a/libevhtp/default.nix +++ b/libevhtp/default.nix @@ -18,7 +18,11 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; buildInputs = [ libevent pth openssl ]; propagatedBuildInputs = [ oniguruma ]; - cmakeFlags = [ "-DEVHTP_DISABLE_SSL=OFF" "-DEVHTP_BUILD_SHARED=ON" ]; + # fix pkgconfig librarypath generation + patches = [ ./pkgconfig-librarypath.patch ]; + #cmakeFlags = [ "-DEVHTP_DISABLE_SSL=OFF" "-DEVHTP_BUILD_SHARED=ON" ]; + cmakeFlags = [ "-DEVHTP_DISABLE_SSL=OFF" "-DBUILD_SHARED_LIBS=ON" ]; + outputs = [ "dev" "out" ]; meta = { description = "Create extremely-fast and secure embedded HTTP servers with ease."; diff --git a/libevhtp/pkgconfig-librarypath.patch b/libevhtp/pkgconfig-librarypath.patch new file mode 100644 index 0000000..c849317 --- /dev/null +++ b/libevhtp/pkgconfig-librarypath.patch @@ -0,0 +1,20 @@ +Author: Trolli Schmittlauch +Date: Sat Sep 14 20:32:03 2019 +0200 + + fix #143 by setting LIB_INSTALL_DIR CMake var + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 481ddd0..833ddf9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -225,6 +225,10 @@ set(include_install_dir "include") + + set(generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated") + ++if (NOT LIB_INSTALL_DIR) ++ set (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib") ++endif (NOT LIB_INSTALL_DIR) ++ + # Configuration + set(version_config "${generated_dir}/${PROJECT_NAME}ConfigVersion.cmake") + set(project_config "${generated_dir}/${PROJECT_NAME}Config.cmake")