mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-19 04:02:10 +00:00
741c261cf7
Semi-automatic update. These checks were performed: - built on NixOS - ran `/nix/store/5x2w4d0fm3m3wr5snf6c7qys9g2kia3h-hiawatha-10.7/bin/ssi-cgi -h` got 0 exit code - ran `/nix/store/5x2w4d0fm3m3wr5snf6c7qys9g2kia3h-hiawatha-10.7/bin/ssi-cgi -v` and found version 10.7 - ran `/nix/store/5x2w4d0fm3m3wr5snf6c7qys9g2kia3h-hiawatha-10.7/bin/ssi-cgi -h` and found version 10.7 - ran `/nix/store/5x2w4d0fm3m3wr5snf6c7qys9g2kia3h-hiawatha-10.7/bin/hiawatha -h` got 0 exit code - ran `/nix/store/5x2w4d0fm3m3wr5snf6c7qys9g2kia3h-hiawatha-10.7/bin/hiawatha -v` and found version 10.7 - ran `/nix/store/5x2w4d0fm3m3wr5snf6c7qys9g2kia3h-hiawatha-10.7/bin/hiawatha -h` and found version 10.7 - ran `/nix/store/5x2w4d0fm3m3wr5snf6c7qys9g2kia3h-hiawatha-10.7/bin/wigwam -h` got 0 exit code - ran `/nix/store/5x2w4d0fm3m3wr5snf6c7qys9g2kia3h-hiawatha-10.7/bin/wigwam -v` and found version 10.7 - ran `/nix/store/5x2w4d0fm3m3wr5snf6c7qys9g2kia3h-hiawatha-10.7/bin/wigwam -h` and found version 10.7 - found 10.7 with grep in /nix/store/5x2w4d0fm3m3wr5snf6c7qys9g2kia3h-hiawatha-10.7 - found 10.7 in filename of file in /nix/store/5x2w4d0fm3m3wr5snf6c7qys9g2kia3h-hiawatha-10.7 cc "@ndowens"
56 lines
1.6 KiB
Nix
56 lines
1.6 KiB
Nix
{ 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.7";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/hsleisink/hiawatha/archive/v${version}.tar.gz";
|
|
sha256 = "1k0vgpfkmdxmkimq4ab70cqwhj5qwr4pzq7nnv957ah8cw2ijy1z";
|
|
};
|
|
|
|
buildInputs = [ cmake libxslt zlib libxml2 ] ++ stdenv.lib.optional enableSSL openssl ;
|
|
|
|
prePatch = ''
|
|
substituteInPlace CMakeLists.txt --replace SETUID ""
|
|
'';
|
|
|
|
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;
|
|
maintainers = [ maintainers.ndowens ];
|
|
};
|
|
|
|
}
|