diff options
author | urlordjames <urlordjames@gmail.com> | 2021-06-18 22:19:53 -0400 |
---|---|---|
committer | urlordjames <urlordjames@gmail.com> | 2021-06-19 22:28:11 -0400 |
commit | 9b99ebe6850639b8b774669d9b644fb6bd9a852b (patch) | |
tree | e0c01a14501f025fbddcf839b224f1e55596753b /pkgs/development/libraries/drogon | |
parent | 1a7a786dc1a5d0ed154c49cdd2017e2b6b7f0643 (diff) |
drogon: 1.6.0 -> 1.7.0
Diffstat (limited to 'pkgs/development/libraries/drogon')
-rw-r--r-- | pkgs/development/libraries/drogon/default.nix | 21 | ||||
-rw-r--r-- | pkgs/development/libraries/drogon/fix_find_package.patch | 13 | ||||
-rw-r--r-- | pkgs/development/libraries/drogon/no_cmake_test.patch | 42 |
3 files changed, 24 insertions, 52 deletions
diff --git a/pkgs/development/libraries/drogon/default.nix b/pkgs/development/libraries/drogon/default.nix index 8234891046da1..ebb989c940359 100644 --- a/pkgs/development/libraries/drogon/default.nix +++ b/pkgs/development/libraries/drogon/default.nix @@ -1,41 +1,42 @@ -{ stdenv, fetchFromGitHub, cmake, jsoncpp, libuuid, zlib, openssl, lib }: +{ stdenv, fetchFromGitHub, cmake, jsoncpp, libossp_uuid, zlib, openssl, lib }: stdenv.mkDerivation rec { pname = "drogon"; - version = "1.6.0"; + version = "1.7.0"; src = fetchFromGitHub { owner = "an-tao"; repo = "drogon"; rev = "v${version}"; - sha256 = "0ncdlsi3zhmpdwh83d52npb1b2q982y858yl88zl2nfq4zhcm3wa"; + sha256 = "18wn9ashv3h3pal6x5za6y7byfcrd49zy3wfx4hx0ygxzplmss0r"; fetchSubmodules = true; }; nativeBuildInputs = [ cmake ]; cmakeFlags = [ - # examples are used in the test during installCheckPhase, otherwise they are unnecessary - "-DBUILD_EXAMPLES=${if doInstallCheck then "ON" else "OFF"}" + "-DBUILD_TESTING=${if doInstallCheck then "ON" else "OFF"}" + "-DBUILD_EXAMPLES=OFF" ]; propagatedBuildInputs = [ jsoncpp - libuuid + libossp_uuid zlib openssl ]; patches = [ - # this part of the test fails because it attempts to configure a CMake project that uses find_package on itself - # the rest of the test runs fine because it uses executables that are built in buildPhase when BUILD_EXAMPLES is enabled - ./no_cmake_test.patch + # this part of the test would normally fail because it attempts to configure a CMake project that uses find_package on itself + # this patch makes drogon and trantor visible to the test + ./fix_find_package.patch ]; + # modifying PATH here makes drogon_ctl visible to the test installCheckPhase = '' cd .. patchShebangs test.sh - ./test.sh + PATH=$PATH:$out/bin ./test.sh ''; doInstallCheck = true; diff --git a/pkgs/development/libraries/drogon/fix_find_package.patch b/pkgs/development/libraries/drogon/fix_find_package.patch new file mode 100644 index 0000000000000..b76dbfe488305 --- /dev/null +++ b/pkgs/development/libraries/drogon/fix_find_package.patch @@ -0,0 +1,13 @@ +diff --git a/test.sh b/test.sh +index f017b9a..027031e 100755 +--- a/test.sh ++++ b/test.sh +@@ -135,7 +135,7 @@ if [ $os = "windows" ]; then + conan install $src_dir -s compiler="Visual Studio" -s compiler.version=16 -sbuild_type=Debug -g cmake_paths + cmake_gen="$cmake_gen -DCMAKE_TOOLCHAIN_FILE=conan_paths.cmake -DCMAKE_INSTALL_PREFIX=$src_dir/install" + fi +-cmake .. $cmake_gen ++cmake .. $cmake_gen -DDrogon_DIR=$out/lib/cmake/Drogon -DTrantor_DIR=$out/lib/cmake/Trantor + + if [ $? -ne 0 ]; then + echo "Failed to run CMake for example project" diff --git a/pkgs/development/libraries/drogon/no_cmake_test.patch b/pkgs/development/libraries/drogon/no_cmake_test.patch deleted file mode 100644 index 8d38fbf44b70f..0000000000000 --- a/pkgs/development/libraries/drogon/no_cmake_test.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff --git a/test.sh b/test.sh -index e5da08e..ba620cc 100755 ---- a/test.sh -+++ b/test.sh -@@ -157,37 +157,6 @@ cd ../views - - echo "Hello, world!" >>hello.csp - --cd ../build --if [ $os = "windows" ]; then -- conan install $src_dir -s compiler="Visual Studio" -s compiler.version=16 -sbuild_type=Debug -g cmake_paths -- cmake_gen="$cmake_gen -DCMAKE_TOOLCHAIN_FILE=conan_paths.cmake -DCMAKE_INSTALL_PREFIX=$src_dir/install" --fi --cmake .. $cmake_gen -- --if [ $? -ne 0 ]; then -- echo "Error in testing" -- exit -1 --fi -- --cmake --build . -- $make_flags -- --if [ $? -ne 0 ]; then -- echo "Error in testing" -- exit -1 --fi -- --if [ $os = "linux" ]; then -- if [ ! -f "drogon_test" ]; then -- echo "Failed to build drogon_test" -- exit -1 -- fi --else -- if [ ! -f "Debug\drogon_test.exe" ]; then -- echo "Failed to build drogon_test" -- exit -1 -- fi --fi -- - cd ../../ - rm -rf drogon_test - |