From 146b5cde0384dac3ca64351f83c02331072be279 Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Sun, 27 Aug 2023 18:12:03 +0100 Subject: [PATCH 1/3] drogon: 1.8.3 -> 1.8.5 --- pkgs/development/libraries/drogon/default.nix | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/pkgs/development/libraries/drogon/default.nix b/pkgs/development/libraries/drogon/default.nix index 0eca838dfce8..820cdb4c9c80 100644 --- a/pkgs/development/libraries/drogon/default.nix +++ b/pkgs/development/libraries/drogon/default.nix @@ -9,13 +9,13 @@ stdenv.mkDerivation rec { pname = "drogon"; - version = "1.8.3"; + version = "1.8.5"; src = fetchFromGitHub { owner = "drogonframework"; repo = "drogon"; rev = "v${version}"; - sha256 = "sha256-I3f/8TMGm1G4CFMJJLyiVYso9yTHjeLefS5eaGySvC4="; + sha256 = "sha256-VvN71A0Nhe/Zdi9M1YL5mxoaiMfd2bfV53dfMBuDZd8="; fetchSubmodules = true; }; @@ -43,18 +43,14 @@ stdenv.mkDerivation rec { # 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 - - # see https://github.com/drogonframework/drogon/issues/1491 - (fetchpatch { - url = "https://github.com/drogonframework/drogon/commit/7d87d7e0b264ce53aa5ee006fb022d3516c9d666.patch"; - sha256 = "sha256-C4zH9oNMfhkaeVNvZuBuzu1v2vNgg/t+YPitbrmHg+Y="; - }) ]; # modifying PATH here makes drogon_ctl visible to the test installCheckPhase = '' - cd .. - PATH=$PATH:$out/bin bash test.sh + ( + cd .. + PATH=$PATH:$out/bin bash test.sh + ) ''; doInstallCheck = true; From f6d2980672440077471b9adedae46860a0701552 Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Sun, 27 Aug 2023 18:35:36 +0100 Subject: [PATCH 2/3] drogon: 1.8.5 -> 1.8.6 --- pkgs/development/libraries/drogon/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/drogon/default.nix b/pkgs/development/libraries/drogon/default.nix index 820cdb4c9c80..9a4a03f8846c 100644 --- a/pkgs/development/libraries/drogon/default.nix +++ b/pkgs/development/libraries/drogon/default.nix @@ -9,13 +9,13 @@ stdenv.mkDerivation rec { pname = "drogon"; - version = "1.8.5"; + version = "1.8.6"; src = fetchFromGitHub { owner = "drogonframework"; repo = "drogon"; rev = "v${version}"; - sha256 = "sha256-VvN71A0Nhe/Zdi9M1YL5mxoaiMfd2bfV53dfMBuDZd8="; + sha256 = "sha256-BYZoMesDquXaphZvnf2Vd/RuOC9jsOjZsGNbDmQ3u+c="; fetchSubmodules = true; }; From 22e67d38f242efded994d2f85af989a41e57f3e9 Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Sun, 27 Aug 2023 21:24:51 +0100 Subject: [PATCH 3/3] drogon: fix cross-compiling --- pkgs/development/libraries/drogon/default.nix | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pkgs/development/libraries/drogon/default.nix b/pkgs/development/libraries/drogon/default.nix index 9a4a03f8846c..4c2ec82b0f3c 100644 --- a/pkgs/development/libraries/drogon/default.nix +++ b/pkgs/development/libraries/drogon/default.nix @@ -7,14 +7,14 @@ , redisSupport ? false, hiredis , mysqlSupport ? false, libmysqlclient, mariadb }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "drogon"; version = "1.8.6"; src = fetchFromGitHub { owner = "drogonframework"; repo = "drogon"; - rev = "v${version}"; + rev = "v${finalAttrs.version}"; sha256 = "sha256-BYZoMesDquXaphZvnf2Vd/RuOC9jsOjZsGNbDmQ3u+c="; fetchSubmodules = true; }; @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; cmakeFlags = [ - "-DBUILD_TESTING=${if doInstallCheck then "ON" else "OFF"}" + "-DBUILD_TESTING=${if finalAttrs.finalPackage.doInstallCheck then "ON" else "OFF"}" "-DBUILD_EXAMPLES=OFF" ]; @@ -49,11 +49,13 @@ stdenv.mkDerivation rec { installCheckPhase = '' ( cd .. - PATH=$PATH:$out/bin bash test.sh + PATH=$PATH:$out/bin $SHELL test.sh ) ''; - doInstallCheck = true; + # this excludes you, pkgsStatic (cmake wants to run built binaries + # in the buildPhase) + doInstallCheck = stdenv.buildPlatform == stdenv.hostPlatform; meta = with lib; { homepage = "https://github.com/drogonframework/drogon"; @@ -62,4 +64,4 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ urlordjames ]; platforms = platforms.all; }; -} +})