9 # optional but of negligible size
16 postgresSupport ? false,
25 stdenv.mkDerivation (finalAttrs: {
29 src = fetchFromGitHub {
30 owner = "drogonframework";
32 rev = "v${finalAttrs.version}";
33 hash = "sha256-5nJwWlXy0e0ThnTGV9MamdAJ+FqB597gsDz28p8DrQA=";
34 fetchSubmodules = true;
37 nativeBuildInputs = [ cmake ];
40 (lib.cmakeBool "BUILD_TESTING" finalAttrs.finalPackage.doInstallCheck)
41 (lib.cmakeBool "BUILD_EXAMPLES" false)
44 propagatedBuildInputs =
53 ++ lib.optional sqliteSupport sqlite
54 ++ lib.optional postgresSupport postgresql
55 ++ lib.optional redisSupport hiredis
56 # drogon uses mariadb for mysql (see https://github.com/drogonframework/drogon/wiki/ENG-02-Installation#Library-Dependencies)
57 ++ lib.optionals mysqlSupport [
63 # this part of the test would normally fail because it attempts to configure a CMake project that uses find_package on itself
64 # this patch makes drogon and trantor visible to the test
65 ./fix_find_package.patch
68 # modifying PATH here makes drogon_ctl visible to the test
69 installCheckPhase = ''
72 PATH=$PATH:$out/bin $SHELL test.sh
76 # this excludes you, pkgsStatic (cmake wants to run built binaries
78 doInstallCheck = stdenv.buildPlatform == stdenv.hostPlatform;
81 homepage = "https://github.com/drogonframework/drogon";
82 description = "C++14/17 based HTTP web application framework";
83 license = licenses.mit;
84 maintainers = with maintainers; [ urlordjames ];
85 platforms = platforms.all;