nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at netboot-syslinux-multiplatform 57 lines 2.0 kB view raw
1{ lib, stdenv 2, fetchFromGitLab 3 4, cmake 5, ninja 6, mbedtls_2 7, libxcrypt 8 9, enableCache ? true # Internal cache support. 10, enableIpV6 ? true 11, enableTls ? true 12, enableMonitor ? false # Support for the Hiawatha Monitor. 13, enableRproxy ? true # Reverse proxy support. 14, enableTomahawk ? false # Tomahawk, the Hiawatha command shell. 15, enableXslt ? true, libxml2 ? null, libxslt ? null 16, enableToolkit ? true # The URL Toolkit. 17}: 18 19stdenv.mkDerivation rec { 20 pname = "hiawatha"; 21 version = "10.11"; 22 23 src = fetchFromGitLab { 24 owner = "hsleisink"; 25 repo = "hiawatha"; 26 rev = "v${version}"; 27 sha256 = "10a7dqj37zrbmgnhwsw0mqm5x25kasl8p95g01rzakviwxkdrkid"; 28 }; 29 30 nativeBuildInputs = [ cmake ninja ]; 31 buildInputs = [ mbedtls_2 libxcrypt ] ++ lib.optionals enableXslt [ libxslt libxml2 ]; 32 33 prePatch = '' 34 substituteInPlace CMakeLists.txt --replace SETUID "" 35 ''; 36 37 cmakeFlags = [ 38 "-DUSE_SYSTEM_MBEDTLS=on" # Policy to use Nix deps, and Nix uses up to date deps 39 ( if enableCache then "-DENABLE_CACHE=on" else "-DENABLE_CACHE=off" ) 40 ( if enableIpV6 then "-DENABLE_IPV6=on" else "-DENABLE_IPV6=off" ) 41 ( if enableTls then "-DENABLE_TLS=on" else "-DENABLE_TLS=off" ) 42 ( if enableMonitor then "-DENABLE_MONITOR=on" else "-DENABLE_MONITOR=off" ) 43 ( if enableRproxy then "-DENABLE_RPROXY=on" else "-DENABLE_RPROXY=off" ) 44 ( if enableTomahawk then "-DENABLE_TOMAHAWK=on" else "-DENABLE_TOMAHAWK=off" ) 45 ( if enableXslt then "-DENABLE_XSLT=on" else "-DENABLE_XSLT=off" ) 46 ( if enableToolkit then "-DENABLE_TOOLKIT=on" else "-DENABLE_TOOLKIT=off" ) 47 ]; 48 49 meta = with lib; { 50 homepage = "https://www.hiawatha-webserver.org"; 51 description = "An advanced and secure webserver"; 52 license = licenses.gpl2; 53 platforms = platforms.unix; # "Hiawatha runs perfectly on Linux, BSD and MacOS X" 54 maintainers = []; 55 }; 56 57}