11 , enableCache ? true # Internal cache support.
14 , enableMonitor ? false # Support for the Hiawatha Monitor.
15 , enableRproxy ? true # Reverse proxy support.
16 , enableTomahawk ? false # Tomahawk, the Hiawatha command shell.
17 , enableXslt ? true, libxml2 ? null, libxslt ? null
18 , enableToolkit ? true # The URL Toolkit.
21 stdenv.mkDerivation (finalAttrs: {
25 src = fetchFromGitLab {
28 rev = "v${finalAttrs.version}";
29 hash = "sha256-YsZdVqanVNibA4KnAknLh61hVo7x5uu67lb+RX2N7c8=";
32 nativeBuildInputs = [ cmake ninja ];
33 buildInputs = [ mbedtls libxcrypt zlib ] ++ lib.optionals enableXslt [ libxslt libxml2 ];
36 substituteInPlace CMakeLists.txt --replace SETUID ""
40 "-DUSE_SYSTEM_MBEDTLS=on" # Policy to use Nix deps, and Nix uses up to date deps
41 ( if enableCache then "-DENABLE_CACHE=on" else "-DENABLE_CACHE=off" )
42 ( if enableIpV6 then "-DENABLE_IPV6=on" else "-DENABLE_IPV6=off" )
43 ( if enableTls then "-DENABLE_TLS=on" else "-DENABLE_TLS=off" )
44 ( if enableMonitor then "-DENABLE_MONITOR=on" else "-DENABLE_MONITOR=off" )
45 ( if enableRproxy then "-DENABLE_RPROXY=on" else "-DENABLE_RPROXY=off" )
46 ( if enableTomahawk then "-DENABLE_TOMAHAWK=on" else "-DENABLE_TOMAHAWK=off" )
47 ( if enableXslt then "-DENABLE_XSLT=on" else "-DENABLE_XSLT=off" )
48 ( if enableToolkit then "-DENABLE_TOOLKIT=on" else "-DENABLE_TOOLKIT=off" )
51 passthru.tests.serve-static-files = callPackage ./test.nix {
52 hiawatha = finalAttrs.finalPackage;
57 homepage = "https://hiawatha.leisink.net/";
58 description = "Advanced and secure webserver";
59 license = licenses.gpl2Only;
60 platforms = platforms.unix; # "Hiawatha runs perfectly on Linux, BSD and MacOS X"
61 mainProgram = "hiawatha";