13 enableCache ? true, # Internal cache support.
16 enableMonitor ? false, # Support for the Hiawatha Monitor.
17 enableRproxy ? true, # Reverse proxy support.
18 enableTomahawk ? false, # Tomahawk, the Hiawatha command shell.
22 enableToolkit ? true, # The URL Toolkit.
25 stdenv.mkDerivation (finalAttrs: {
29 src = fetchFromGitLab {
32 rev = "v${finalAttrs.version}";
33 hash = "sha256-YsZdVqanVNibA4KnAknLh61hVo7x5uu67lb+RX2N7c8=";
46 ++ lib.optionals enableXslt [
52 substituteInPlace CMakeLists.txt --replace SETUID ""
56 "-DUSE_SYSTEM_MBEDTLS=on" # Policy to use Nix deps, and Nix uses up to date deps
57 (if enableCache then "-DENABLE_CACHE=on" else "-DENABLE_CACHE=off")
58 (if enableIpV6 then "-DENABLE_IPV6=on" else "-DENABLE_IPV6=off")
59 (if enableTls then "-DENABLE_TLS=on" else "-DENABLE_TLS=off")
60 (if enableMonitor then "-DENABLE_MONITOR=on" else "-DENABLE_MONITOR=off")
61 (if enableRproxy then "-DENABLE_RPROXY=on" else "-DENABLE_RPROXY=off")
62 (if enableTomahawk then "-DENABLE_TOMAHAWK=on" else "-DENABLE_TOMAHAWK=off")
63 (if enableXslt then "-DENABLE_XSLT=on" else "-DENABLE_XSLT=off")
64 (if enableToolkit then "-DENABLE_TOOLKIT=on" else "-DENABLE_TOOLKIT=off")
67 passthru.tests.serve-static-files = callPackage ./test.nix {
68 hiawatha = finalAttrs.finalPackage;
73 homepage = "https://hiawatha.leisink.net/";
74 description = "Advanced and secure webserver";
75 license = licenses.gpl2Only;
76 platforms = platforms.unix; # "Hiawatha runs perfectly on Linux, BSD and MacOS X"
77 mainProgram = "hiawatha";