2018-06-07 23:08:49 +00:00
|
|
|
{ stdenv
|
|
|
|
, fetchFromGitLab
|
|
|
|
|
|
|
|
, cmake
|
|
|
|
, ninja
|
|
|
|
|
|
|
|
, libxslt
|
|
|
|
, libxml2
|
2017-02-21 21:52:43 +00:00
|
|
|
|
2018-06-07 23:08:49 +00:00
|
|
|
, enableSSL ? true
|
|
|
|
, enableMonitor ? false
|
|
|
|
, enableRproxy ? true
|
|
|
|
, enableTomahawk ? false
|
|
|
|
, enableXSLT ? true
|
|
|
|
, enableToolkit ? true
|
|
|
|
}:
|
2017-02-21 21:52:43 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "hiawatha-${version}";
|
2018-05-07 10:15:08 +00:00
|
|
|
version = "10.8.1";
|
2017-02-21 21:52:43 +00:00
|
|
|
|
2018-06-07 23:08:49 +00:00
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "hsleisink";
|
|
|
|
repo = "hiawatha";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1428byx0xpzzwyc0j157q70sjx18dykvg6fd5vp70kj85ank0xpa";
|
2017-02-21 21:52:43 +00:00
|
|
|
};
|
|
|
|
|
2018-06-07 23:08:49 +00:00
|
|
|
nativeBuildInputs = [ cmake ninja ];
|
|
|
|
buildInputs = [ libxslt libxml2 ];
|
2017-02-21 21:52:43 +00:00
|
|
|
|
2017-06-16 12:34:53 +00:00
|
|
|
prePatch = ''
|
|
|
|
substituteInPlace CMakeLists.txt --replace SETUID ""
|
|
|
|
'';
|
|
|
|
|
2017-02-21 21:52:43 +00:00
|
|
|
cmakeFlags = [
|
2018-06-07 23:08:49 +00:00
|
|
|
(
|
|
|
|
# FIXME: 2018-06-08: Uses bundled library, with external ("-DUSE_SYSTEM_MBEDTLS=on") asks:
|
|
|
|
# ../src/tls.c:46:2: error: #error "The mbed TLS library must be compiled with MBEDTLS_THREADING_PTHREAD and MBEDTLS_THREADING_C enabled."
|
|
|
|
if enableSSL then "-DENABLE_TLS=on" else "-DENABLE_TLS=off" )
|
2017-02-21 21:52:43 +00:00
|
|
|
( 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" )
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "An advanced and secure webserver";
|
|
|
|
license = licenses.gpl2;
|
2017-08-01 20:03:30 +00:00
|
|
|
homepage = https://www.hiawatha-webserver.org;
|
2017-12-05 22:20:11 +00:00
|
|
|
maintainers = [ maintainers.ndowens ];
|
2017-02-21 21:52:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|