diff options
author | ndowens <ndowens04@gmail.com> | 2017-02-21 15:52:43 -0600 |
---|---|---|
committer | Jörg Thalheim <joerg@thalheim.io> | 2017-02-26 13:09:41 +0100 |
commit | a0cfe05ebb856de685ee621a388d12a553eb7de3 (patch) | |
tree | 2bdf7142889d3c76873989ec5b6f72b7dd7e2fce /pkgs/servers | |
parent | 9c2ac51006db5b74f72f7958de80b0e3d7b2947e (diff) |
hiawatha: init at 10.5
Removed un-needed phase; re-enabled SSL as default
Hiawatha: fix indentation
Hiawatha: Removed 'pkgs'
fixes #23060
Diffstat (limited to 'pkgs/servers')
-rw-r--r-- | pkgs/servers/http/hiawatha/default.nix | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/pkgs/servers/http/hiawatha/default.nix b/pkgs/servers/http/hiawatha/default.nix new file mode 100644 index 000000000000..26566b2281cc --- /dev/null +++ b/pkgs/servers/http/hiawatha/default.nix @@ -0,0 +1,51 @@ +{ stdenv, fetchurl, cmake, + libxslt, zlib, libxml2, openssl, + enableSSL ? true, + enableMonitor ? false, + enableRproxy ? true, + enableTomahawk ? false, + enableXSLT ? true, + enableToolkit ? true +}: + +assert enableSSL -> openssl !=null; + +stdenv.mkDerivation rec { + name = "hiawatha-${version}"; + version = "10.5"; + + src = fetchurl { + url = "https://github.com/hsleisink/hiawatha/archive/v${version}.tar.gz"; + sha256 = "11nqdmmhq1glgsiza8pfh69wmpgwl51vb3xijmpcxv63a7ywp4fj"; + }; + + buildInputs = [ cmake libxslt zlib libxml2 ] ++ stdenv.lib.optional enableSSL openssl ; + + cmakeFlags = [ + ( 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" ) + "-DWEBROOT_DIR=/var/www/hiawatha" + "-DPID_DIR=/run" + "-DWORK_DIR=/var/lib/hiawatha" + "-DLOG_DIR=/var/log/hiawatha" + ]; + + # workaround because cmake tries installs stuff outside of nix store + makeFlags = [ "DESTDIR=$(out)" "PREFIX=" ]; + postInstall = '' + mv $out/$out/* $out + rm -rf $out/{var,run} + ''; + + meta = with stdenv.lib; { + description = "An advanced and secure webserver"; + license = licenses.gpl2; + homepage = "https://www.hiawatha-webserver.org"; + maintainer = [ maintainers.ndowens ]; + }; + +} |