Skip to content

Commit

Permalink
hiawatha: init at 10.5
Browse files Browse the repository at this point in the history
Removed un-needed phase; re-enabled SSL as default

Hiawatha: fix indentation

Hiawatha: Removed 'pkgs'

fixes #23060
  • Loading branch information
ndowens authored and Mic92 committed Feb 26, 2017
1 parent 9c2ac51 commit a0cfe05
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
51 changes: 51 additions & 0 deletions pkgs/servers/http/hiawatha/default.nix
Original file line number Diff line number Diff line change
@@ -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 ];
};

}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10431,6 +10431,8 @@ with pkgs;

hbase = callPackage ../servers/hbase {};

hiawatha = callPackage ../servers/http/hiawatha {};

ircdHybrid = callPackage ../servers/irc/ircd-hybrid { };

jboss = callPackage ../servers/http/jboss { };
Expand Down

0 comments on commit a0cfe05

Please sign in to comment.