diff options
author | Anton Latukha <anton.latukha@gmail.com> | 2018-06-28 23:25:19 +0300 |
---|---|---|
committer | Jörg Thalheim <Mic92@users.noreply.github.com> | 2018-06-28 21:25:19 +0100 |
commit | c876db629d2c05acb8adcf80feabc6d8758842f5 (patch) | |
tree | 490d657441a666741a91f7907d966f84a5872d55 /pkgs/servers/http/hiawatha | |
parent | 9fcc63abb566e8d7c0e86c427a740553d329f00f (diff) |
mbedtls: cmake&ninja, threading, clean-up; hiawatha: options, Nix mbedtls (#41722)
* mbedtls: build with cmake&ninja, clean-up * mbedtls: cmake ninja Darwin build clean-up * hiawatha: add build options, use system mbedTLS, platforms -> unix
Diffstat (limited to 'pkgs/servers/http/hiawatha')
-rw-r--r-- | pkgs/servers/http/hiawatha/default.nix | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/pkgs/servers/http/hiawatha/default.nix b/pkgs/servers/http/hiawatha/default.nix index 39722c6d831fe..e10799e27f8ac 100644 --- a/pkgs/servers/http/hiawatha/default.nix +++ b/pkgs/servers/http/hiawatha/default.nix @@ -3,16 +3,16 @@ , cmake , ninja - -, libxslt -, libxml2 - -, enableSSL ? true -, enableMonitor ? false -, enableRproxy ? true -, enableTomahawk ? false -, enableXSLT ? true -, enableToolkit ? true +, 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. }: stdenv.mkDerivation rec { @@ -27,28 +27,29 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ cmake ninja ]; - buildInputs = [ libxslt libxml2 ]; + buildInputs = [ mbedtls ] ++ stdenv.lib.optionals enableXslt [ libxslt libxml2 ]; prePatch = '' substituteInPlace CMakeLists.txt --replace SETUID "" ''; cmakeFlags = [ - ( - # 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" ) - ( 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" ) + "-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" ) ]; meta = with stdenv.lib; { + homepage = https://www.hiawatha-webserver.org; description = "An advanced and secure webserver"; license = licenses.gpl2; - homepage = https://www.hiawatha-webserver.org; + platforms = platforms.unix; # "Hiawatha runs perfectly on Linux, BSD and MacOS X" maintainers = [ maintainers.ndowens ]; }; |