2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv
|
2018-06-08 01:08:49 +02:00
|
|
|
, fetchFromGitLab
|
|
|
|
|
|
|
|
, cmake
|
|
|
|
, ninja
|
2018-06-28 22:25:19 +02:00
|
|
|
, mbedtls
|
|
|
|
|
|
|
|
, enableCache ? true # Internal cache support.
|
|
|
|
, enableIpV6 ? true
|
|
|
|
, enableTls ? true
|
|
|
|
, enableMonitor ? false # Support for the Hiawatha Monitor.
|
|
|
|
, enableRproxy ? true # Reverse proxy support.
|
|
|
|
, enableTomahawk ? false # Tomahawk, the Hiawatha command shell.
|
|
|
|
, enableXslt ? true, libxml2 ? null, libxslt ? null
|
|
|
|
, enableToolkit ? true # The URL Toolkit.
|
2018-06-08 01:08:49 +02:00
|
|
|
}:
|
2017-02-21 22:52:43 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "hiawatha";
|
2020-07-25 02:31:01 +02:00
|
|
|
version = "10.11";
|
2017-02-21 22:52:43 +01:00
|
|
|
|
2018-06-08 01:08:49 +02:00
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "hsleisink";
|
|
|
|
repo = "hiawatha";
|
|
|
|
rev = "v${version}";
|
2020-07-25 02:31:01 +02:00
|
|
|
sha256 = "10a7dqj37zrbmgnhwsw0mqm5x25kasl8p95g01rzakviwxkdrkid";
|
2017-02-21 22:52:43 +01:00
|
|
|
};
|
|
|
|
|
2018-06-08 01:08:49 +02:00
|
|
|
nativeBuildInputs = [ cmake ninja ];
|
2021-01-15 08:07:56 +01:00
|
|
|
buildInputs = [ mbedtls ] ++ lib.optionals enableXslt [ libxslt libxml2 ];
|
2017-02-21 22:52:43 +01:00
|
|
|
|
2017-06-16 14:34:53 +02:00
|
|
|
prePatch = ''
|
|
|
|
substituteInPlace CMakeLists.txt --replace SETUID ""
|
|
|
|
'';
|
|
|
|
|
2017-02-21 22:52:43 +01:00
|
|
|
cmakeFlags = [
|
2018-06-28 22:25:19 +02:00
|
|
|
"-DUSE_SYSTEM_MBEDTLS=on" # Policy to use Nix deps, and Nix uses up to date deps
|
|
|
|
( if enableCache then "-DENABLE_CACHE=on" else "-DENABLE_CACHE=off" )
|
|
|
|
( if enableIpV6 then "-DENABLE_IPV6=on" else "-DENABLE_IPV6=off" )
|
|
|
|
( if enableTls then "-DENABLE_TLS=on" else "-DENABLE_TLS=off" )
|
|
|
|
( if enableMonitor then "-DENABLE_MONITOR=on" else "-DENABLE_MONITOR=off" )
|
|
|
|
( if enableRproxy then "-DENABLE_RPROXY=on" else "-DENABLE_RPROXY=off" )
|
|
|
|
( if enableTomahawk then "-DENABLE_TOMAHAWK=on" else "-DENABLE_TOMAHAWK=off" )
|
|
|
|
( if enableXslt then "-DENABLE_XSLT=on" else "-DENABLE_XSLT=off" )
|
|
|
|
( if enableToolkit then "-DENABLE_TOOLKIT=on" else "-DENABLE_TOOLKIT=off" )
|
2017-02-21 22:52:43 +01:00
|
|
|
];
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://www.hiawatha-webserver.org";
|
2017-02-21 22:52:43 +01:00
|
|
|
description = "An advanced and secure webserver";
|
|
|
|
license = licenses.gpl2;
|
2018-06-28 22:25:19 +02:00
|
|
|
platforms = platforms.unix; # "Hiawatha runs perfectly on Linux, BSD and MacOS X"
|
2019-12-26 22:28:10 +01:00
|
|
|
maintainers = [];
|
2017-02-21 22:52:43 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|